/* ==========================================================================
   AMPA San Blas trip cost calculator
   Tokens mirror the live theme (DESIGN.md, inspected 2026-09-16). Everything is
   scoped under .ampa-calc so it can sit inside a blog post or a page template
   without touching the rest of the site.
   ========================================================================== */
.ampa-calc {
	--midnight: #0a0e14;
	--midnight-2: #121822;
	--ivory: #f5f0e8;
	--parchment: #faf8f4;
	--white: #ffffff;
	--caribbean: #6ec1e4;
	--deep-water: #4da8cc;
	--ink: #1a1a1a;
	--stone: #5a5a5a;
	--driftwood: #6b6b6b;
	--border: #e8e3db;
	--gold: #d4a853;
	--wa: #188845;
	--wa-hover: #14753b;
	--serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
	--sans: 'Libre Franklin', -apple-system, 'Helvetica Neue', sans-serif;
	--ease: 300ms cubic-bezier(0.25, 0.46, 0.45, 0.94);

	font-family: var(--sans);
	color: var(--ink);
	background: var(--parchment);
	padding: 96px 24px 120px;
	counter-reset: ac-step;
	-webkit-font-smoothing: antialiased;
}
.ampa-calc *, .ampa-calc *::before, .ampa-calc *::after { box-sizing: border-box; }
.ampa-calc [hidden] { display: none !important; }

/* -- Head ------------------------------------------------------------------ */
.ac-head { max-width: 1160px; margin: 0 auto 56px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 380px); gap: 48px; align-items: end; }
.ac-eyebrow { font-size: 10px; font-weight: 600; letter-spacing: 3px; text-transform: uppercase; color: var(--driftwood); margin: 0 0 18px; }
.ac-title { font-family: var(--serif); font-weight: 300; font-size: clamp(2.4rem, 5vw, 3.6rem); line-height: 1.05; margin: 0; color: var(--midnight); text-wrap: balance; }
.ac-title em { font-style: italic; font-weight: 300; }
.ac-lede { font-size: 15px; font-weight: 300; line-height: 1.75; color: var(--stone); margin: 0; }
.ac-lede strong { font-weight: 500; color: var(--ink); }

/* -- Layout ---------------------------------------------------------------- */
.ac-grid { max-width: 1160px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 56px; align-items: start; }
.ac-form { display: grid; gap: 0; min-width: 0; }

/* -- Steps ----------------------------------------------------------------- */
.ac-step { border: 0; margin: 0; padding: 36px 0; border-top: 1px solid var(--border); min-width: 0; counter-increment: ac-step; }
.ac-step:first-child { border-top: 0; padding-top: 0; }
.ac-step > legend { float: left; width: 100%; padding: 0; margin: 0 0 22px; display: flex; align-items: baseline; gap: 14px; }
.ac-step > legend + * { clear: both; }
.ac-step > legend::before {
	content: counter(ac-step, decimal-leading-zero);
	font-family: var(--serif); font-size: 15px; font-style: italic; color: var(--deep-water);
	min-width: 22px;
}
.ac-step-title { font-family: var(--serif); font-size: 1.65rem; font-weight: 400; line-height: 1.2; color: var(--midnight); }
.ac-step-hint { margin: -6px 0 18px 0; font-size: 13px; line-height: 1.6; color: var(--driftwood); }

/* -- Trip type tiles ------------------------------------------------------- */
.ac-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.ac-tile { position: relative; display: block; cursor: pointer; border-radius: 8px; overflow: hidden; aspect-ratio: 4 / 5; background: var(--midnight); isolation: isolate; }
.ac-tile input { position: absolute; opacity: 0; pointer-events: none; }
.ac-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .78; transition: transform 900ms cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity var(--ease); z-index: -1; }
.ac-tile::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,14,20,0) 30%, rgba(10,14,20,.88) 100%); z-index: -1; }
.ac-tile:hover img { transform: scale(1.04); opacity: .9; }
.ac-tile-body { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 18px 20px; color: var(--white); }
.ac-tile-kicker { display: block; font-size: 10px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; color: rgba(255,255,255,.72); margin-bottom: 6px; }
.ac-tile-name { display: block; font-family: var(--serif); font-size: 1.55rem; line-height: 1.1; }
.ac-tile-from { display: block; margin-top: 10px; font-size: 12px; font-weight: 300; color: rgba(255,255,255,.82); font-variant-numeric: tabular-nums; }
.ac-tile-mark { position: absolute; top: 14px; right: 14px; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.7); display: grid; place-items: center; transition: background var(--ease), border-color var(--ease); }
.ac-tile-mark::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--midnight); transform: scale(0); transition: transform var(--ease); }
.ac-tile input:checked ~ .ac-tile-mark { background: var(--caribbean); border-color: var(--caribbean); }
.ac-tile input:checked ~ .ac-tile-mark::after { transform: scale(1); }
.ac-tile:has(input:checked) { box-shadow: 0 0 0 2px var(--parchment), 0 0 0 3.5px var(--caribbean); }
.ac-tile:has(input:focus-visible) { outline: 2px solid var(--deep-water); outline-offset: 4px; }

/* -- Steppers -------------------------------------------------------------- */
.ac-counters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.ac-counter { background: var(--white); border: 1px solid var(--border); border-radius: 8px; padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.ac-counter-label { font-size: 14px; font-weight: 500; color: var(--ink); line-height: 1.35; }
.ac-counter-label small { display: block; font-size: 12px; font-weight: 300; color: var(--driftwood); margin-top: 2px; }
.ac-stepper { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.ac-stepper button { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--border); background: var(--parchment); color: var(--midnight); font-size: 18px; line-height: 1; cursor: pointer; display: grid; place-items: center; transition: border-color var(--ease), background var(--ease); }
.ac-stepper button:hover:not(:disabled) { border-color: var(--midnight); background: var(--white); }
.ac-stepper button:disabled { opacity: .3; cursor: default; }
.ac-stepper button:focus-visible { outline: 2px solid var(--deep-water); outline-offset: 2px; }
.ac-stepper output { min-width: 40px; text-align: center; font-family: var(--serif); font-size: 1.7rem; line-height: 1; font-variant-numeric: lining-nums tabular-nums; }

/* -- Chips (season, filters) ----------------------------------------------- */
.ac-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ac-chip { position: relative; cursor: pointer; }
.ac-chip input { position: absolute; opacity: 0; pointer-events: none; }
.ac-chip span { display: inline-block; padding: 10px 16px; border: 1px solid var(--border); border-radius: 2px; background: var(--white); font-size: 13px; color: var(--stone); transition: all var(--ease); }
.ac-chip:hover span { border-color: var(--driftwood); color: var(--ink); }
.ac-chip input:checked + span { background: var(--midnight); border-color: var(--midnight); color: var(--white); }
.ac-chip input:focus-visible + span { outline: 2px solid var(--deep-water); outline-offset: 2px; }
.ac-note { margin: 14px 0 0; font-size: 13px; line-height: 1.6; color: var(--stone); padding-left: 14px; border-left: 2px solid var(--caribbean); }
.ac-note:empty { display: none; }

/* -- Option list (boats, cabins, transport) -------------------------------- */
.ac-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.ac-list { display: grid; gap: 10px; }
.ac-option { position: relative; display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 10px 18px 10px 10px; background: var(--white); border: 1px solid var(--border); border-radius: 8px; cursor: pointer; transition: border-color var(--ease), box-shadow var(--ease), transform var(--ease); }
.ac-option:hover { box-shadow: 0 8px 32px rgba(10,14,20,.08); transform: translateY(-1px); }
.ac-option input { position: absolute; opacity: 0; pointer-events: none; }
.ac-option:has(input:checked) { border-color: var(--midnight); box-shadow: inset 0 0 0 1px var(--midnight); }
.ac-option:has(input:focus-visible) { outline: 2px solid var(--deep-water); outline-offset: 2px; }
.ac-option[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.ac-option-img { width: 96px; height: 72px; border-radius: 4px; object-fit: cover; background: var(--ivory); display: block; }
.ac-option-name { font-family: var(--serif); font-size: 1.3rem; line-height: 1.15; color: var(--midnight); display: block; }
.ac-option-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 5px; font-size: 12px; color: var(--driftwood); }
.ac-option-meta b { font-weight: 500; color: var(--stone); }
.ac-badge { display: inline-block; font-size: 9.5px; font-weight: 600; letter-spacing: 1.6px; text-transform: uppercase; padding: 3px 7px; border-radius: 2px; border: 1px solid var(--border); color: var(--stone); background: var(--parchment); }
.ac-badge--ac { border-color: rgba(77,168,204,.45); color: #2c7f9e; background: rgba(110,193,228,.1); }
.ac-badge--soon { border-color: var(--midnight); color: var(--white); background: var(--midnight); }
.ac-option-price { text-align: right; font-variant-numeric: tabular-nums; }
.ac-option-price strong { display: block; font-family: var(--serif); font-size: 1.45rem; font-weight: 500; line-height: 1; color: var(--midnight); }
.ac-option-price small { display: block; margin-top: 4px; font-size: 11px; color: var(--driftwood); white-space: nowrap; }
.ac-option-flag { grid-column: 2 / -1; margin: -4px 0 2px; font-size: 12px; line-height: 1.5; color: #8a6d2b; }
.ac-option--text { grid-template-columns: minmax(0, 1fr) auto; padding: 16px 18px; }
.ac-more { margin-top: 14px; background: none; border: 0; padding: 6px 0; font: inherit; font-size: 13px; color: var(--midnight); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--caribbean); cursor: pointer; }
.ac-empty { padding: 22px; border: 1px dashed var(--border); border-radius: 8px; font-size: 14px; color: var(--stone); line-height: 1.6; }

.ac-field { display: grid; gap: 8px; }
.ac-field label { font-size: 13px; font-weight: 500; color: var(--ink); }
.ac-field input { font: inherit; font-size: 15px; padding: 13px 14px; border: 1px solid var(--border); border-radius: 3px; background: var(--white); color: var(--ink); }
.ac-field input:focus { outline: 2px solid var(--deep-water); outline-offset: 0; border-color: transparent; }

/* -- The ledger (signature) ------------------------------------------------ */
.ac-ledger { position: sticky; top: 96px; background: var(--midnight); color: var(--white); border-radius: 8px; padding: 34px 32px 30px; overflow: hidden; }
.ac-ledger::before {
	/* faint horizon lines, like ruled log paper */
	content: ''; position: absolute; inset: 0; pointer-events: none;
	background: repeating-linear-gradient(180deg, transparent 0 31px, rgba(255,255,255,.028) 31px 32px);
}
.ac-ledger > * { position: relative; }
.ac-ledger-kicker { display: flex; justify-content: space-between; align-items: baseline; font-size: 10px; font-weight: 600; letter-spacing: 3px; text-transform: uppercase; color: rgba(255,255,255,.55); margin: 0 0 18px; }
.ac-ledger-kicker span:last-child { letter-spacing: 1px; text-transform: none; font-weight: 300; font-style: italic; font-family: var(--serif); font-size: 13px; }
.ac-ledger-trip { font-family: var(--serif); font-size: 1.6rem; line-height: 1.2; margin: 0 0 4px; }
.ac-ledger-sub { font-size: 12.5px; font-weight: 300; color: rgba(255,255,255,.62); margin: 0 0 26px; }
.ac-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 13px; font-variant-numeric: tabular-nums; }
.ac-line { display: grid; grid-template-columns: auto minmax(12px, 1fr) auto; align-items: baseline; gap: 8px; font-size: 13.5px; font-weight: 300; line-height: 1.4; }
.ac-line::before { content: ''; order: 2; border-bottom: 1px dotted rgba(255,255,255,.28); transform: translateY(-4px); }
.ac-line-label { order: 1; color: rgba(255,255,255,.86); }
.ac-line-label small { display: block; font-size: 11.5px; color: rgba(255,255,255,.5); }
.ac-line-amt { order: 3; color: var(--white); }
.ac-line--muted .ac-line-amt { color: rgba(255,255,255,.55); font-style: italic; font-family: var(--serif); font-size: 15px; }
.ac-line--plus .ac-line-amt { color: var(--gold); }
.ac-rule { height: 1px; background: linear-gradient(90deg, var(--gold), rgba(212,168,83,.15)); margin: 24px 0 18px; border: 0; }
.ac-total { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.ac-total-label { font-size: 10px; font-weight: 600; letter-spacing: 3px; text-transform: uppercase; color: rgba(255,255,255,.55); }
.ac-total-amt { font-family: var(--serif); font-weight: 300; font-size: clamp(2.6rem, 4vw, 3.4rem); line-height: 1; letter-spacing: -0.5px; font-variant-numeric: lining-nums tabular-nums; }
.ac-pp { margin: 8px 0 0; text-align: right; font-size: 12.5px; font-weight: 300; color: rgba(255,255,255,.62); font-variant-numeric: tabular-nums; }
.ac-cashnote { margin: 18px 0 0; font-size: 12px; line-height: 1.6; color: rgba(255,255,255,.55); }
.ac-flags { margin: 18px 0 0; padding: 14px 16px; border: 1px solid rgba(212,168,83,.35); border-radius: 4px; font-size: 12.5px; line-height: 1.6; color: rgba(255,255,255,.82); display: grid; gap: 8px; }
.ac-flags:empty { display: none; }
.ac-cta { margin-top: 26px; display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 52px; padding: 16px 20px; border-radius: 2px; background: var(--wa); color: var(--white); text-decoration: none; font-size: 12.5px; font-weight: 600; letter-spacing: 1.4px; text-transform: uppercase; transition: background var(--ease); }
.ac-cta:hover { background: var(--wa-hover); color: var(--white); }
.ac-cta:focus-visible { outline: 2px solid var(--caribbean); outline-offset: 3px; }
.ac-cta svg { width: 18px; height: 18px; flex-shrink: 0; }
.ac-fine { margin: 14px 0 0; font-size: 11.5px; line-height: 1.6; color: rgba(255,255,255,.45); text-align: center; }
.ac-incl { margin: 22px 0 0; padding: 18px 0 0; border-top: 1px solid rgba(255,255,255,.1); }
.ac-incl p { margin: 0 0 8px; font-size: 10px; font-weight: 600; letter-spacing: 2.5px; text-transform: uppercase; color: rgba(255,255,255,.45); }
.ac-incl ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; font-size: 12.5px; font-weight: 300; color: rgba(255,255,255,.78); }
.ac-incl li::before { content: '\2013\00a0'; color: var(--caribbean); }
.ac-bump { animation: acBump 520ms var(--ease, ease); }
@keyframes acBump { 0% { opacity: .35; transform: translateY(6px); } 100% { opacity: 1; transform: none; } }

/* -- Mobile summary bar ---------------------------------------------------- */
.ac-bar { display: none; }
body.ampa-calc-bar-on .ampa-contact-bar { display: none !important; }

/* -- Responsive ------------------------------------------------------------ */
@media (max-width: 1024px) {
	.ac-grid { grid-template-columns: minmax(0, 1fr) 340px; gap: 36px; }
	.ac-ledger { padding: 28px 24px 24px; }
}
@media (max-width: 860px) {
	.ampa-calc { padding: 64px 16px 140px; }
	.ac-head { grid-template-columns: 1fr; gap: 18px; margin-bottom: 36px; }
	.ac-grid { grid-template-columns: 1fr; gap: 40px; }
	.ac-ledger { position: relative; top: 0; }
	.ac-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
	.ac-tile { aspect-ratio: 3 / 4; }
	.ac-tile-body { padding: 12px 12px 14px; }
	.ac-tile-name { font-size: 1.2rem; }
	.ac-tile-kicker { font-size: 9px; letter-spacing: 1.5px; }
	.ac-bar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; align-items: center; gap: 12px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: rgba(10,14,20,.97); backdrop-filter: blur(12px); color: var(--white); transform: translateY(110%); transition: transform var(--ease); }
	.ac-bar.is-on { transform: none; }
	.ac-bar-total { flex: 1; min-width: 0; }
	.ac-bar-total small { display: block; font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: rgba(255,255,255,.55); }
	.ac-bar-total strong { font-family: var(--serif); font-weight: 400; font-size: 1.7rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
	.ac-bar a { flex-shrink: 0; padding: 12px 14px; border-radius: 2px; font-size: 11px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; text-decoration: none; }
	.ac-bar-see { color: var(--white); border: 1px solid rgba(255,255,255,.35); }
	.ac-bar-wa { background: var(--wa); color: var(--white); }
}
@media (max-width: 560px) {
	.ac-counters { grid-template-columns: 1fr; }
	.ac-option { grid-template-columns: 72px minmax(0, 1fr); gap: 12px; }
	.ac-option-img { width: 72px; height: 60px; }
	.ac-option-price { grid-column: 2; text-align: left; display: flex; align-items: baseline; gap: 8px; }
	.ac-option-price small { margin: 0; }
	.ac-option--text { grid-template-columns: 1fr; }
	.ac-option--text .ac-option-price { grid-column: 1; }
	.ac-tile-from { display: none; }
	.ac-tile-kicker { display: none; }
	.ac-tile { aspect-ratio: 4 / 5; }
}
@media (prefers-reduced-motion: reduce) {
	.ampa-calc *, .ampa-calc *::before, .ampa-calc *::after { transition: none !important; animation: none !important; }
}

/* -- Shield ------------------------------------------------------------------
   The Elementor kit (post-4.css, loaded only for logged-in users) styles every button,
   link and h2 on the page at up to (0,2,1), and the base theme reset gives buttons a pink
   hover and focus. These restate ours at (0,2,1) or higher, after them in the cascade,
   so the calculator looks the same for every viewer in every state. */
.ampa-calc { font-size: 16px; line-height: 1.5; }
.ampa-calc h2.ac-title { font-family: var(--serif); font-weight: 300; font-size: clamp(2.4rem, 5vw, 3.6rem); line-height: 1.05; letter-spacing: normal; word-spacing: normal; }
.ampa-calc .ac-stepper button,
.ampa-calc button.ac-more { font-family: var(--sans); font-weight: 400; text-transform: none; letter-spacing: normal; word-spacing: normal; text-shadow: none; box-shadow: none; }
.ampa-calc .ac-stepper button { width: 38px; height: 38px; padding: 0; border: 1px solid var(--border); border-radius: 50%; background-color: var(--parchment); color: var(--midnight); font-size: 18px; line-height: 1; }
.ampa-calc .ac-stepper button:hover:not(:disabled) { border-color: var(--midnight); background-color: var(--white); }
.ampa-calc button.ac-more { background-color: transparent; border: 0; border-radius: 0; padding: 6px 0; color: var(--midnight); font-size: 13px; line-height: 1.4; }
.ampa-calc a.ac-cta { font-family: var(--sans); font-size: 12.5px; font-weight: 600; line-height: 1.35; letter-spacing: 1.4px; word-spacing: normal; }
.ampa-calc .ac-bar a { font-family: var(--sans); line-height: 1.3; word-spacing: normal; }
