/*
Theme Name: Visit the Americas
Theme URI: https://visitthe-americas.com
Author: Visit the Americas
Description: Mobile-first direct-booking directory theme for stays, tour guides and eSIM. Pairs with the vta-core mu-plugin, which owns the verification state machine. Brand tokens and components are ported 1:1 from the approved mobile prototype.
Version: 0.1.0
Requires at least: 6.5
Requires PHP: 8.0
License: Proprietary
Text Domain: vta
*/

/* =========================================================================
   Design tokens — identical to the approved prototype
   ========================================================================= */
:root {
	--teal: #0f766e;
	--teal-dark: #115e59;
	--sunset: #c2410c;
	--ink: #18181b;
	--muted: #52525b;
	--line: #e4e4e7;
	--line-strong: #71717a; /* interactive control borders — 4.83:1 on #fff (WCAG 3:1 boundary) */
	--placeholder: #71717a; /* placeholder text — 4.83:1 on #fff (WCAG AA) */
	--alt: #f8fafc;
	--radius: 14px;
	--tap: 44px; /* minimum interactive target — do not go below */
}

* { box-sizing: border-box; }

body {
	margin: 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
	background: #fff;
	color: var(--ink);
	font-size: 16px; /* mobile-first guardrail */
	line-height: 1.5;
}

img { max-width: 100%; height: auto; display: block; }

/* Placeholder text was unauthored — the browser default fails AA on white.
   opacity:1 overrides Firefox's default placeholder opacity. */
::placeholder { color: var(--placeholder); opacity: 1; }

a { color: var(--teal); }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
	word-wrap: normal !important;
}

/* =========================================================================
   Header / footer
   ========================================================================= */
.m-header {
	position: sticky; top: 0; z-index: 10;
	display: flex; justify-content: space-between; align-items: center;
	min-height: 64px; padding: 0 16px;
	background: rgba(255,255,255,.97);
	border-bottom: 1px solid var(--line);
}
.m-logo { font-weight: 800; font-size: 17px; text-decoration: none; color: var(--ink); }
.m-logo span { color: var(--teal); }

.m-menu-toggle {
	min-width: var(--tap); min-height: var(--tap);
	background: none; border: none; font-size: 20px; cursor: pointer;
}
.m-nav { display: none; }
.m-nav.is-open {
	display: block;
	position: absolute; top: 64px; left: 0; right: 0;
	background: #fff; border-bottom: 1px solid var(--line); padding: 8px 16px 16px;
}
.m-nav ul { list-style: none; margin: 0; padding: 0; }
.m-nav li { margin: 0; }
.m-nav a {
	display: flex; align-items: center;
	min-height: var(--tap);
	font-weight: 600; text-decoration: none; color: var(--ink);
	border-bottom: 1px solid var(--line);
}
.m-nav a:hover, .m-nav .current-menu-item > a { color: var(--teal); }

.m-footer { background: #0c1f1e; color: #a1a1aa; padding: 22px 16px 30px; font-size: 11.5px; }
.m-footer a { color: #99f6e4; text-decoration: none; }
.m-footer nav ul { list-style: none; padding: 0; margin: 0 0 10px; }
.m-footer nav li { display: inline; margin-right: 10px; }

/* =========================================================================
   Hero + search
   ========================================================================= */
.m-hero {
	background: linear-gradient(150deg, #134e4a, var(--teal) 55%, #f5641e 140%);
	color: #fff; padding: 26px 16px 22px;
}
.m-hero h1 { font-size: 24px; line-height: 1.25; margin: 0 0 8px; }
.m-hero > p { opacity: .93; font-size: 13.5px; margin: 0 0 16px; }

.m-search-tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.m-search-tabs button {
	flex: 1; min-height: var(--tap); /* was 38px — below the guardrail */
	border: none; border-radius: 8px 8px 0 0;
	background: rgba(255,255,255,.16); color: #fff; font-weight: 700; cursor: pointer;
	font-size: 12.5px; padding: 6px 4px; line-height: 1.2;
}
.m-search-tabs button.active { background: #fff; color: var(--teal-dark); }

.m-search-panel {
	background: #fff; color: var(--ink); border-radius: 0 10px 10px 10px;
	padding: 14px; display: grid; gap: 8px;
}
.m-search-panel label {
	font-size: 11px; font-weight: 700; color: var(--muted);
	text-transform: uppercase; letter-spacing: .04em;
}
.m-search-panel input, .m-search-panel select {
	width: 100%; min-height: var(--tap); padding: 10px 12px;
	border: 1px solid var(--line-strong); border-radius: 10px; font-size: 15px;
}

.trust-row { display: flex; flex-wrap: wrap; gap: 6px 10px; margin-top: 14px; font-size: 11.5px; font-weight: 700; }
.trust-row span { background: rgba(255,255,255,.14); border-radius: 999px; padding: 6px 10px; }

/* Affiliate fallback — disclosure is required next to the link (FTC/ASA) */
.affiliate-fallback { text-align: center; margin-top: 10px; }
.affiliate-fallback a {
	min-height: var(--tap); display: inline-flex; align-items: center;
	color: var(--teal); font-weight: 700; font-size: 13.5px;
}
.affiliate-fallback small { display: block; color: var(--muted); font-size: 10.5px; font-weight: 500; }

/* =========================================================================
   Sections
   ========================================================================= */
.m-section { padding: 22px 16px; }
.m-section.alt { background: var(--alt); }
.m-section h2 { font-size: 19px; margin: 0 0 6px; }
.m-sub { color: var(--muted); font-size: 13px; margin: 0 0 14px; }

.m-region-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.m-region {
	display: flex; flex-direction: column; gap: 2px;
	min-height: var(--tap); padding: 12px;
	border: 1px solid var(--line); border-radius: var(--radius);
	background: #fff; text-decoration: none; color: var(--ink); font-size: 22px;
}
.m-region b { font-size: 13.5px; }
.m-region small { color: var(--muted); font-size: 11.5px; }

/* =========================================================================
   Cards
   ========================================================================= */
.m-card {
	border: 1px solid var(--line); border-radius: var(--radius);
	overflow: hidden; background: #fff; margin-bottom: 14px;
}
.m-card-img {
	position: relative; height: 150px;
	display: flex; align-items: flex-end; justify-content: flex-end; padding: 10px;
	background: var(--alt); background-size: cover; background-position: center;
}
.m-card-body { padding: 14px; }
.m-card-body h3 { margin: 0 0 4px; font-size: 15.5px; }
.m-card-body h3 a { color: inherit; text-decoration: none; }
.m-meta { color: var(--muted); font-size: 12.5px; margin: 0 0 10px; }

.price {
	background: #fff; color: var(--teal-dark); font-weight: 800;
	border-radius: 999px; padding: 6px 12px; font-size: 15px;
}
.price small { font-weight: 600; color: var(--muted); }

.badge {
	position: absolute; top: 10px; left: 10px;
	background: #ccfbf1; color: var(--teal-dark);
	font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em;
	border-radius: 999px; padding: 4px 10px;
}
.badge-verified { background: #fef3c7; color: #92400e; }
.badge-pending  { background: #e0e7ff; color: #3730a3; }
.badge-ad       { background: #e4e4e7; color: var(--muted); }

/* Badges rendered inline (single pages) aren't absolutely positioned */
.m-card-body .badge, .vta-inline-badge .badge { position: static; display: inline-block; }

/* =========================================================================
   Buttons — every one at or above --tap
   ========================================================================= */
.cta {
	display: inline-flex; align-items: center; justify-content: center; gap: 6px;
	min-height: var(--tap); padding: 8px 18px;
	border: none; border-radius: 10px;
	font-weight: 700; font-size: 14px; cursor: pointer; text-decoration: none;
}
.cta-sunset { background: var(--sunset); color: #fff; }
.cta-teal   { background: var(--teal); color: #fff; }
.cta-ghost  { background: #fff; border: 1.5px solid var(--teal); color: var(--teal); }
.btn-block  { display: flex; width: 100%; margin-top: 8px; }

.linklike {
	display: inline-flex; align-items: center;
	min-height: var(--tap); /* was 18px — the worst offender */
	background: none; border: none; color: var(--teal);
	font-weight: 700; cursor: pointer; font-size: 13.5px;
}

:focus-visible { outline: 3px solid var(--sunset); outline-offset: 2px; }

/* =========================================================================
   eSIM band, strips, ads, partner blocks
   ========================================================================= */
.m-esim { background: linear-gradient(120deg, #134e4a, var(--teal)); color: #fff; border-radius: var(--radius); padding: 20px; }
.m-esim h2 { color: #fff; font-size: 18px; }
.m-esim ul { margin: 0 0 14px; padding-left: 18px; font-size: 13px; }
.m-esim li { margin-bottom: 6px; }

.m-strip {
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
	border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; background: #fff;
}
.m-strip small { color: var(--muted); }

.m-adbox {
	border: 1.5px dashed #cbd5e1; border-radius: var(--radius);
	color: var(--muted); font-size: 12px; text-align: center; padding: 26px 12px; margin-bottom: 14px;
}

.m-partner {
	border: 1px solid var(--line); border-left: 4px solid var(--sunset);
	border-radius: 10px; padding: 14px; background: #fff; margin-bottom: 12px;
}
.m-partner p { color: var(--muted); font-size: 13px; margin: 4px 0 6px; }

/* =========================================================================
   Forms / wizard (used by the onboarding wizards built later)
   ========================================================================= */
.wizard { padding-bottom: 30px; }
.wiz-progress { height: 5px; background: var(--line); margin: 6px 16px 10px; border-radius: 99px; overflow: hidden; }
.wiz-bar { height: 100%; width: 0; background: var(--sunset); transition: width .25s ease; }
.wizard[data-wizard="guide"] .wiz-bar { background: var(--teal); }
.wiz-step { padding: 0 16px 24px; }
.wiz-step h2 { font-size: 20px; margin: 4px 0 12px; }
.benefits { margin: 0 0 14px; padding-left: 18px; font-size: 13.5px; }
.benefits li { margin-bottom: 9px; }
.wiz-nav { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; margin-top: 8px; }

.fld { display: grid; gap: 5px; font-size: 12.5px; font-weight: 700; color: var(--muted); margin-bottom: 12px; }
.fld input, .fld select, .fld textarea {
	min-height: var(--tap); padding: 10px 12px; font-size: 15px;
	border: 1px solid var(--line-strong); border-radius: 10px; background: #fff; color: var(--ink); font-weight: 500;
	width: 100%;
}
.fld textarea { min-height: 110px; }
.fld small { font-weight: 500; color: var(--muted); }
.fld-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.radio { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; margin: 10px 0; min-height: var(--tap); }
.radio input { width: 24px; height: 24px; min-width: 24px; margin-top: 1px; accent-color: var(--teal); }

.tag-select { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.tag {
	min-height: var(--tap); /* was 38px */
	display: inline-flex; align-items: center;
	padding: 6px 14px; border: 1.5px solid var(--line-strong); border-radius: 999px;
	font-size: 13px; font-weight: 600; cursor: pointer; background: #fff;
}
.tag.on { background: var(--teal); border-color: var(--teal); color: #fff; }

.plan { border: 1.5px solid var(--line-strong); border-radius: var(--radius); padding: 14px; margin-bottom: 12px; position: relative; }
.plan p { color: var(--muted); font-size: 13px; margin: 4px 0 0; }
.plan-featured { border-color: var(--teal); }

.how-we-earn {
	background: var(--alt); border: 1px solid var(--line);
	border-left: 4px solid var(--sunset); border-radius: 10px;
	padding: 14px; margin-bottom: 14px; font-size: 13px; line-height: 1.5;
}

/* =========================================================================
   Single listing pages
   ========================================================================= */
.vta-single { padding-bottom: 40px; }
.vta-hero-img { width: 100%; height: 220px; background: var(--alt); background-size: cover; background-position: center; }
.vta-single-body { padding: 18px 16px; }
.vta-single-body h1 { font-size: 22px; margin: 0 0 6px; }
.vta-facts { list-style: none; padding: 0; margin: 0 0 16px; font-size: 13.5px; }
.vta-facts li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.vta-facts b { color: var(--muted); font-weight: 700; }

.vta-offplatform {
	border: 1px solid var(--line); border-left: 4px solid var(--teal);
	border-radius: 10px; padding: 14px; background: var(--alt);
	font-size: 12.5px; color: var(--muted); margin-top: 16px;
}

/* =========================================================================
   WordPress core alignment classes
   ========================================================================= */
.alignleft { float: left; margin: 0 1em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1em; }
.aligncenter { margin: 1em auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 12px; color: var(--muted); }

/* =========================================================================
   Larger screens
   ========================================================================= */
@media (min-width: 760px) {
	.m-menu-toggle { display: none; }
	.m-nav { display: block; }
	.m-nav.is-open { position: static; border: none; padding: 0; }
	.m-nav ul { display: flex; gap: 18px; }
	.m-nav a { border-bottom: none; min-height: auto; font-size: 14px; }
	.m-hero { padding: 42px 32px 34px; }
	.m-hero h1 { font-size: 34px; max-width: 22em; }
	.m-section { padding: 34px 32px; }
	.m-card-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
	.m-region-grid { grid-template-columns: repeat(4, 1fr); }
	.vta-hero-img { height: 380px; border-radius: var(--radius); }
	.vta-single-body { max-width: 760px; margin: 0 auto; }
}

@media (prefers-reduced-motion: reduce) {
	.wiz-bar { transition: none; }
}


/* -------------------------------------------------------------------------
 * Region intro (region archives only).
 *
 * The country list and the video share the first screen: .m-region-intro is a
 * flex column one viewport tall (minus the sticky header), and the video slot is
 * flex: 1 — so the clip takes up whatever height is left below the country list,
 * at every screen size, with no hard-coded offset and no JS measuring.
 * min-height keeps it substantial when the intro alone already fills the screen.
 * ---------------------------------------------------------------------- */
.m-region-intro {
	display: flex;
	flex-direction: column;
	min-height: calc(100svh - var(--vta-header-h, 64px));
}
.m-video-section { flex: 1 1 auto; display: flex; flex-direction: column; padding-bottom: 0; }
.m-video-embed {
	flex: 1 1 auto;
	display: flex;
	min-height: 120px;
	overflow: hidden;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--teal-900, #134e4a);
}
.m-video-embed > * { flex: 1 1 auto; width: 100%; }
.m-video-el { border: 0; display: block; object-fit: cover; }
.m-video-placeholder {
	flex: 1 1 auto;
	min-height: 0;          /* flex items default to min-height:auto, which made the
	                           placeholder's own content the real floor */
	display: flex; flex-direction: column; align-items: center; justify-content: center;
	gap: 4px; padding: 10px 16px; text-align: center; color: #fff; overflow: hidden;
	background:
		radial-gradient(120% 120% at 50% 0%, rgba(15, 118, 110, .55), rgba(12, 31, 30, .92)),
		repeating-linear-gradient(45deg, rgba(255, 255, 255, .04) 0 12px, transparent 12px 24px);
}
.m-video-play {
	width: 44px; height: 44px; line-height: 46px; flex: 0 0 auto;
	border-radius: 50%; margin-bottom: 2px;
	background: var(--sunset, #c2410c); color: #fff; font-size: 18px; text-indent: 4px;
}
.m-video-placeholder b { font-size: 15px; }
.m-video-placeholder small { opacity: .85; font-size: 11.5px; max-width: 30em; }
@media (max-width: 640px) {
	.m-video-embed { min-height: 120px; }
}
/* Short viewports: keep the slot as the remainder of the screen, drop the
   supporting line rather than forcing the page to scroll. */
@media (max-height: 700px) {
	.m-video-placeholder small { display: none; }
}
