/*
Theme Name: Waza Tours Child
Theme URI: https://wazatours.com/
Description: Child theme for TravelWP — owns all Waza presentation (templates + waza-home.css). Sprint 7 transition architecture.
Author: Waza Tours
Template: travelwp
Version: 1.0.0
Requires at least: 6.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: waza-travelwp-child
*/

/* WooCommerce routes do not load waza-home.css, so the parent theme's
   bootstrap.min.css still paints an unstyled account-page link #007bff —
   3.94:1 on the white form ground, below the 4.5:1 AA floor. Darken it to
   bootstrap's own hover blue (6.96:1) without touching any other route. */
.woocommerce-LostPassword > a {
	color: #0056b3;
}

/* Waza design tokens — locked palette contract (approved 2026-10-05,
   authority: docs/PALETTE-TYPOGRAPHY.md). They sit in style.css because it
   is the only stylesheet every route loads (WooCommerce never pulls
   waza-home.css), and the WhatsApp bar below needs the palette everywhere. */
:root {
	/* Locked palette */
	--waza-gold: #FCDD09;
	--waza-gold-hover: #E8C900;
	--waza-gold-deep: #8A7600; /* 4.50:1 on white — gold text on light only */
	--waza-navy: #1E293B;
	--waza-navy-deep: #0F172A;
	--waza-navy-lift: #334155;
	--waza-success: #078930;
	--waza-danger: #DA121A;
	--waza-steel: #64748B;
	--waza-surface: #F8FAFC;
	--waza-white: #FFFFFF;
	--waza-ink: #1E293B; /* dark text / text on gold — 10.8:1 on --waza-gold */
	--waza-text-inverse: #FFFFFF;
	--waza-text-inverse-soft: #F8FAFC;

	/* Interactive + structural */
	--waza-border-strong: var(--waza-steel); /* control boundaries — 3.07:1 on navy */
	--waza-button-primary-hover: var(--waza-gold-hover);
	--waza-button-secondary-hover: var(--waza-navy-lift);
	--waza-focus: var(--waza-success); /* focus ring — distinct from gold content */

	/* Overlays + shadows — slate, never raw black. (The unused
	   --waza-overlay-heavy token was removed in Sprint 15 Phase 5; hero
	   gradients express overlay alpha inline where they are measured.) */
	--waza-shadow-header: 0 10px 30px rgb(15 23 42 / 0.50);
	--waza-shadow-panel: 0 16px 40px rgb(15 23 42 / 0.45);

	/* Typography — Source Sans 3 variable (SIL OFL 1.10, assets/fonts/OFL.txt).
	   One self-hosted latin woff2 (28.2 KB), no third-party font origin,
	   font-display: optional so text never blocks first paint. */
	--waza-font-body: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--waza-weight-regular: 400;
	--waza-weight-medium: 500;
	--waza-weight-semibold: 600;
	--waza-weight-bold: 700;
	--waza-weight-extrabold: 800;
	--waza-leading-tight: 1.15;
	--waza-leading-normal: 1.5;
	--waza-leading-relaxed: 1.7;
	--waza-size-xs: 0.75rem;
	--waza-size-sm: 0.875rem;
	--waza-size-base: 1rem;
	--waza-size-lg: 1.125rem;
	--waza-size-xl: 1.5rem;
	--waza-size-2xl: clamp(1.75rem, 3vw, 2.5rem);
	--waza-size-page: clamp(2rem, 4vw, 3rem);
	--waza-size-hero: clamp(2rem, 5vw, 4.5rem);

	/* Spacing scale — Sprint 13 (Q-A14). Core rhythm only; structural
	   values (64px nav, 80px scroll-padding, clamp() hero padding) stay
	   literal by design. Near-values consolidated onto this scale with
	   documented deltas: 9px -> 8px, 26px -> 24px, 6px -> 8px,
	   22px -> 20px (see docs/SPRINT13-GATES.md). */
	--waza-space-8: 8px;
	--waza-space-12: 12px;
	--waza-space-16: 16px;
	--waza-space-20: 20px;
	--waza-space-24: 24px;
	--waza-space-48: 48px;
	--waza-space-56: 56px;
	--waza-space-88: 88px;

	/* Legacy aliases — existing selectors keep resolving during migration */
	--waza-accent: var(--waza-gold);
	--waza-accent-bright: var(--waza-gold);
	--waza-accent-soft: color-mix(in srgb, var(--waza-gold) 15%, transparent);
}

@font-face {
	font-family: "Source Sans 3";
	font-style: normal;
	font-weight: 200 900;
	font-display: optional;
	src: url("assets/fonts/source-sans-3-vf-latin.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Sprint 11, Commit C1 — global WhatsApp CTA (plan D2 + D6).
   style.css is the last stylesheet on every route (verified: waza-home.css
   prints first, this one last) and is the only sheet WooCommerce routes load,
   so the header pill and the mobile bar survive on chrome and Woo alike. */
.hero-cta-group {
	display: flex;
	align-items: center;
	gap: 10px;
}

.hero-cta-wa {
	padding: 10px 14px;
	border-color: color-mix(in srgb, var(--waza-gold) 55%, transparent);
	color: var(--waza-accent-bright);
}

.hero-cta-wa:hover {
	background: color-mix(in srgb, var(--waza-gold) 14%, transparent);
}

.waza-wa-bar {
	display: none;
}

/* Sprint 14 P8: consent bar keeps content clear while visible. The height
   comes from --waza-consent-h, measured and set by waza-cookie.js in the
   footer before first paint (CLS stays 0); the class only exists while
   the bar is up. */
body.waza-has-consent {
	padding-bottom: calc(20px + var(--waza-consent-h, 0px) + env(safe-area-inset-bottom, 0px));
}

@media (max-width: 720px) {
	/* D6: static padding declared in the first stylesheet, so the bar never
	   overlaps content and never shifts it after first paint (CLS stays 0). */
	body.waza-has-mobile-bar {
		padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px));
	}

	/* Sprint 14 P8: consent stacks above the fixed WhatsApp bar on mobile. */
	body.waza-has-mobile-bar.waza-has-consent {
		padding-bottom: calc(56px + var(--waza-consent-h, 0px) + env(safe-area-inset-bottom, 0px));
	}

	.waza-wa-bar {
		display: block;
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		/* Below .waza-header (50) so an open mobile menu covers the bar. */
		z-index: 40;
		background: var(--waza-navy);
		border-top: 1px solid rgba(255, 255, 255, 0.12);
		padding-bottom: env(safe-area-inset-bottom, 0px);
	}

	.waza-wa-bar a {
		display: flex;
		align-items: center;
		justify-content: center;
		min-height: 56px;
		padding: 8px 16px;
		color: var(--waza-accent-bright);
		font-size: var(--waza-size-base);
		font-weight: var(--waza-weight-bold);
		letter-spacing: 0.02em;
		text-decoration: none;
	}

	.waza-wa-bar a:hover {
		background: color-mix(in srgb, var(--waza-gold) 14%, transparent);
	}

	.waza-wa-bar a:focus-visible {
		outline: 2px solid var(--waza-focus);
		outline-offset: -4px;
	}

	/* Sprint 14 P7: the bar carries the icon alone; the visible label
	   lives on the desktop floating CTA. */
	.waza-wa-bar svg {
		width: 26px;
		height: 26px;
		display: block;
	}
}

/* Sprint 13 C3 — desktop floating WhatsApp CTA (Q-A1/A2/A3 approved),
   refined in Sprint 14 P7 (Q-A6 approved): the desktop CTA is now a pill
   with the visible label "Talk to our customer service" beside the icon.
   Rendered by footer.php on every theme route; hidden <=720px (the fixed
   bar owns mobile, icon-only) and hidden by waza-nav.js when the footer
   enters the viewport, so it never duplicates the footer's WhatsApp link.
   z 40 sits below .waza-header (50) and above page content; navy ring
   gives the gold pill a strong boundary on light grounds (WCAG 2.2
   non-text contrast). */
.waza-wa-float {
	display: none;
}

.waza-wa-float.is-away {
	visibility: hidden;
	opacity: 0;
	pointer-events: none;
}

@media (min-width: 721px) {
	.waza-wa-float {
		display: block;
		position: fixed;
		right: calc(20px + env(safe-area-inset-right, 0px));
		bottom: calc(20px + env(safe-area-inset-bottom, 0px));
		z-index: 40;
	}

	.waza-wa-float a {
		display: flex;
		align-items: center;
		justify-content: center;
		gap: var(--waza-space-12);
		min-height: 56px;
		padding: 0 var(--waza-space-24);
		border-radius: 999px;
		background: var(--waza-gold);
		color: var(--waza-ink);
		border: 2px solid var(--waza-navy);
		box-shadow: var(--waza-shadow-panel);
		font-size: var(--waza-size-base);
		font-weight: var(--waza-weight-bold);
		letter-spacing: 0.02em;
		white-space: nowrap;
		text-decoration: none;
		transition: background 0.15s ease;
	}

	.waza-wa-float a:hover {
		background: var(--waza-gold-hover);
	}

	.waza-wa-float a:focus-visible {
		outline: 2px solid var(--waza-focus);
		outline-offset: 3px;
	}

	.waza-wa-float svg {
		width: 24px;
		height: 24px;
		display: block;
		flex: 0 0 auto;
	}
}

/* Cookie consent bar (Sprint 14, Phase 8; relocated from waza-home.css in
   P11 after the axe gate showed WooCommerce routes never load that sheet,
   so the bar rendered unstyled there — default link colour on white failed
   color-contrast. Palette per the approved design direction in
   docs/SPRINT13-COOKIES.md: navy-deep panel, inverse text, gold Accept,
   ghost Decline, focus token on every control. Desktop shows a bottom-left
   card clear of the bottom-right WhatsApp pill (z40); z45 sits below
   .waza-header (50). Mobile stacks full-width above the fixed WhatsApp bar.
   Body padding comes from body.waza-has-consent (above) driven by
   --waza-consent-h, set by waza-cookie.js before first paint, so CLS stays 0.
   Button rules route through .waza-consent-actions (specificity b=3) so they
   beat WooCommerce's `.woocommerce button.button` (b=2,c=1) on Woo routes;
   style.css is the last stylesheet everywhere, so nothing overrides them. */
.waza-consent[role="region"] {
	position: fixed;
	left: calc(20px + env(safe-area-inset-left, 0px));
	bottom: calc(20px + env(safe-area-inset-bottom, 0px));
	z-index: 45;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--waza-space-16);
	width: min(560px, calc(100vw - 40px));
	padding: var(--waza-space-20) var(--waza-space-24);
	background: var(--waza-navy-deep);
	border: 1px solid rgba(255, 255, 255, 0.06);
	border-radius: 18px;
	box-shadow: var(--waza-shadow-panel);
}

.waza-consent[role="region"][hidden] {
	display: none;
}

.waza-consent-text {
	flex: 1 1 260px;
	margin: 0;
	font-size: var(--waza-size-sm);
	line-height: 1.5;
	color: var(--waza-text-inverse-soft);
}

.waza-consent-text a {
	color: var(--waza-gold);
	text-decoration: underline;
}

.waza-consent-text a:focus-visible {
	outline: 2px solid var(--waza-focus);
	outline-offset: 2px;
}

.waza-consent-actions {
	display: flex;
	gap: var(--waza-space-12);
	margin-left: auto;
}

.waza-consent .waza-consent-actions .button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 12px 22px;
	border-radius: 999px;
	font-weight: var(--waza-weight-bold);
	font-size: var(--waza-size-sm);
	border: 1px solid transparent;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.waza-consent .waza-consent-actions .waza-consent-accept {
	background: var(--waza-accent);
	color: var(--waza-ink) !important;
	border-color: var(--waza-accent);
}

.waza-consent .waza-consent-actions .waza-consent-accept:hover {
	background: var(--waza-button-primary-hover);
}

.waza-consent .waza-consent-actions .waza-consent-decline {
	background: transparent;
	color: var(--waza-text-inverse) !important;
	border-color: rgba(255, 255, 255, 0.45);
}

.waza-consent .waza-consent-actions .waza-consent-decline:hover {
	background: rgba(255, 255, 255, 0.1);
}

.waza-consent .waza-consent-actions .button:focus-visible {
	outline: 2px solid var(--waza-focus);
	outline-offset: 2px;
}

@media (max-width: 720px) {
	.waza-consent[role="region"] {
		left: 0;
		right: 0;
		bottom: calc(56px + env(safe-area-inset-bottom, 0px));
		width: auto;
		max-width: none;
		gap: var(--waza-space-12);
		padding: var(--waza-space-16);
		border-radius: 0;
		border-left: 0;
		border-right: 0;
	}

	.waza-consent-actions {
		width: 100%;
		margin-left: 0;
	}

	.waza-consent .waza-consent-actions .button {
		flex: 1;
	}
}
