/* =========================================================
   Trip Cost Calculator — scoped styles
   Reuses tokens/utilities from ../css/style.css (--indigo-*,
   --orange-*, --sand-*, --ink-*, --radius-*, --shadow-*, .field,
   .btn, .section, .wrap, .prose, .cta-band, .eyebrow, .reveal)
   ========================================================= */

.calc-hero { padding-bottom: 56px; }

.calc-ai-link { margin-top: 18px; max-width: none; }
.calc-ai-link a {
  color: var(--orange-400);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1.5px solid rgba(245, 154, 61, .4);
  transition: border-color .2s var(--ease);
}
.calc-ai-link a:hover { border-color: var(--orange-400); }

.calc-wrap { max-width: 760px; }

/* Several site-wide classes used in here (.btn, .field, .calc-shell) set
   their own `display`, which — at equal specificity and later in the
   cascade — beats the UA stylesheet's [hidden]{display:none}. Everything
   this page toggles via the hidden attribute lives under .calc-wrap, so
   one blanket rule here keeps every show/hide toggle in calculator.js
   working without having to special-case each element. */
.calc-wrap [hidden] { display: none !important; }

/* ---------- progress ---------- */
.calc-progress { margin-bottom: 32px; }
.calc-progress-label {
  margin: 0 0 10px;
  font-size: .86rem;
  font-weight: 700;
  color: var(--ink-500);
  letter-spacing: .02em;
}
.calc-progress-label span { color: var(--ink-900); }
.calc-progress-track {
  height: 8px;
  border-radius: 999px;
  background: var(--sand-200);
  overflow: hidden;
}
.calc-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--orange-500), var(--orange-600));
  transition: width .35s var(--ease);
}

/* ---------- shell / steps ---------- */
.calc-shell {
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 32px;
}

.calc-step { border: 0; margin: 0; padding: 0; display: none; }
.calc-step.is-active { display: block; animation: calcFadeIn .3s var(--ease); }

@keyframes calcFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.calc-step-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--ink-900);
  font-weight: 700;
  margin: 0 0 20px;
  padding: 0;
}
.calc-step-hint { margin: -12px 0 18px; color: var(--ink-500); font-size: .92rem; }

.calc-step .field-row { margin-bottom: 18px; }
.calc-step .field-row:last-child { margin-bottom: 0; }
.calc-step > .field { margin-bottom: 18px; }
.calc-step > .field:last-child { margin-bottom: 0; }

/* ---------- number stepper ---------- */
.stepper {
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  align-items: stretch;
  border: 1.5px solid var(--sand-200);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--sand-50);
}
.stepper-btn {
  border: 0;
  background: var(--sand-100);
  color: var(--ink-900);
  font-size: 1.3rem;
  font-weight: 700;
  cursor: pointer;
  min-height: 48px;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.stepper-btn:hover { background: var(--indigo-100); color: var(--indigo-700); }
.stepper-btn:active { background: var(--indigo-300); }

.stepper input {
  border: 0;
  background: transparent;
  text-align: center;
  font: inherit;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink-900);
  width: 100%;
  min-width: 0;
  -moz-appearance: textfield;
}
.stepper input:focus { outline: none; background: var(--white); }
.stepper input::-webkit-outer-spin-button,
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ---------- selectable option cards (travel style / mode) ---------- */
.option-cards {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, 1fr);
}
.option-cards-5 { grid-template-columns: repeat(5, 1fr); }

.option-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  padding: 16px 10px;
  border: 1.5px solid var(--sand-200);
  border-radius: var(--radius);
  background: var(--sand-50);
  cursor: pointer;
  transition: border-color .2s var(--ease), background .2s var(--ease), transform .2s var(--ease);
}
.option-card:hover { border-color: var(--indigo-300); background: var(--indigo-100); }
.option-card input {
  position: absolute;
  opacity: 0;
  width: 1px; height: 1px;
  pointer-events: none;
}
.option-card input:checked ~ .option-card-ico,
.option-card input:checked ~ .option-card-title { color: var(--indigo-700); }
.option-card:has(input:checked),
.option-card.is-selected {
  border-color: var(--indigo-700);
  background: var(--indigo-100);
  box-shadow: 0 0 0 3px rgba(59, 42, 156, .16);
}
.option-card input:focus-visible ~ * { outline: 3px solid var(--orange-500); outline-offset: 2px; border-radius: 6px; }

.option-card-ico { font-size: 1.6rem; line-height: 1; }
.option-card-title { font-weight: 700; font-size: .92rem; color: var(--ink-900); }
.option-card-sub { font-size: .74rem; color: var(--ink-500); }

/* ---------- quick pills (food / local transport presets) ---------- */
.quick-pills { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.quick-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1.5px solid var(--sand-200);
  background: var(--white);
  color: var(--ink-700);
  font: inherit;
  font-weight: 600;
  font-size: .9rem;
  cursor: pointer;
  transition: all .2s var(--ease);
}
.quick-pill span { font-weight: 700; font-size: .82rem; color: var(--ink-500); }
.quick-pill:hover { border-color: var(--indigo-500); background: var(--indigo-100); }
.quick-pill.is-active { background: var(--ink-900); border-color: var(--ink-900); color: var(--white); }
.quick-pill.is-active span { color: rgba(255,255,255,.7); }

.calc-custom-field { margin-top: 4px; }

/* ---------- live calculation readout ---------- */
.calc-live {
  margin: 4px 0 0;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  background: var(--teal-100);
  color: var(--teal-700);
  font-weight: 700;
  font-size: .95rem;
  text-align: center;
}

/* ---------- step nav ---------- */
.calc-nav {
  display: flex;
  gap: 14px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--sand-200);
}
.calc-btn-next, .calc-btn-calculate { flex: 1; }
.calc-btn-back { flex: 0 0 auto; }

/* ---------- result ---------- */
.calc-result { margin-top: 48px; }
.calc-result-head { text-align: center; margin-bottom: 28px; }
.calc-route { font-size: clamp(1.6rem, 3.4vw, 2.2rem); margin-bottom: .2em; }
.calc-meta { color: var(--ink-500); font-weight: 600; margin: 0; }

.calc-total-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  background:
    radial-gradient(120% 140% at 85% 0%, rgba(59, 42, 156, .55), transparent 60%),
    var(--indigo-900);
  border-radius: var(--radius-xl);
  padding: 32px;
  margin-bottom: 32px;
  text-align: center;
}
.calc-total-card > div + div { border-left: 1px solid rgba(255,255,255,.16); }
.calc-total-label { margin: 0 0 6px; color: rgba(255,255,255,.62); font-size: .82rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; }
.calc-total-amount {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  font-weight: 700;
  color: var(--white);
}
.calc-total-amount-sm { font-size: clamp(1.3rem, 3.4vw, 1.8rem); color: var(--orange-400); }

.calc-breakdown, .calc-progress-bars, .calc-insights {
  background: var(--white);
  border: 1px solid var(--sand-200);
  border-radius: var(--radius-lg);
  padding: 26px 28px;
  margin-bottom: 24px;
}
.calc-breakdown h3, .calc-progress-bars h3, .calc-insights h3 {
  font-size: 1.1rem;
  margin-bottom: 16px;
}

.breakdown-list { display: grid; gap: 4px; margin: 0; }
.breakdown-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px dashed var(--sand-200);
  font-size: .96rem;
}
.breakdown-row dt { font-weight: 600; color: var(--ink-700); }
.breakdown-row dd { margin: 0; font-weight: 700; color: var(--ink-900); }
.breakdown-total {
  display: flex;
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 2px solid var(--ink-900);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink-900);
}

.progress-bar-row { margin-bottom: 16px; }
.progress-bar-row:last-child { margin-bottom: 0; }
.progress-bar-top { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: .88rem; font-weight: 600; color: var(--ink-700); }
.progress-bar-track { height: 10px; border-radius: 999px; background: var(--sand-100); overflow: hidden; }
.progress-bar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--indigo-500), var(--indigo-700)); }

#insightsList { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
#insightsList li {
  position: relative;
  padding-left: 26px;
  font-size: .95rem;
  color: var(--ink-700);
  line-height: 1.5;
}
#insightsList li::before {
  /* \1F4A1 (light bulb) as a CSS escape — some static servers omit a
     charset on text/css responses, which can mis-decode a literal emoji */
  content: "\1F4A1";
  position: absolute;
  left: 0;
  top: 0;
}

.calc-recommended {
  text-align: center;
  background: var(--orange-100);
  border: 1.5px solid var(--orange-400);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  margin-bottom: 32px;
}
.calc-recommended-label { margin: 0 0 6px; font-weight: 700; color: var(--orange-600); }
.calc-recommended-label span { font-weight: 500; color: var(--ink-500); }
.calc-recommended-amount { margin: 0; font-family: var(--font-display); font-size: 1.8rem; font-weight: 700; color: var(--ink-900); }

.calc-booking-cta { text-align: center; margin-bottom: 32px; }
.calc-booking-cta h3 { font-size: 1.3rem; }
.calc-booking-buttons { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

.calc-result-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.btn-whatsapp {
  --btn-bg: #25d366;
  --btn-fg: #04331a;
  box-shadow: 0 10px 24px -12px rgba(37, 211, 102, .85);
}
.btn-whatsapp:hover { --btn-bg: #20b859; }
.btn-whatsapp svg { width: 18px; height: 18px; }
.calc-copy-feedback {
  text-align: center;
  margin: 12px 0 0;
  font-weight: 700;
  color: var(--teal-700);
  min-height: 1.2em;
}

/* ---------- FAQ accordion ---------- */
.calc-faq-list { display: grid; gap: 12px; }
.faq-item {
  background: var(--white);
  border: 1px solid var(--sand-200);
  border-radius: var(--radius);
  padding: 4px 20px;
}
.faq-item summary {
  padding: 16px 0;
  font-weight: 700;
  color: var(--ink-900);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  flex: 0 0 auto;
  font-size: 1.3rem;
  color: var(--indigo-700);
  transition: transform .2s var(--ease);
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { padding-bottom: 18px; margin: 0; color: var(--ink-700); }

/* ---------- responsive ---------- */
@media (max-width: 720px) {
  .calc-shell { padding: 22px 18px; }
  .field-row { grid-template-columns: 1fr; gap: 14px; }
  .option-cards { grid-template-columns: repeat(2, 1fr); }
  .option-cards-5 { grid-template-columns: repeat(3, 1fr); }
  .calc-total-card { grid-template-columns: 1fr; text-align: center; }
  .calc-total-card > div + div { border-left: 0; border-top: 1px solid rgba(255,255,255,.16); padding-top: 18px; }
  .calc-nav { flex-direction: column-reverse; }
  .calc-btn-back { flex: 1; }
  .calc-booking-buttons .btn,
  .calc-result-actions .btn { width: 100%; }
  .calc-booking-buttons, .calc-result-actions { flex-direction: column; }
}

@media (max-width: 480px) {
  .option-cards-5 { grid-template-columns: repeat(2, 1fr); }
}
