/* ---------------------------------------------------------------- search card (home hero + edit-search dialog) */
.search-card { position: relative; width: 100%; min-width: 0; max-width: 480px; background: #fff; border-radius: 24px; padding: 8px 24px 24px; box-shadow: 0 30px 60px -30px rgba(7,19,45,.35), 0 1px 3px rgba(7,19,45,.06); border: 1px solid rgba(230,234,244,.8); }
.search-card.is-compact { max-width: none; box-shadow: none; border: 0; padding: 0; }

.sc-tabs { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--c-line); margin-bottom: 20px; }
.sc-tab { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 4px 12px; background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; color: var(--c-muted); font-size: 13px; font-weight: 500; }
.sc-tab:hover { color: var(--c-ink); }
.sc-tab.is-active { color: var(--c-primary); border-bottom-color: var(--c-primary); font-weight: 600; }

.sc-form { display: flex; flex-direction: column; gap: 14px; }
.sc-trip { display: flex; gap: 8px; }
.sc-group { display: inline-flex; align-self: flex-start; align-items: center; gap: 4px; height: 32px; padding-inline: 12px; border-radius: var(--r-pill); border: 1px solid var(--c-line); font-size: 12px; color: var(--c-muted); }
.sc-group strong { color: var(--c-ink); font-weight: 600; }
.sc-group:hover { border-color: var(--c-line-2); color: var(--c-muted); }

.sc-field { display: flex; align-items: center; gap: 14px; width: 100%; min-width: 0; padding: 12px 16px; text-align: start; background: #fff; border: 1px solid var(--c-line); border-radius: var(--r-md); transition: border-color .15s, box-shadow .15s; }
.sc-field:hover { border-color: var(--c-line-2); }
.sc-field.is-open, .sc-field:focus-visible { border-color: var(--c-primary); box-shadow: 0 0 0 4px rgba(47,69,252,.1); outline: none; }
.sc-ico { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--c-primary-tint); color: var(--c-primary); flex-shrink: 0; }
.sc-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.sc-label { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--c-muted); }
.sc-value { font-size: 16px; font-weight: 700; color: var(--c-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-sub { font-size: 12px; color: var(--c-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 18px; }
.sc-chev { color: var(--c-muted); }

.sc-route { position: relative; border: 1px solid var(--c-line); border-radius: var(--r-md); }
.sc-route .sc-field { border: 0; border-radius: 0; padding-inline-end: 64px; }
.sc-route .sc-station + .sc-swap + .sc-station .sc-field { border-top: 1px solid var(--c-line); }
.sc-route .sc-station:first-child .sc-field { border-radius: var(--r-md) var(--r-md) 0 0; }
.sc-route .sc-station:last-child .sc-field { border-radius: 0 0 var(--r-md) var(--r-md); }
.sc-station { position: relative; }
.sc-swap { position: absolute; inset-inline-end: 16px; top: 50%; transform: translateY(-50%); z-index: 2; width: 36px; height: 36px; border-radius: 50%; background: #fff; border: 1px solid var(--c-line); color: var(--c-primary); display: grid; place-items: center; }
.sc-swap:hover { border-color: var(--c-primary); }

.sc-dates { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.sc-date { flex-direction: column; align-items: flex-start; gap: 0; }
.sc-date .sc-value { font-size: 18px; font-weight: 800; letter-spacing: -.01em; }
.sc-date.is-empty .sc-value { color: var(--c-muted-2); font-weight: 600; font-size: 15px; }
.sc-pax { position: relative; }
.sc-submit { margin-top: 2px; }

.sc-soon { text-align: center; padding: 28px 12px 16px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.sc-soon h3 { font-size: 22px; }
.sc-soon p { color: var(--c-ink-2); max-width: 320px; }

/* station list */
.station-pop { padding: 6px; max-height: 340px; overflow: auto; }
.station-opt { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 0; background: none; border-radius: 12px; text-align: start; }
.station-opt:hover, .station-opt.is-active { background: var(--c-bg-soft); }
.station-opt .code { width: 44px; height: 32px; border-radius: 8px; background: var(--c-primary-soft); color: var(--c-primary); font-size: 12px; font-weight: 700; display: grid; place-items: center; flex-shrink: 0; }
.station-opt strong { display: block; font-size: 14px; }
.station-opt small { display: block; font-size: 12px; color: var(--c-muted); }
.station-opt[aria-disabled="true"] { opacity: .4; pointer-events: none; }

/* passengers */
.pax-pop { padding: 16px; min-width: 300px; }
.pax-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 10px; border-bottom: 1px solid var(--c-line); }
.pax-row strong { display: block; font-size: 15px; }
.pax-row small { display: block; font-size: 12px; color: var(--c-muted); }
.pax-note { margin-block: 12px; }

/* calendar */
.cal-pop { padding: 16px 18px 18px; width: max-content; min-width: 100%; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-head p { font-size: 13px; color: var(--c-muted); font-weight: 600; }
.cal-nav { display: flex; gap: 6px; }
.cal-nav button { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--c-line); background: #fff; display: grid; place-items: center; }
.cal-nav button:disabled { opacity: .35; }
.cal-months { display: grid; grid-template-columns: repeat(2, 280px); gap: 24px; }
.cal-month h4 { font-size: 14px; font-weight: 700; text-align: center; margin-bottom: 8px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-dow { font-size: 11px; font-weight: 600; color: var(--c-muted-2); text-align: center; padding-block: 4px; }
.cal-day { position: relative; height: 48px; border: 0; background: none; border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; color: var(--c-ink); }
.cal-day .d { font-size: 14px; font-weight: 600; }
.cal-day .h { font-size: 9px; color: var(--c-muted-2); }
.cal-day .p { font-size: 9px; color: var(--c-success); font-weight: 700; }
.cal-day:hover:not(:disabled) { background: var(--c-bg-soft); }
.cal-day:disabled { color: var(--c-line-3); cursor: default; }
.cal-day:disabled .h, .cal-day:disabled .p { visibility: hidden; }
.cal-day.in-range { background: var(--c-primary-tint); border-radius: 0; }
.cal-day.is-start, .cal-day.is-end { background: var(--c-ink); color: #fff; border-radius: 10px; }
.cal-day.is-start .h, .cal-day.is-end .h, .cal-day.is-start .p, .cal-day.is-end .p { color: rgba(255,255,255,.75); }
.cal-day.is-today .d { text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 520px) {
  .search-card { padding-inline: 16px; }
  .sc-tab { font-size: 12px; }
  .cal-pop { position: fixed; inset: auto 8px 8px 8px; top: auto; max-height: 80vh; overflow: auto; z-index: 120; }
  .pax-pop { min-width: 0; inset-inline: 0; }
}
@media (max-width: 720px) {
  .cal-months { grid-template-columns: 1fr; }
  .cal-months .cal-month:nth-child(2) { display: none; }
  .cal-pop { width: auto; }
}
