/* Southern Utah Guide — Smart Trip Planner styles (extends styles.css tokens) */

/* ---------- Planner hero ---------- */
.planner-hero { background: var(--dusk); color: #fff; position: relative; overflow: hidden; }
.planner-hero .art { position: absolute; inset: 0; }
.planner-hero .art svg { width: 100%; height: 100%; }
.planner-hero-inner { position: relative; max-width: 1140px; margin: 0 auto; padding: clamp(3rem, 7vw, 5rem) 20px; }
.planner-hero h1 { color: #fff; max-width: 18ch; }
.planner-hero p { color: #E9E2D4; font-size: 1.1rem; max-width: 54ch; }

/* ---------- Tabs ---------- */
.planner-tabs { display: flex; gap: .4rem; border-bottom: 1px solid var(--line); margin-bottom: 0; position: sticky; top: 57px; background: var(--paper); z-index: 30; padding-top: .6rem; }
.planner-tabs button {
  font: inherit; font-weight: 700; background: none; border: 0; cursor: pointer;
  padding: .6rem 1.1rem; color: var(--ink-soft); border-bottom: 3px solid transparent; font-size: .98rem;
}
.planner-tabs button[aria-selected="true"] { color: var(--clay-deep); border-bottom-color: var(--clay); }

/* ---------- Wizard ---------- */
.wizard { max-width: 720px; margin: 0 auto; padding: 2.2rem 0 3rem; }
.wiz-progress { display: flex; align-items: center; gap: .9rem; margin-bottom: 1.6rem; }
.wiz-progress .bar { flex: 1; height: 8px; background: var(--sand); border-radius: 999px; overflow: hidden; }
.wiz-progress .bar > div { height: 100%; background: var(--clay); border-radius: 999px; transition: width .3s ease; }
.wiz-progress .label { font-size: .82rem; font-weight: 700; color: var(--ink-soft); white-space: nowrap; }
.wiz-step h2 { margin-bottom: .3rem; }
.wiz-step .hint { color: var(--ink-soft); margin-bottom: 1.4rem; }
.wiz-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 2rem; gap: 1rem; }
.wiz-nav .spacer { flex: 1; }

/* Option cards */
.opt-grid { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.opt-grid.wide { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.opt-card {
  display: flex; flex-direction: column; gap: .25rem; align-items: flex-start;
  background: #fff; border: 2px solid var(--line); border-radius: 10px;
  padding: .85rem 1rem; cursor: pointer; font: inherit; text-align: left;
  transition: border-color .12s ease, background .12s ease;
}
.opt-card:hover { border-color: #C9A98F; }
.opt-card.sel { border-color: var(--clay); background: #FBF1E9; }
.opt-card .ico { font-size: 1.4rem; line-height: 1; }
.opt-card .t { font-weight: 700; font-size: .96rem; }
.opt-card .d { font-size: .8rem; color: var(--ink-soft); }
.opt-card .pri { display: none; background: var(--clay); color: #fff; font-size: .68rem; font-weight: 800; border-radius: 999px; padding: .05rem .5rem; letter-spacing: .05em; }
.opt-card.pri1 .pri, .opt-card.pri2 .pri, .opt-card.pri3 .pri { display: inline-block; }

/* Counters + inputs */
.counter-row { display: flex; align-items: center; justify-content: space-between; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: .8rem 1.1rem; margin-bottom: .8rem; }
.counter-row .t { font-weight: 700; }
.counter { display: flex; align-items: center; gap: .9rem; }
.counter button {
  width: 36px; height: 36px; border-radius: 999px; border: 2px solid var(--clay);
  background: #fff; color: var(--clay); font-size: 1.2rem; font-weight: 800; cursor: pointer; line-height: 1;
}
.counter button:disabled { opacity: .3; cursor: default; }
.counter .n { min-width: 2ch; text-align: center; font-weight: 800; font-size: 1.1rem; }
.date-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
@media (max-width: 560px) { .date-row { grid-template-columns: 1fr; } }
.wiz-note { background: var(--sand); border-radius: 8px; padding: .7rem 1rem; font-size: .9rem; color: var(--ink-soft); margin-top: 1rem; }

/* ---------- Itinerary view ---------- */
.trip-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem; margin: 2rem 0 1rem; }
.trip-head .meta { display: flex; gap: .45rem; flex-wrap: wrap; }
.trip-actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.view-toggle { display: inline-flex; border: 2px solid var(--ink); border-radius: 999px; overflow: hidden; }
.view-toggle button { font: inherit; font-weight: 700; border: 0; background: transparent; padding: .45rem 1.1rem; cursor: pointer; color: var(--ink); }
.view-toggle button[aria-selected="true"] { background: var(--ink); color: #fff; }

.alert-banner {
  display: flex; gap: .8rem; align-items: flex-start; background: #F8EAE2; border: 1px solid #E4B79F;
  border-left: 5px solid var(--clay); border-radius: 8px; padding: .9rem 1.1rem; margin: 1rem 0; font-size: .95rem;
}
.alert-banner.info { background: #EAF0F5; border-color: #C8D8E4; border-left-color: var(--sky, #33637F); }

.day-block { margin: 2.2rem 0; }
.day-head { display: flex; align-items: baseline; gap: 1rem; flex-wrap: wrap; border-bottom: 2px solid var(--clay); padding-bottom: .5rem; margin-bottom: 1rem; }
.day-head h3 { margin: 0; font-size: 1.4rem; }
.day-head .sub { color: var(--ink-soft); font-size: .95rem; }
.day-head .wx { margin-left: auto; font-size: .9rem; font-weight: 700; color: var(--ink-soft); white-space: nowrap; }

.slot { display: grid; grid-template-columns: 86px 1fr; gap: 1rem; padding: .75rem 0; }
.slot .time { font-weight: 800; color: var(--clay-deep); font-variant-numeric: tabular-nums; padding-top: .95rem; }
.slot-card { background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 1rem 1.15rem; }
.slot-card .top { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.slot-card h4 { margin: 0 0 .25rem; font-size: 1.08rem; }
.slot-card h4 a { color: var(--ink); text-decoration: none; }
.slot-card h4 a:hover { color: var(--clay); }
.slot-card .meta { display: flex; gap: .4rem; flex-wrap: wrap; margin: .3rem 0 .45rem; }
.slot-card .desc { font-size: .92rem; color: var(--ink-soft); margin: 0 0 .5rem; }
.slot-card .tip { font-size: .87rem; background: #FBF4E4; border-radius: 6px; padding: .5rem .7rem; margin: .4rem 0 .5rem; }
.slot-card .acts { display: flex; gap: .45rem; flex-wrap: wrap; margin-top: .5rem; }
.slot-card .acts a, .slot-card .acts button {
  font: inherit; font-size: .82rem; font-weight: 700; cursor: pointer; text-decoration: none;
  border: 1.5px solid var(--line); background: var(--paper); color: var(--ink);
  border-radius: 999px; padding: .3rem .8rem;
}
.slot-card .acts a:hover, .slot-card .acts button:hover { border-color: var(--clay); color: var(--clay-deep); }
.slot-card .acts a.primary { background: var(--clay); border-color: var(--clay); color: #fff; }

.drive-leg { display: grid; grid-template-columns: 86px 1fr; gap: 1rem; }
.drive-leg .line { display: flex; align-items: center; gap: .6rem; color: var(--ink-soft); font-size: .85rem; font-weight: 600; padding: .1rem 0 .1rem 1.15rem; }
.drive-leg .line::before { content: "↓"; color: var(--clay); font-weight: 800; }

/* Replace drawer */
.drawer-veil { position: fixed; inset: 0; background: rgba(34,48,60,.5); z-index: 90; display: none; }
.drawer-veil.open { display: block; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(460px, 100%); background: var(--paper);
  z-index: 95; transform: translateX(100%); transition: transform .25s ease; overflow-y: auto;
  box-shadow: -12px 0 40px rgba(0,0,0,.25); padding: 1.4rem;
}
.drawer.open { transform: none; }
.drawer h3 { margin-bottom: .2rem; }
.drawer .close { position: absolute; top: .9rem; right: 1rem; background: none; border: 0; font-size: 1.5rem; cursor: pointer; color: var(--ink); }
.alt-card { display: flex; flex-direction: column; gap: .3rem; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: .9rem 1rem; margin-top: .8rem; }
.alt-card .t { font-weight: 700; }
.alt-card .meta { display: flex; gap: .4rem; flex-wrap: wrap; }
.alt-card .d { font-size: .87rem; color: var(--ink-soft); }
.alt-card button { align-self: flex-start; margin-top: .3rem; }

/* Map view */
#trip-map { height: 62vh; min-height: 380px; border-radius: 12px; border: 1px solid var(--line); z-index: 1; }
.map-day-picker { display: flex; gap: .5rem; flex-wrap: wrap; margin: 0 0 1rem; }
.map-day-picker button {
  font: inherit; font-weight: 700; font-size: .88rem; cursor: pointer; border-radius: 999px;
  border: 1.5px solid var(--line); background: #fff; color: var(--ink); padding: .35rem .9rem;
}
.map-day-picker button[aria-selected="true"] { background: var(--clay); border-color: var(--clay); color: #fff; }
.num-pin {
  background: var(--clay); color: #fff; border-radius: 999px; width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: .85rem;
  border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.35);
}

/* Summary cards (packing/cost) */
.sum-grid { display: grid; gap: 1.3rem; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); margin: 2.5rem 0; align-items: start; }
.sum-card { background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 1.2rem 1.3rem; }
.sum-card h3 { margin-bottom: .6rem; }
.pack-item { display: flex; gap: .55rem; align-items: center; font-size: .93rem; padding: .18rem 0; }
.pack-item input { accent-color: var(--clay); width: 16px; height: 16px; }
.pack-group { font-weight: 800; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--clay-deep); margin: .7rem 0 .2rem; }
.cost-row { display: flex; justify-content: space-between; font-size: .95rem; padding: .25rem 0; }
.cost-row.total { border-top: 2px solid var(--line); margin-top: .5rem; padding-top: .5rem; font-weight: 800; }
.est-note { font-size: .8rem; color: var(--ink-soft); margin-top: .6rem; }

/* Print */
@media print {
  .nav, .planner-tabs, .trip-actions, .wiz-nav, .acts, footer.site, .search-overlay { display: none !important; }
  .slot-card { box-shadow: none; }
  body { background: #fff; }
}
@media (max-width: 640px) {
  .slot, .drive-leg { grid-template-columns: 64px 1fr; }
  .slot .time { font-size: .85rem; }
}

/* ---------- Mobile ergonomics for the planner ---------- */
@media (max-width: 900px) {
  .planner-tabs { top: 67px; }              /* match the mobile nav height exactly */
  .planner-tabs button { min-height: 48px; }
  .opt-card { min-height: 56px; justify-content: center; }
  .counter button { width: 44px; height: 44px; }
  .wiz-nav .btn { min-height: 48px; }
  .slot-card .acts a, .slot-card .acts button { min-height: 44px; padding: .5rem 1rem; }
  .view-toggle button, .map-day-picker button { min-height: 44px; }
  .trip-actions { width: 100%; }
  .trip-actions .btn, .trip-actions .view-toggle { flex: 1 1 auto; }
  .pack-item { min-height: 40px; }
  .pack-item input { width: 22px; height: 22px; }
  .drawer { padding: 1.1rem; }
  #trip-map { height: 55vh; }
}
