/* Trip Wizard — first-run setup overlay + compact trip editor. */

.wiz-open-btn {
  position: fixed;
  top: calc(12px + env(safe-area-inset-top));
  right: calc(12px + env(safe-area-inset-right));
  z-index: 60;
  min-width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 0;
  overflow: hidden;
  background: rgba(255, 250, 243, 0.82);
  color: #173847;
  border: 1px solid rgba(23, 56, 71, 0.14);
  border-radius: 999px;
  padding: 0 13px;
  box-shadow: 0 10px 28px rgba(15, 27, 45, 0.16);
  cursor: pointer;
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  transition: transform .2s ease, background .2s ease, border-color .2s ease, padding .2s ease, gap .2s ease;
}
.wiz-open-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-width: 1.8; }
.wiz-open-label {
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  font: 600 13px/1 "Space Grotesk", system-ui, sans-serif;
  letter-spacing: .01em;
  white-space: nowrap;
  transition: max-width .2s ease, opacity .16s ease;
}
@media (hover: hover) {
  .wiz-open-btn:hover,
  .wiz-open-btn:focus-visible { gap: 8px; padding-right: 16px; background: rgba(255, 250, 243, 0.96); border-color: rgba(31, 107, 122, .38); transform: translateY(-2px); }
  .wiz-open-btn:hover .wiz-open-label,
  .wiz-open-btn:focus-visible .wiz-open-label { max-width: 80px; opacity: 1; }
}
.wiz-open-btn:active { transform: scale(.96); }
.wiz-open-btn:focus-visible { outline: 3px solid rgba(31, 107, 122, .35); outline-offset: 3px; }

.wiz-scrim {
  position: fixed;
  inset: 0;
  background: rgba(15, 15, 18, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 100;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 6vh 16px 24px;
  overflow-y: auto;
}
.wiz-scrim.is-open { display: flex; }

.wiz-card {
  width: 100%;
  max-width: 560px;
  background: #fffaf3;
  border-radius: 22px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.35);
  padding: 30px 28px 26px;
  font-family: "Space Grotesk", system-ui, sans-serif;
  color: #1a1a1c;
  position: relative;
}
.wiz-card h2 {
  font-family: "Fraunces", serif;
  font-weight: 700;
  font-size: 28px;
  line-height: 1.15;
  margin: 4px 0 6px;
  letter-spacing: -0.01em;
}
.wiz-card .wiz-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 11px;
  color: #8a7a5f;
  font-weight: 600;
}
.wiz-card .wiz-sub {
  color: #5b5548;
  font-size: 14px;
  line-height: 1.5;
  margin: 6px 0 20px;
}

.wiz-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: 0;
  font-size: 22px;
  color: #7a6a55;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
}
.wiz-close:hover { color: #1a1a1c; }

.wiz-step { display: none; }
.wiz-step.is-active { display: block; }

.wiz-field {
  display: block;
  margin: 14px 0;
}
.wiz-field > label {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #7a6a55;
  margin-bottom: 6px;
  font-weight: 600;
}
.wiz-input, .wiz-select {
  width: 100%;
  padding: 11px 12px;
  border: 1.5px solid #e2d8c5;
  border-radius: 10px;
  background: #fff;
  font: 500 15px/1.3 "Space Grotesk", system-ui, sans-serif;
  color: #1a1a1c;
  box-sizing: border-box;
}
.wiz-textarea {
  min-height: 86px;
  resize: vertical;
}
.wiz-input:focus, .wiz-select:focus {
  outline: none;
  border-color: #b18a4f;
  box-shadow: 0 0 0 3px rgba(177,138,79,0.15);
}
.wiz-help {
  margin: 6px 2px 0;
  color: #7a6a55;
  font-size: 12px;
  line-height: 1.4;
}

.wiz-row {
  display: flex;
  gap: 12px;
}
.wiz-row > .wiz-field { flex: 1; margin: 14px 0; }

.wiz-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1.5px solid #e2d8c5;
  border-radius: 10px;
  cursor: pointer;
  background: #fff;
}
.wiz-toggle input { accent-color: #b18a4f; width: 18px; height: 18px; }
.wiz-toggle span { font-weight: 500; font-size: 14px; }

.wiz-ages {
  display: none;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.wiz-ages.is-visible { display: flex; }
.wiz-age-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1.5px solid #e2d8c5;
  border-radius: 999px;
  background: #fff;
  font-size: 13px;
}
.wiz-age-chip input {
  width: 44px;
  border: none;
  background: transparent;
  font: 600 14px "Space Grotesk", sans-serif;
  text-align: center;
  color: #1a1a1c;
  padding: 0;
}
.wiz-age-chip input:focus { outline: none; }
.wiz-age-chip button {
  background: none;
  border: 0;
  color: #a58f6a;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 0 2px;
}
.wiz-age-add {
  padding: 6px 12px;
  border: 1.5px dashed #c8b998;
  border-radius: 999px;
  background: transparent;
  color: #7a6a55;
  font-size: 13px;
  cursor: pointer;
}

.wiz-gps-btn {
  width: 100%;
  padding: 13px 14px;
  border: 1.5px solid #b18a4f;
  background: #fef4e0;
  border-radius: 10px;
  color: #6a4c1a;
  font: 600 14px "Space Grotesk", sans-serif;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.wiz-gps-btn:hover { background: #fbe9c8; }
.wiz-gps-btn[disabled] { opacity: 0.6; cursor: wait; }

.wiz-gps-status {
  margin-top: 10px;
  font-size: 13px;
  color: #5b5548;
  min-height: 18px;
}
.wiz-gps-status.is-ok { color: #2d6a37; }
.wiz-gps-status.is-err { color: #a3392c; }

.wiz-review {
  background: #f8efdf;
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 14px;
  line-height: 1.7;
  color: #3d3628;
}
.wiz-review strong { color: #1a1a1c; }
.wiz-review .wiz-review-line { display: flex; justify-content: space-between; gap: 12px; }
.wiz-review .wiz-review-line + .wiz-review-line { border-top: 1px dashed #e2d8c5; padding-top: 6px; margin-top: 6px; }

.wiz-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid #eee1c7;
}
.wiz-btn {
  padding: 10px 20px;
  border-radius: 999px;
  font: 600 14px "Space Grotesk", sans-serif;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: background .15s ease, transform .15s ease;
}
.wiz-btn-primary {
  background: #1a1a1c;
  color: #fff;
}
.wiz-btn-primary:hover { background: #000; transform: translateY(-1px); }
.wiz-btn-ghost {
  background: transparent;
  color: #5b5548;
  border-color: #e2d8c5;
}
.wiz-btn-ghost:hover { background: #f8efdf; }
.wiz-btn[disabled] { opacity: 0.4; cursor: not-allowed; }

.wiz-dots {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin: 4px 0 18px;
}
.wiz-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e2d8c5;
  transition: background .2s ease, width .2s ease;
}
.wiz-dot.is-current { background: #b18a4f; width: 20px; border-radius: 999px; }
.wiz-dot.is-done { background: #b18a4f; }

/* Wizard-driven hides on the main page */
body.wiz-hide-converter #price-converter { display: none !important; }

/* Weather-aware alternative action in each rendered itinerary slot. */
.slot-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.slot-alternative {
  min-height: 30px;
  padding: 5px 11px;
  border: 1px solid #b18a4f;
  border-radius: 4px;
  background: transparent;
  color: #6a4c1a;
  font: 600 12px/1 "Space Grotesk", system-ui, sans-serif;
  letter-spacing: .02em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.slot-alternative:hover:not(:disabled) {
  background: #fef4e0;
  border-color: #6a4c1a;
}
.slot-alternative:focus-visible {
  outline: 3px solid rgba(177,138,79,.28);
  outline-offset: 2px;
}
.slot-alternative:disabled {
  opacity: .55;
  cursor: not-allowed;
}
.slot-alternative.is-loading { cursor: wait; }
.slot-alternative-note {
  margin-top: 9px !important;
  color: #7a6a55 !important;
  font-size: 11px;
  line-height: 1.35;
}
.slot-alternative-status {
  position: fixed;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Three weather-aware replacements, chosen from a swipe-first bottom sheet. */
body.alternative-chooser-open { overflow: hidden; }
.alternative-chooser {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: end;
  justify-content: center;
  font-family: "Space Grotesk", system-ui, sans-serif;
}
.alternative-chooser-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 27, 45, .52);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}
.alternative-chooser-sheet {
  position: relative;
  width: min(760px, 100%);
  max-height: min(760px, 92dvh);
  overflow: auto;
  padding: 26px max(20px, env(safe-area-inset-right)) calc(28px + env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  border-radius: 26px 26px 0 0;
  background: #fffaf3;
  box-shadow: 0 -24px 70px rgba(15, 27, 45, .24);
  animation: alternativeSheetIn .25s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes alternativeSheetIn {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}
.alternative-chooser-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}
.alternative-chooser-kicker {
  margin: 0 0 4px;
  color: #a3392c;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.alternative-chooser h2 {
  margin: 0;
  color: #172338;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(25px, 6vw, 34px);
  letter-spacing: -.025em;
  line-height: 1.04;
}
.alternative-chooser-close {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border: 1px solid #e2d8c5;
  border-radius: 50%;
  background: #fff;
  color: #5b5548;
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
}
.alternative-context {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 18px 0 12px;
}
.alternative-context span {
  padding: 6px 9px;
  border: 1px solid #dce8e7;
  border-radius: 999px;
  background: #edf7f6;
  color: #265e67;
  font-size: 12px;
  font-weight: 600;
}
.alternative-context span + span {
  border-color: #f0dfc0;
  background: #fff3df;
  color: #7a511c;
}
.alternative-chooser-hint {
  margin: 0 0 12px;
  color: #6f6a61;
  font-size: 13px;
  font-weight: 600;
}
.alternative-chooser-hint span { color: #1f6b7a; font-size: 16px; margin-right: 4px; }
.alternative-choice-viewport { overflow: visible; }
.alternative-choice-track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 3px 14% 12px 1px;
  scroll-snap-type: x mandatory;
  scroll-snap-stop: always;
  overscroll-behavior-inline: contain;
  touch-action: pan-x;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.alternative-choice-track::-webkit-scrollbar { display: none; }
.alternative-choice-track:focus-visible { outline: 3px solid rgba(31,107,122,.35); outline-offset: 4px; border-radius: 18px; }
.alternative-choice-card {
  flex: 0 0 86%;
  min-height: 270px;
  padding: 22px;
  border: 1px solid #dfd2bd;
  border-radius: 20px;
  background: #fff;
  color: #172338;
  box-shadow: 0 14px 30px -24px rgba(15,27,45,.5);
  text-align: left;
  cursor: pointer;
  scroll-snap-align: start;
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.alternative-choice-card:hover:not(:disabled) {
  border-color: #1f6b7a;
  box-shadow: 0 18px 36px -24px rgba(15,27,45,.55);
  transform: translateY(-2px);
}
.alternative-choice-card:focus-visible { outline: 3px solid rgba(31,107,122,.35); outline-offset: 3px; }
.alternative-choice-card:disabled { cursor: wait; opacity: .64; }
.alternative-choice-number {
  display: block;
  color: #a3392c;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .18em;
}
.alternative-choice-card h3 {
  margin: 10px 0 10px;
  font-family: "Fraunces", Georgia, serif;
  font-size: 23px;
  letter-spacing: -.015em;
  line-height: 1.1;
}
.alternative-choice-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 12px;
}
.alternative-choice-meta span,
.alternative-choice-meta strong {
  padding: 4px 8px;
  border-radius: 999px;
  background: #f4eee3;
  color: #5b5548;
  font-size: 11px;
  font-weight: 600;
}
.alternative-choice-meta strong { background: #e7f2f1; color: #285d66; }
.alternative-choice-card p { margin: 0; color: #4d5968; font-size: 14px; line-height: 1.5; }
.alternative-choice-select {
  display: inline-block;
  margin-top: 18px;
  color: #1f6b7a;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.alternative-chooser-status {
  min-height: 20px;
  margin: 12px 0 0;
  color: #a3392c;
  font-size: 13px;
}

@media (min-width: 760px) {
  .alternative-chooser { align-items: center; padding: 24px; }
  .alternative-chooser-sheet { border-radius: 26px; }
}

@media (max-width: 480px) {
  .wiz-card { padding: 24px 20px 20px; border-radius: 18px; }
  .wiz-card h2 { font-size: 22px; }
  .wiz-row { flex-direction: column; gap: 0; }
  .slot-alternative { min-height: 36px; padding: 7px 12px; }
  .alternative-choice-track { padding-right: 18%; }
  .alternative-choice-card { flex-basis: 88%; min-height: 288px; padding: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .alternative-chooser-sheet { animation: none; }
  .alternative-choice-card { transition: none; }
}
