/* Hero band at the top of every tool page */
.tool-hero {
  background: var(--pine);
  padding: 48px 0 64px;
  position: relative;
  overflow: hidden;
}
.tool-hero::after {
  content: "";
  position: absolute;
  right: -60px;
  top: -60px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: rgba(201,154,63,0.15);
}
.tool-hero-inner { position: relative; max-width: 1120px; }
.tool-hero-inner > * { max-width: 60ch; }
.tool-hero-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(201,154,63,0.18);
  color: var(--gold);
  margin-bottom: 14px;
}
.tool-hero-icon .icon { width: 24px; height: 24px; }
.tool-hero .section-label { color: var(--gold); }
.tool-hero h1 { color: var(--parchment); font-size: clamp(1.8rem, 3.2vw, 2.4rem); font-weight: 500; }
.tool-hero .tool-intro { color: #C9D6CF; margin: 14px 0 0; font-size: 1rem; }

.tool-page { padding: 0 0 80px; }
.tool-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
  margin-top: -32px;
  position: relative;
}

/* Form card */
.tool-card {
  background: #fff;
  border-radius: 12px;
  padding: 32px;
  box-shadow: 0 16px 40px rgba(23,51,43,0.12);
  border: 1px solid var(--sage-line);
}

.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field-row { margin-bottom: 18px; display: flex; flex-direction: column; gap: 6px; }
.field-row label {
  font-size: 0.88rem;
  color: var(--ink);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}
.field-row input, .field-row select {
  border: 1.5px solid var(--sage-line);
  background: #fff;
  padding: 12px 14px;
  border-radius: 6px;
  font-family: 'Public Sans', sans-serif;
  font-size: 1rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field-row input:focus, .field-row select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,154,63,0.18);
}
.field-hint { color: var(--sage); font-size: 0.8rem; }

.result-destination-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255,255,255,0.1);
  border-radius: 6px;
  padding: 12px 16px;
  margin-bottom: 20px;
}
.result-destination-badge .badge-flag { font-size: 1.8rem; line-height: 1; }
.result-destination-badge .badge-name {
  font-family: 'Fraunces', serif;
  color: var(--parchment);
  font-size: 1.05rem;
  font-weight: 500;
}

/* Button fix: iOS/Safari applies native button chrome by default (appearance: auto),
   which overrides background-color and makes buttons render as plain text links.
   appearance: none turns that off so our styling actually shows. */
button.btn-primary {
  appearance: none;
  -webkit-appearance: none;
  border: none;
  cursor: pointer;
  font-family: 'Public Sans', sans-serif;
}
.btn-full {
  width: 100%;
  margin-top: 10px;
  font-size: 1rem;
  padding: 15px 26px;
  box-shadow: 0 8px 20px rgba(23,51,43,0.25);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn-full:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(23,51,43,0.3); }
.btn-full:active { transform: translateY(0); }

.result-box {
  background: var(--pine);
  color: var(--parchment);
  padding: 32px;
  border-radius: 12px;
  position: sticky;
  top: 24px;
  box-shadow: 0 16px 40px rgba(23,51,43,0.18);
}
.result-box .section-label { color: var(--gold); }
.result-total {
  font-family: 'Fraunces', serif;
  font-size: 3rem;
  font-weight: 500;
  margin-top: 4px;
}
.result-caption { color: #C9D6CF; margin: 0 0 20px; font-size: 0.88rem; }
.result-breakdown { list-style: none; padding: 0; margin: 0 0 16px; border-top: 1px solid rgba(255,255,255,0.15); }
.result-breakdown li {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.15);
  font-size: 0.9rem;
}
.result-per-person { color: #C9D6CF; font-size: 0.9rem; margin: 0 0 28px; }

.cross-sell {
  border-top: 1px dashed rgba(255,255,255,0.3);
  padding-top: 20px;
}
.cross-sell p { font-size: 0.88rem; color: #C9D6CF; margin: 0 0 12px; }
.cross-link {
  display: block;
  color: var(--parchment);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 8px;
}
.cross-link:hover { color: var(--gold); }

@media (max-width: 860px) {
  .tool-layout { grid-template-columns: 1fr; margin-top: -24px; }
  .result-box { position: static; }
  .field-grid { grid-template-columns: 1fr; }
}

/* ============ WHERE TO GO TOOL ============ */
.where-layout {
  margin-top: -32px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.where-form { max-width: 640px; }
.tool-card.where-form:hover { transform: none; border-color: var(--sage-line); box-shadow: 0 16px 40px rgba(23,51,43,0.12); }

.traveller-toggle { display: flex; gap: 8px; flex-wrap: wrap; }
.toggle-btn {
  appearance: none;
  -webkit-appearance: none;
  border: 1.5px solid var(--sage-line);
  background: #fff;
  color: var(--ink);
  padding: 10px 16px;
  border-radius: 999px;
  font-family: 'Public Sans', sans-serif;
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}
.toggle-btn { display: inline-flex; align-items: center; gap: 8px; }
.toggle-btn .icon { width: 17px; height: 17px; }
.field-row label .icon { color: var(--sage); }
.toggle-btn:hover { border-color: var(--gold); }
.toggle-btn.active { background: var(--pine); border-color: var(--pine); color: var(--parchment); }

.where-results-label {
  font-family: 'Fraunces', serif;
  font-style: italic;
  color: var(--sage);
  font-size: 1.05rem;
  margin: 0 0 16px;
}
.where-results-label.secondary { margin-top: 12px; }
.where-empty { color: var(--sage); padding: 20px 0; }

.where-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 8px;
}
.where-card {
  background: #fff;
  border: 1px solid var(--sage-line);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.where-card:hover { box-shadow: 0 12px 28px rgba(23,51,43,0.1); transform: translateY(-2px); }

.where-card-photo { aspect-ratio: 16 / 10; background-size: cover; background-position: center; background-color: var(--sage-line); }
.where-card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.where-card h3 { font-size: 1.1rem; font-weight: 500; margin: 0 0 10px; }
.where-tags { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0 0 12px; }
.where-tags li { font-size: 0.72rem; font-weight: 500; color: var(--pine); background: #F1ECDE; border-radius: 999px; padding: 3px 10px; }
.where-card p { color: var(--sage); font-size: 0.88rem; margin: 0 0 16px; flex: 1; }
.where-card-link { color: var(--pine); font-weight: 600; font-size: 0.85rem; text-decoration: none; }
.where-card-link:hover { color: var(--gold); }

@media (max-width: 860px) {
  .where-grid { grid-template-columns: 1fr; }
}


/* ============ TRIP BUDGET CALCULATOR ============ */
.icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.calc-layout { grid-template-columns: 1.05fr 0.95fr; gap: 40px; }
.tool-card.calc-card { display: block; padding: 28px 28px 20px; }
.tool-card.calc-card:hover { transform: none; border-color: var(--sage-line); box-shadow: 0 16px 40px rgba(23,51,43,0.12); }

.calc-step { margin-bottom: 28px; }
.step-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Fraunces', serif;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--pine);
  margin: 0 0 14px;
}
.step-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--pine);
  color: var(--parchment);
  font-family: 'Public Sans', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Destination tiles */
.dest-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.dest-tile {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  aspect-ratio: 1 / 1.05;
  border: 2px solid transparent;
  border-radius: 10px;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  background-color: var(--sage-line);
  background-size: cover;
  background-position: center;
  color: var(--parchment);
  font-family: 'Public Sans', sans-serif;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  text-align: left;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.dest-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10,20,17,0.78) 0%, rgba(10,20,17,0.1) 60%, rgba(10,20,17,0) 100%);
}
.dest-tile:hover { transform: translateY(-2px); }
.dest-tile:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.dest-tile .tile-name { position: relative; z-index: 1; padding: 8px 9px; font-size: 0.8rem; font-weight: 600; line-height: 1.15; }
.dest-tile .tile-check {
  position: absolute;
  z-index: 1;
  top: 7px;
  right: 7px;
  width: 22px;
  height: 22px;
  padding: 4px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--pine);
  stroke-width: 2.6;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.dest-tile[aria-pressed="true"] { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,154,63,0.25); }
.dest-tile[aria-pressed="true"] .tile-check { opacity: 1; transform: scale(1); }

.dest-tile-custom {
  background: #F1ECDE;
  color: var(--pine);
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 8px;
  padding: 0 10px;
  border-style: dashed;
  border-color: var(--sage-line);
}
.dest-tile-custom::after { display: none; }
.dest-tile-custom .tile-name { padding: 0; position: static; }
.dest-tile-custom > .icon:first-child { width: 22px; height: 22px; color: var(--pine); }
.dest-tile-custom[aria-pressed="true"] { border-style: solid; }

/* Travellers and nights */
.stepper-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.stepper-field label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
}
.stepper {
  display: flex;
  align-items: stretch;
  border: 1.5px solid var(--sage-line);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}
.stepper:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,154,63,0.18); }
.stepper-btn {
  appearance: none;
  -webkit-appearance: none;
  border: none;
  background: #F6F2E8;
  color: var(--pine);
  width: 46px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.stepper-btn:hover { background: #EDE6D3; }
.stepper input {
  flex: 1;
  min-width: 0;
  border: none;
  text-align: center;
  font-family: 'Public Sans', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--pine);
  padding: 12px 4px;
  background: #fff;
  -moz-appearance: textfield;
}
.stepper input::-webkit-outer-spin-button,
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper input:focus { outline: none; }

/* Travel style */
.style-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.style-option { cursor: pointer; display: block; }
.style-option input { position: absolute; opacity: 0; pointer-events: none; }
.style-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  height: 100%;
  padding: 14px 14px;
  border: 1.5px solid var(--sage-line);
  border-radius: 10px;
  background: #fff;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.style-option:hover .style-card { border-color: var(--gold); }
.style-option input:focus-visible + .style-card { outline: 3px solid var(--gold); outline-offset: 2px; }
.style-option input:checked + .style-card {
  border-color: var(--pine);
  background: #F6F2E8;
  box-shadow: inset 0 0 0 1px var(--pine);
}
.style-name { font-weight: 600; font-size: 0.95rem; color: var(--pine); }
.style-desc { font-size: 0.8rem; line-height: 1.35; color: var(--sage); }

/* Fine-tune panel */
.fine-tune { border-top: 1px solid var(--sage-line); padding-top: 4px; margin-bottom: 8px; }
.fine-tune summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  font-weight: 600;
  color: var(--pine);
}
.fine-tune summary::-webkit-details-marker { display: none; }
.summary-main { display: inline-flex; align-items: center; gap: 8px; }
.fine-tune .chevron { transition: transform 0.2s ease; }
.fine-tune[open] .chevron { transform: rotate(180deg); }
.fine-tune > .field-hint { display: block; margin: 0 0 16px; }
.fine-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; padding-bottom: 8px; }
.fine-grid .field-row label svg { color: var(--sage); }
.fine-grid .field-row label { font-size: 0.82rem; line-height: 1.3; }

/* Result panel */
.result-destination-badge .badge-photo {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  background-color: rgba(255,255,255,0.15);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--parchment);
}
.result-destination-badge .badge-text { display: flex; flex-direction: column; gap: 2px; }
.result-destination-badge .badge-meta { color: #C9D6CF; font-size: 0.8rem; }
.result-total { line-height: 1.1; }

.result-bar {
  display: flex;
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255,255,255,0.1);
  margin-bottom: 18px;
  gap: 2px;
}
.bar-seg { display: block; height: 100%; min-width: 0; transition: width 0.3s ease; }
.seg-0 { background: #C99A3E; }
.seg-1 { background: #F1E6C8; }
.seg-2 { background: #5FA38A; }
.seg-3 { background: #9FB3AA; }

.result-breakdown li { align-items: center; }
.li-label { display: inline-flex; align-items: center; gap: 10px; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.li-value { font-weight: 600; }
.li-pct { color: #9DB0A6; font-weight: 400; font-size: 0.78rem; margin-left: 10px; display: inline-block; min-width: 2.4em; text-align: right; }

.result-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 4px 0 20px; }
.result-stats > div { display: flex; flex-direction: column; gap: 2px; }
.stat-value { font-family: 'Fraunces', serif; font-size: 1.5rem; color: var(--parchment); }
.stat-label { color: #C9D6CF; font-size: 0.8rem; }
.result-note { color: #9DB0A6; font-size: 0.78rem; line-height: 1.5; margin: 0 0 22px; }
.cross-tag {
  display: inline-block;
  margin-left: 6px;
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #C9D6CF;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 999px;
  padding: 1px 7px;
  vertical-align: middle;
}

/* Floating total on small screens */
.mobile-total {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
  background: var(--pine);
  color: var(--parchment);
  box-shadow: 0 -8px 24px rgba(10,20,17,0.25);
}
.mobile-total[hidden] { display: none; }
.mobile-total > div { display: flex; flex-direction: column; }
.mobile-total-label { font-size: 0.72rem; color: #C9D6CF; }
.mobile-total-value { font-family: 'Fraunces', serif; font-size: 1.4rem; line-height: 1.1; }
.mobile-total-link {
  color: var(--pine);
  background: var(--gold);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.88rem;
  padding: 10px 16px;
  border-radius: 999px;
}
@media (min-width: 861px) { .mobile-total { display: none !important; } }

@media (max-width: 860px) {
  .calc-layout { grid-template-columns: 1fr; gap: 24px; }
  .tool-card.calc-card { padding: 22px 18px 12px; }
  .dest-tiles { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .dest-tile .tile-name { font-size: 0.68rem; padding: 6px 6px; }
  .dest-tile .tile-check { width: 18px; height: 18px; padding: 3px; top: 5px; right: 5px; }
  .dest-tile-custom { padding: 0 7px; gap: 5px; }
  .style-options { grid-template-columns: 1fr; }
  .style-card { flex-direction: row; align-items: baseline; gap: 10px; padding: 12px 14px; }
  .style-name { min-width: 5.5rem; }
  .fine-grid { grid-template-columns: 1fr; }
  .result-box { padding: 24px 20px; }
  .result-total { font-size: 2.6rem; }
}
