/* Travel feature — flight date options + the host-hotel member rate.
   Tokens come from css/app.css. The .hotel-* block is exported with
   hotelCard() and is also rendered on the conference Venue tab. */

.trav-shell { display: block; }

/* ------------------------------------------------------------------- hero */

.trav-hero { padding: var(--s-5); }

.trav-hero-kicker {
  margin: 0 0 var(--s-1);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .7);
}
.trav-hero-name { margin: 0 0 var(--s-2); font-size: 1.22rem; font-weight: 800; line-height: 1.2; color: #fff; }
.trav-hero-when { margin: 0; font-weight: 600; color: #fff; }
.trav-hero-where { margin: 2px 0 0; font-size: .88rem; color: rgba(255, 255, 255, .78); }

.trav-conf-pick {
  margin-top: var(--s-4);
  width: 100%;
  /* background-color, NOT the background shorthand: the shorthand wipes the
     select arrow that app.css paints with background-image. */
  background-color: rgba(255, 255, 255, .12);
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(255, 255, 255, .8) 50%),
    linear-gradient(135deg, rgba(255, 255, 255, .8) 50%, transparent 50%);
  border-color: rgba(255, 255, 255, .35);
  color: #fff;
  /* A long conference name must ellipsize, not run under the arrow. */
  text-overflow: ellipsis;
}
.trav-conf-pick option { color: var(--ink); }

/* --------------------------------------------------------------- sub-tabs */

.trav-tabs { margin-top: var(--s-4); }

/* ------------------------------------------------------------------- form */

.trav-form { padding: var(--s-4) var(--s-4) var(--s-2); }
.trav-field { margin-bottom: var(--s-4); }
.trav-field:last-child { margin-bottom: var(--s-3); }

.trav-origin {
  max-width: 180px;
  text-transform: uppercase;
  letter-spacing: .18em;
  font-weight: 700;
  font-size: 1.05rem;
}

.field-hint.is-error { color: var(--danger); font-weight: 600; }

.trav-airports { margin: 0; }

.trav-airport {
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  min-height: 50px;
  padding: 6px var(--s-4);
  line-height: 1.25;
  text-align: left;
}
.trav-airport-code { font-size: .95rem; font-weight: 800; letter-spacing: .06em; }
.trav-airport-name { font-size: .7rem; opacity: .75; max-width: 22ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.trav-trip { margin-bottom: var(--s-2); }

/* ------------------------------------------------------------- date grid */

.trav-grid {
  display: grid;
  gap: 6px;
  align-items: stretch;
  margin-bottom: var(--s-3);
}

.trav-grid-corner {
  display: flex;
  align-items: flex-end;
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 6px;
}

.trav-grid-col,
.trav-grid-row-head {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0;
  line-height: 1.2;
}
.trav-grid-col { align-items: center; text-align: center; padding-bottom: 4px; }
.trav-grid-row-head { align-items: flex-end; text-align: right; padding-right: 2px; }

.trav-grid-dow {
  font-size: .64rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.trav-grid-date { font-size: .84rem; font-weight: 700; color: var(--ink); }

.trav-opt {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  min-height: 56px;
  padding: var(--s-2) 6px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--ink);
  font-size: .82rem;
  font-weight: 600;
  transition: background .12s ease, border-color .12s ease, transform .1s ease;
}
.trav-opt:hover { background: var(--blue-soft); border-color: var(--blue); }
.trav-opt:active { transform: translateY(1px); }

.trav-opt-main { font-size: .86rem; font-weight: 700; }
.trav-opt-sub { font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

.trav-opt.is-rec {
  border-color: var(--navy);
  border-width: 2px;
  background: color-mix(in srgb, var(--navy) 8%, var(--surface));
  padding-bottom: 16px;
}
.trav-opt.is-rec .trav-opt-main { color: var(--navy); }

.trav-opt-flag {
  position: absolute;
  left: 50%;
  bottom: 3px;
  transform: translateX(-50%);
  font-size: .56rem;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: #fff;
  background: var(--navy);
  border-radius: var(--r-pill);
  padding: 1px 7px;
  white-space: nowrap;
}

@media (prefers-color-scheme: dark) {
  .trav-opt.is-rec { background: color-mix(in srgb, var(--blue) 18%, var(--surface)); border-color: var(--blue); }
  .trav-opt.is-rec .trav-opt-main { color: #fff; }
  .trav-opt-flag { background: var(--blue); color: #08142c; }
}

/* ---------------------------------------------------------------- one way */

.trav-oneway { display: flex; flex-direction: column; gap: var(--s-4); margin-bottom: var(--s-3); }
.trav-oneway-block { display: block; }
.trav-oneway-title {
  margin: 0 0 var(--s-2);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--muted);
}
.trav-oneway-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 6px;
}

/* ------------------------------------------------------------------ notes */

.trav-need-origin {
  margin: 0 0 var(--s-3);
  padding: 10px var(--s-3);
  border-radius: var(--r-sm);
  background: color-mix(in srgb, var(--orange) 16%, var(--surface));
  color: var(--ink-2);
  font-size: .82rem;
  font-weight: 600;
}

.trav-rec-note {
  margin: 0 0 var(--s-5);
  font-size: .8rem;
  color: var(--muted);
}

.trav-tips .card-title,
.trav-hotel-help .card-title { font-size: .95rem; }

.trav-tip-list {
  margin: 0;
  padding-left: 1.15em;
  font-size: .85rem;
  color: var(--ink-2);
}
.trav-tip-list li + li { margin-top: 6px; }

.trav-hotel-help .btn { margin-top: var(--s-4); }

.trav-foot { margin: var(--s-5) 0 0; font-size: .78rem; color: var(--muted); text-align: center; }

/* ------------------------------------------------------------- hotel card */

.hotel-card { display: block; }

.hotel-head { display: flex; gap: var(--s-3); align-items: flex-start; }
.hotel-emoji {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-sm);
  background: var(--blue-soft);
  color: var(--blue);
}
.hotel-head-text { min-width: 0; }

.hotel-kicker {
  margin: 0 0 2px;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--blue);
}
.hotel-name { margin: 0 0 2px; font-size: 1.08rem; font-weight: 700; }
.hotel-address { margin: 0; font-size: .85rem; color: var(--muted); }

.hotel-facts {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px var(--s-3);
  margin: var(--s-4) 0 var(--s-3);
  font-size: .86rem;
}
.hotel-facts dt { color: var(--muted); font-weight: 600; white-space: nowrap; }
.hotel-facts dd { margin: 0; color: var(--ink); font-weight: 600; }

.hotel-note { margin: 0 0 var(--s-3); font-size: .8rem; color: var(--muted); }

.hotel-actions { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-bottom: var(--s-3); }
.hotel-actions .btn { flex: 1 1 auto; justify-content: center; }

.hotel-map { display: inline-block; }
.hotel-nearby { margin: var(--s-2) 0 0; }

.hotel-warn {
  margin: var(--s-3) 0 0;
  padding: 8px var(--s-3);
  border-radius: var(--r-sm);
  background: color-mix(in srgb, var(--orange) 18%, var(--surface));
  color: var(--ink-2);
  font-size: .8rem;
  font-weight: 600;
}

/* ------------------------------------------------------------- >= 700px */

@media (min-width: 700px) {
  .trav-hero-name { font-size: 1.4rem; }
  .trav-grid { gap: var(--s-2); }
  .trav-opt { min-height: 62px; }
  .hotel-actions .btn { flex: 0 1 auto; }
}

/* Dark mode: app.css paints the active `.tabs` item var(--navy), which is not
   redefined for dark, so the selected Flights/Hotel tab vanished. Local patch,
   same as conference.css / networking.css; the root fix belongs in app.css. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .trav-tabs > button.active { color: var(--ink); border-bottom-color: var(--blue); }
}
:root[data-theme="dark"] .trav-tabs > button.active { color: var(--ink); border-bottom-color: var(--blue); }
