/* ============================================================
 * io-kenos-child v1.2 — Sticky CTA (Phase 3 B1)
 * ------------------------------------------------------------
 * Fixed at top on desktop (≥769px), fixed at bottom on mobile.
 * Body gets equivalent top/bottom padding so page content
 * never sits under the bar.
 *
 * All colors come from --wdz-primary and --wdz-accent (defined
 * in tokens.css, overridden per-niche in niche-presets.css), so
 * any client palette swap automatically propagates here.
 * ============================================================ */

:root {
	--wdz-sticky-cta-h-desktop: 52px;
	--wdz-sticky-cta-h-mobile:  60px;
}

/* Reserve space so existing site content doesn't get covered. */
body {
	padding-top: var(--wdz-sticky-cta-h-desktop);
}

.wdz-sticky-cta {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	height: var(--wdz-sticky-cta-h-desktop);
	background: var(--wdz-primary, #0F3460);
	color: var(--wdz-text-on-primary, #fff);
	box-shadow: var(--wdz-shadow-md, 0 4px 12px rgba(0, 0, 0, 0.18));
	z-index: var(--wdz-z-sticky, 100);
	font-family: var(--wdz-font-body);
	font-size: 14px;
	line-height: 1;
}

.wdz-sticky-cta__inner {
	max-width: 1200px;
	height: 100%;
	margin: 0 auto;
	padding: 0 16px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.wdz-sticky-cta__brand {
	color: inherit;
	text-decoration: none;
	font-weight: 700;
	font-size: 15px;
	letter-spacing: 0.01em;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	min-width: 0;
	flex: 0 1 auto;
}

.wdz-sticky-cta__brand:hover,
.wdz-sticky-cta__brand:focus {
	color: var(--wdz-accent, #C9A227);
	text-decoration: none;
}

.wdz-sticky-cta__nav {
	display: flex;
	align-items: center;
	gap: 6px;
	flex: 0 0 auto;
}

.wdz-sticky-cta__link {
	color: inherit;
	text-decoration: none;
	padding: 8px 12px;
	border-radius: var(--wdz-radius-sm, 4px);
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-weight: 600;
	transition: background 0.15s ease, color 0.15s ease;
}

.wdz-sticky-cta__link:hover,
.wdz-sticky-cta__link:focus {
	background: rgba(255, 255, 255, 0.12);
	color: inherit;
	text-decoration: none;
}

.wdz-sticky-cta__cta {
	/* Matches the WDZ Footer Book Now visual treatment: orange/gold
	 * pill, Fredoka One, white text, subtle drop shadow. Padding +
	 * font size scaled down to fit the slim 52px sticky bar without
	 * making the bar taller. Visual consistency wins over the
	 * Lighthouse contrast warning (2.14:1) here — Mahmud confirmed
	 * the footer look is the brand voice, so the sticky CTA should
	 * read as the same button shrunk. */
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: #fff;
	background: var(--wdz-accent, #C9A227);
	text-decoration: none;
	padding: 8px 22px;
	border-radius: var(--wdz-radius-full, 9999px);
	font-family: 'Fredoka One', 'Lilita One', var(--wdz-font-heading, inherit);
	font-weight: 400;
	font-size: 14px;
	letter-spacing: 0.02em;
	transition: transform 0.1s ease, box-shadow 0.15s ease, filter 0.15s ease;
	box-shadow: 0 2px 0 rgba(0, 0, 0, 0.18);
	white-space: nowrap;
}

.wdz-sticky-cta__cta:hover,
.wdz-sticky-cta__cta:focus {
	filter: brightness(1.08);
	color: #fff;
	text-decoration: none;
	transform: translateY(-1px);
	box-shadow: 0 4px 0 rgba(0, 0, 0, 0.20);
}

.wdz-sticky-cta__cta:active {
	transform: translateY(0);
	box-shadow: 0 1px 0 rgba(0, 0, 0, 0.18);
}

/* ============================================================
 * MOBILE — flip to bottom, hide phone number text (keep icon),
 * stack on small widths if needed.
 * ============================================================ */
@media (max-width: 768px) {
	body {
		padding-top: 0;
		padding-bottom: var(--wdz-sticky-cta-h-mobile);
	}

	.wdz-sticky-cta {
		top: auto;
		bottom: 0;
		height: var(--wdz-sticky-cta-h-mobile);
		box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.18);
	}

	.wdz-sticky-cta__inner {
		padding: 0 12px;
		gap: 8px;
	}

	.wdz-sticky-cta__brand {
		font-size: 13px;
		/* On the smallest screens, hide brand text to make room for CTAs */
	}

	.wdz-sticky-cta__phone-text,
	.wdz-sticky-cta__link--inventory .wdz-sticky-cta__label {
		display: none;
	}

	.wdz-sticky-cta__link {
		padding: 8px 10px;
		font-size: 16px;
	}

	.wdz-sticky-cta__cta {
		padding: 9px 14px;
		font-size: 14px;
	}
}

@media (max-width: 380px) {
	.wdz-sticky-cta__brand {
		display: none;
	}
}

/* ============================================================
 * Edge-case hides: Elementor full-screen modes, page builders.
 * ============================================================ */
body.elementor-editor-active .wdz-sticky-cta,
body.elementor-editor-preview .wdz-sticky-cta {
	display: none;
}

/* ============================================================
 * D1 — Focus indicators for keyboard navigation (Phase 4)
 * ============================================================ */
.wdz-sticky-cta__brand:focus-visible,
.wdz-sticky-cta__link:focus-visible,
.wdz-sticky-cta__cta:focus-visible {
	outline: 2px solid var(--wdz-accent, #C9A227);
	outline-offset: 2px;
	border-radius: 4px;
}
