/* Front-end styles are deliberately namespaced to avoid theme/plugin collisions. */
.wpcta-buttons,
.wpcta-buttons * {
	box-sizing: border-box;
}

.wpcta-buttons {
	position: fixed;
	z-index: 9990;
	display: flex;
	align-items: stretch;
	gap: 10px;
	left: 0;
	right: 0;
	bottom: 0;
	min-height: calc(var(--wpcta-mobile-height, 88px) + env(safe-area-inset-bottom));
	padding: 10px max(14px, env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
	background: var(--wpcta-bar-bg, #fff);
	box-shadow: 0 -8px 30px rgba(15, 23, 42, .15);
	font-family: inherit;
	pointer-events: none;
}

.wpcta-button {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
	min-height: calc(var(--wpcta-mobile-height, 88px) - 20px);
	flex: 1 1 0;
	padding: 8px 12px;
	border: 0;
	border-radius: var(--wpcta-mobile-radius, 14px);
	background: var(--wpcta-bg, #2563eb);
	color: var(--wpcta-fg, #fff) !important;
	box-shadow: 0 5px 18px rgba(0, 0, 0, .22);
	font-size: var(--wpcta-mobile-font, 13px);
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	text-decoration: none !important;
	pointer-events: auto;
	transition: transform .18s ease, box-shadow .18s ease;
}

.wpcta-button:hover,
.wpcta-button:focus-visible {
	color: var(--wpcta-fg, #fff) !important;
	box-shadow: 0 7px 22px rgba(0, 0, 0, .3);
	transform: translateY(-2px);
}

.wpcta-button:focus-visible {
	outline: 3px solid #fff;
	outline-offset: 2px;
}

.wpcta-button__icon,
.wpcta-button__icon svg {
	display: block;
	width: var(--wpcta-mobile-icon, 25px);
	height: var(--wpcta-mobile-icon, 25px);
	flex: 0 0 var(--wpcta-mobile-icon, 25px);
}

.wpcta-button__icon svg { fill: currentColor; }
.wpcta-button__label { overflow-wrap: anywhere; }

/* A real flow element reserves room without modifying theme body styles. */
.wpcta-spacer { min-height: calc(64px + env(safe-area-inset-bottom)); }

@media (min-width: 783px) {
	.wpcta-spacer { display: none; }

	.wpcta-buttons {
		right: max(24px, env(safe-area-inset-right));
		bottom: max(24px, env(safe-area-inset-bottom));
		left: auto;
		flex-direction: column;
		align-items: flex-end;
		min-height: 0;
		padding: 0;
		background: transparent;
		box-shadow: none;
	}

	.wpcta-button {
		width: var(--wpcta-desktop-width, 190px);
		height: var(--wpcta-desktop-height, 62px);
		min-height: var(--wpcta-desktop-height, 62px);
		flex: 0 0 var(--wpcta-desktop-height, 62px);
		flex-direction: row;
		justify-content: flex-start;
		gap: 12px;
		padding: 10px 18px;
		border-radius: var(--wpcta-desktop-radius, 16px);
		font-size: var(--wpcta-desktop-font, 15px);
	}

	.wpcta-button__icon,
	.wpcta-button__icon svg {
		width: var(--wpcta-desktop-icon, 25px);
		height: var(--wpcta-desktop-icon, 25px);
		flex-basis: var(--wpcta-desktop-icon, 25px);
	}

	.wpcta-button__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

@media (prefers-reduced-motion: reduce) {
	.wpcta-button,
	.wpcta-button__label { transition: none; }
}
