.bus-search select, .bus-search input, .results-tools select,
.bus-search button, .bus-results button { font-family: inherit; }
.bus-search select, .bus-search input {
  width: 100%; min-width: 0; padding: .2rem 0; border: 0; border-radius: 3px;
  color: var(--ink); background: transparent; font-size: 1rem; font-weight: 600;
}
.bus-search .date { padding-inline: .8rem; }
.stop-picker { position: relative; min-width: 0; }
.stop-picker .field { height: 100%; padding-right: 2rem; cursor: text; background-image: url("assets/point-down.svg"); background-position: right .7rem center; background-size: .7rem; background-repeat: no-repeat; }
.stop-picker:last-child .field { padding-left: 1.6rem; }
.stop-list { position: absolute; top: calc(100% + .3rem); inset-inline: 0; z-index: 5; max-height: min(17rem, 42vh); overflow-y: auto; overscroll-behavior: contain; padding: .25rem; border: 1px solid var(--line); border-radius: .65rem; background: white; box-shadow: 0 8px 24px #222c3b24; }
.stop-list li { padding: .55rem .65rem; border-radius: .35rem; font-size: .92rem; overflow-wrap: anywhere; }
.stop-list [role="option"] { cursor: pointer; }
.stop-list [role="option"]:hover, .stop-list .active { background: var(--wash); }
.stop-list [aria-selected="true"] { color: var(--deep-red); font-weight: 650; }
.stop-list [role="presentation"] { color: var(--muted); }
.bus-search .swap { z-index: 1; }
.bus-search .swap, .bus-search select, .bus-search button, .bus-results button, .results-tools select { cursor: pointer; }
.bus-search .search-link { border: 0; }
.bus-search button:disabled, .bus-results button:disabled { cursor: default; }
.bus-search button:focus-visible, .bus-search :is(input, select):focus-visible,
.bus-results :is(button, select):focus-visible { outline: 3px solid #315baa; outline-offset: 2px; }
.bus-search .day-choices { gap: 0; }
.day-choices button {
  display: flex; align-items: center; gap: .4rem; padding: .15rem 0;
  background: transparent; border: 0; color: var(--muted); font-size: .87rem; line-height: 1.5;
}
.day-choices button::before {
  content: ""; width: 14px; height: 14px; border: 1px solid #94a2ab; border-radius: 50%; background: white;
}
.day-choices button[aria-pressed="true"]::before { background: var(--green); border-color: var(--green); box-shadow: inset 0 0 0 2px white; }
.bus-search .search-error, .bus-search noscript { grid-column: 1 / -1; color: var(--deep-red); }
.bus-search [hidden], .bus-results [hidden] { display: none !important; }
.bus-search .search-link:disabled, .seat-toggle:disabled, .confirm-seat:disabled { opacity: .55; }
@media (min-width: 921px) {
  .bus-search { grid-template-columns: minmax(0, 1fr) minmax(160px, .28fr) max-content 155px; }
}

.results-page { background: var(--wash); }
.bus-results { padding-block: 1.1rem 3.5rem; }
.result-editor {
  background: white; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 6px 22px #222c3b14;
}
.result-editor summary {
  display: flex; align-items: center; justify-content: space-between; gap: .65rem; padding: .95rem 1.2rem;
  list-style: none; cursor: pointer; border-radius: inherit;
}
.result-editor summary::-webkit-details-marker { display: none; }
.route-summary { display: grid; gap: .15rem; }
.route-summary strong { font-size: clamp(1.08rem,2vw,1.4rem); line-height: 1.25; letter-spacing: -.025em; }
#travel-day { color: var(--muted); font-size: .85rem; }
.edit-label { flex: none; padding: .4rem .65rem; background: var(--wash); color: var(--ink); border-radius: 7px; font-size: .85rem; font-weight: 600; }
.result-editor .when-open, .result-editor[open] .when-closed { display: none; }
.result-editor[open] .when-open { display: inline; }
.result-editor .bus-search { box-shadow: none; border: 0; border-top: 1px solid var(--line); border-radius: 0 0 16px 16px; }
.result-meta, .result-days { display: flex; align-items: center; gap: .6rem; }
.result-meta { justify-content: space-between; flex-wrap: wrap; }
.result-days a, #reset-filters {
  padding: .5rem .8rem; border: 1px solid var(--line); border-radius: 8px; background: white;
  font-size: .83rem; font-weight: 570; color: var(--ink);
}
.result-days a:hover, #reset-filters:hover { border-color: #a2abb5; }
.results-tools {
  display: flex; flex-wrap: wrap; align-items: end; gap: .75rem;
  padding: .9rem 1.1rem; background: white; border: 1px solid var(--line); border-radius: 12px;
}
.results-tools label { display: grid; gap: .2rem; color: var(--muted); font-size: .76rem; font-weight: 550; }
.results-tools select {
  min-width: 8.5rem; min-height: 36px; border: 1px solid var(--line); border-radius: 7px;
  background: white; color: var(--ink); padding: .35rem .55rem; font-size: .86rem;
}
#reset-filters { margin-left: auto; min-height: 36px; }
.result-meta { margin: 1rem 0 .65rem; color: var(--muted); font-size: .82rem; }
#result-count { font-weight: 650; color: var(--ink); }
.trip-brand strong { font-size: .95rem; line-height: 1.3; }
#trip-list { display: grid; gap: .75rem; }
.trip-card, .empty-results {
  overflow: hidden; background: white; border: 1px solid var(--line); border-radius: 12px;
}
.trip-main {
  display: grid; grid-template-columns: minmax(88px,.8fr) minmax(0,2.1fr) minmax(92px,.8fr) minmax(82px,.7fr) auto;
  align-items: center; gap: 1rem; padding: 1.15rem 1.25rem;
}
.trip-brand img { width: auto; max-height: 38px; max-width: min(108px,100%); object-fit: contain; }
.trip-times { display: flex; align-items: baseline; flex-wrap: wrap; gap: .45rem; font-size: 1.17rem; font-variant-numeric: tabular-nums; }
.trip-times .time-arrow, .trip-times .arrival { color: var(--muted); font-size: .92rem; font-weight: 550; }
.terminals, .trip-specs span, .trip-fare span { color: var(--muted); font-size: .8rem; }
.terminals { margin-top: .25rem; }
.trip-specs, .trip-fare { display: grid; gap: .16rem; }
.trip-specs strong { font-size: .95rem; font-weight: 600; }
.trip-fare { text-align: right; }
.trip-fare strong { font-size: 1.12rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.seat-toggle, .confirm-seat {
  min-height: 40px; padding: .5rem .95rem; border: 0; border-radius: 8px;
  font-size: .87rem; font-weight: 650; color: white; background: var(--deep-red);
}
.seat-toggle:hover:enabled { background: #892421; }
.seat-toggle[aria-expanded="true"] { background: #495562; }
.trip-details { border-top: 1px solid var(--line); padding: .48rem 1.25rem; font-size: .8rem; color: var(--muted); }
.trip-details summary { width: fit-content; cursor: pointer; font-weight: 550; }
.trip-details p { margin-top: .4rem; }
.empty-results { padding: 2.5rem 1.25rem; text-align: center; }
.empty-results p { margin-top: .45rem; color: var(--muted); }

.seat-panel {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(175px, .3fr); gap: 1.5rem;
  padding: 1rem 1.25rem 1.25rem; border-top: 1px solid var(--line); background: #fafbfc;
}
.seat-cabin, .seat-summary { min-width: 0; }
.seat-grid {
  width: fit-content; max-width: 100%; margin: .8rem 0; padding: .7rem 1rem .7rem 3.3rem;
  display: grid; grid-template-rows: repeat(var(--across), 30px); grid-auto-columns: 34px; gap: 4px;
  border: 1px solid #bbc5cc; border-radius: 28px 12px 12px 28px;
  background: #f4f7f7 url("assets/bus/direksiyon.png") no-repeat .65rem calc(100% - .8rem) / 28px;
}
.seat {
  grid-column: var(--bay); grid-row: var(--position); padding: 0; font-size: .8rem; font-weight: 600;
  background: white; border: 1px solid #82929d; border-right-width: 3px; color: var(--ink); border-radius: 6px;
}
.seat:hover:enabled { border-color: var(--green); }
.seat:disabled { color: #56616b; background: #dce2e7; border-color: #acb7c1; }
.seat[aria-pressed="true"] { color: white; background: var(--green); border-color: #0d5f48; }
.seat-legend { display: flex; flex-wrap: wrap; gap: .8rem; color: var(--muted); font-size: .8rem; }
.seat-legend span { display: inline-flex; align-items: center; gap: .3rem; }
.seat-legend span::before { content: ""; width: 13px; height: 13px; border-radius: 3px; border: 1px solid #82929d; background: white; }
.seat-legend .taken::before { background: #dce2e7; }
.seat-legend .chosen::before { background: var(--green); border-color: var(--green); }
.seat-summary { display: flex; flex-direction: column; gap: .5rem; border-left: 1px solid var(--line); padding-left: 1.3rem; }
.seat-summary p { font-size: .88rem; color: var(--muted); }
.confirm-seat { margin-top: auto; align-self: start; background: var(--green); }
.confirm-seat:hover:enabled { background: #0e634a; }
.passenger-layout {
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, .9fr); align-items: start;
  gap: 1rem; padding-bottom: 3rem;
}
.passenger-layout [hidden] { display: none; }
.passenger-layout .panel { background: white; box-shadow: 0 6px 22px #222c3b0c; }
.passenger-fields, .payment-panel { grid-column: 1; grid-row: 1; min-width: 0; }
.journey-summary { grid-column: 2; grid-row: 1; }
.passenger-fields fieldset { min-width: 0; border: 0; padding: 0; margin: 1.5rem 0 0; }
.passenger-fields legend { font-weight: 650; padding: 0; margin-bottom: .65rem; }
.passenger-inputs { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .8rem; }
.passenger-inputs label { display: grid; gap: .3rem; color: var(--muted); font-size: .875rem; }
.passenger-inputs input {
  min-width: 0; width: 100%; height: 45px; padding: .65rem .75rem; border: 1px solid #aab3be;
  border-radius: 8px; font: inherit; font-size: 1rem; color: var(--ink); background: white;
}
.passenger-inputs input:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.passenger-note { margin-top: 1.5rem; padding-top: .85rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .84rem; }
.checkout-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .8rem; margin-top: 1.15rem; }
.checkout-actions p { flex: 1 1 12rem; color: var(--muted); font-size: .84rem; }
.checkout-actions button { margin: 0; min-height: 44px; padding-inline: 1.25rem; cursor: pointer; font-family: inherit; }
.checkout-actions button:disabled { background: #e2e7e6; color: #596460; cursor: not-allowed; }
.checkout-actions button:focus-visible, #payment-status:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
.payment-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; }
.payment-heading span { padding: .25rem .7rem; border-radius: 1rem; color: var(--deep-red); background: #fff0ef; font-size: .8rem; font-weight: 650; }
.demo-transfer-note { margin-block: .9rem 1.25rem; color: var(--muted); }
.bank-details { margin: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--wash); }
.bank-details > div { padding: .85rem 1rem; }
.bank-details > div + div { border-top: 1px solid var(--line); }
.bank-details dt { margin-bottom: .3rem; color: var(--muted); font-size: .85rem; }
.bank-details dd { margin: 0; font-weight: 600; }
.demo-iban { font-family: ui-monospace, Consolas, monospace; font-size: 1rem; }
#payment-status:not(:empty) { border-radius: 8px; }
#payment-status p { margin-top: .35rem; font-size: .9rem; }
.receipt-code { display: grid; gap: .2rem; padding: 1rem 1.2rem; margin: 1.2rem 0; background: #eef7f3; border-left: 4px solid var(--green); border-radius: 6px; }
.receipt-code span, .receipt-facts dt, .receipt-note { color: var(--muted); font-size: .83rem; }
.receipt-code strong { font: 650 clamp(1.2rem,3vw,1.65rem)/1.3 ui-monospace,Consolas,monospace; color: #174e3d; }
.receipt-facts { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .8rem; margin: 0; }
.receipt-facts dd { margin: .15rem 0 0; font-weight: 550; overflow-wrap: anywhere; }
.receipt-lookup { display: inline-block; margin-top: .8rem; color: var(--green); text-decoration: underline; }
.rejection-reason { margin: .9rem 0; padding: .8rem 1rem; border-left: 3px solid var(--deep-red); background: #fff1ef; overflow-wrap: anywhere; }
.lookup-page .hero-title, .lookup-panel .checkout-actions { justify-content: center; }
.lookup-page .mode img { filter: brightness(0) invert(1); }
.lookup-page .utilities [aria-current="page"] { text-decoration: underline; text-underline-offset: .3em; }
.lookup-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; max-width: 42rem; }
.lookup-layout .panel { background: white; box-shadow: 0 6px 22px #222c3b0c; }
.lookup-panel .passenger-inputs { margin-top: 1rem; }
#query-scope { color: var(--muted); }
#query-message:not(:empty), .receipt-facts + .receipt-note { margin-top: 1rem; font-size: .9rem; color: var(--muted); }
.order-progress { display: flex; flex-wrap: wrap; gap: .6rem 1rem; padding: .85rem 0; margin: 1rem 0 .3rem; border-block: 1px solid var(--line); list-style: none; font-size: .84rem; color: var(--green); }
.order-progress li::before { content: "✓ "; font-weight: 700; }
.order-progress li:last-child { color: #815814; }
.order-progress li:last-child::before { content: "◷ "; }
.passenger-note a { color: var(--green); text-decoration: underline; }
#payment-feedback:not(:empty) { margin-top: .8rem; color: var(--muted); }
.summary-operator { display: flex; align-items: center; gap: .5rem; margin-top: 1rem; }
.summary-operator img { width: 1rem; }
.journey-stops { list-style: none; padding: 0; margin: .95rem 0; }
.journey-stops li { position: relative; padding-left: 1.25rem; }
.journey-stops li + li { margin-top: .85rem; }
.journey-stops li::before {
  content: ""; position: absolute; left: 0; top: .45rem; width: .6rem; height: .6rem;
  border: 2px solid var(--deep-red); border-radius: 50%; background: white;
}
.journey-stops li:first-child::after {
  content: ""; position: absolute; top: 1.15rem; bottom: -.95rem; left: .25rem; border-left: 1px solid #b8c0c8;
}
.journey-stops li:last-child::before { background: var(--deep-red); }
.journey-stops span, .journey-facts small { display: block; color: var(--muted); font-size: .82rem; overflow-wrap: anywhere; }
.journey-facts { margin: .9rem 0; padding: .8rem 0; border-block: 1px solid var(--line); }
.journey-facts > div, .summary-price { display: flex; justify-content: space-between; align-items: baseline; gap: .75rem; }
.journey-facts > div + div { margin-top: .45rem; }
.journey-facts dt { color: var(--muted); font-size: .86rem; }
.journey-facts dd { margin: 0; max-width: 68%; font-size: .88rem; text-align: right; overflow-wrap: anywhere; }
.summary-price { font-weight: 600; }
.summary-price strong { color: var(--green); font-size: 1.3rem; }
.missing-selection { grid-column: 1 / -1; }
.missing-selection p { margin: .6rem 0 1rem; }
.missing-selection a { width: fit-content; padding-inline: 1rem; }
@media (max-width: 760px) {
  .passenger-layout { grid-template-columns: minmax(0,1fr); }
  .passenger-fields, .payment-panel, .journey-summary { grid-area: auto; }
}
@media (max-width: 480px) {
  .passenger-inputs { grid-template-columns: minmax(0,1fr); }
  .checkout-actions button { width: 100%; }
}
.live-deck {
  position: relative; width: min(100%, 50rem); aspect-ratio: var(--length) / var(--breadth);
  margin-block: .8rem; border: 1px solid #bbc5cc; border-radius: 28px 12px 12px 28px;
  background: #f4f7f7 url("assets/bus/direksiyon.png") no-repeat 2% 84% / 4%;
}
.live-seat {
  position: absolute; left: var(--x); top: var(--y); width: calc(var(--w) - 2px); height: calc(var(--h) - 2px);
  display: grid; place-content: center; line-height: 1.05; text-align: center;
}
.live-seat small { font-size: .59rem; font-weight: 500; }
.seat-conditions, .seat-summary small { color: var(--muted); font-size: .78rem; }
.seat-conditions { margin-top: .45rem; }
.live-seat.closed-seat, .seat-legend .closed::before { background: #ececec; border-style: dashed; }
.plan-reload {
  align-self: start; padding: .45rem .7rem; border: 1px solid var(--line); border-radius: 7px;
  font-size: .85rem; font-weight: 600; color: var(--ink); background: white;
}
.plan-reload:hover { border-color: #82929d; }
.plan-notice { display: flex; align-items: center; flex-wrap: wrap; gap: .8rem; padding: 1.1rem; border-top: 1px solid var(--line); background: var(--wash); }
@media (max-width: 920px) {
  .trip-main { gap: .7rem; padding: 1rem; }
  .seat-panel { grid-template-columns: minmax(0,1fr); }
  .seat-summary { padding: .85rem 0 0; border: 0; border-top: 1px solid var(--line); }
  .confirm-seat { margin-top: .25rem; }
}
@media (max-width: 680px) {
  .bus-results { padding-block: 1rem 2.5rem; }
  .result-editor summary { padding: .8rem; }
  .edit-label, .result-days a { padding: .4rem .5rem; font-size: .77rem; }
  .result-days { gap: .35rem; }
  .results-tools { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); padding: .75rem; gap: .6rem; }
  .results-tools select { min-width: 0; width: 100%; }
  #reset-filters { width: 100%; margin: 0; }
  .trip-main { grid-template-columns: minmax(0,1fr) auto; row-gap: .65rem; }
  .trip-brand { grid-area: 1 / 1; }
  .trip-fare { grid-area: 1 / 2; }
  .trip-schedule { grid-area: 2 / 1 / 3 / -1; }
  .trip-specs { grid-area: 3 / 1; }
  .seat-toggle { grid-area: 3 / 2; align-self: end; }
  .seat-panel { padding-inline: 1rem; gap: .8rem; }
  .seat-grid {
    grid-template-rows: none; grid-auto-rows: 33px; grid-template-columns: repeat(var(--across),36px);
    padding: 2.6rem .7rem .7rem; border-radius: 22px 22px 12px 12px; background-position: .8rem .4rem;
  }
  .seat { grid-column: var(--position); grid-row: var(--bay); }
  .live-deck {
    width: min(100%, 15rem); aspect-ratio: var(--breadth) / var(--length);
    border-radius: 22px 22px 12px 12px; background-position: 12% 2%; background-size: 12%;
  }
  .live-seat {
    left: calc(100% - var(--y) - var(--h)); top: var(--x);
    width: calc(var(--h) - 2px); height: calc(var(--w) - 2px);
  }
}
@media (max-width: 480px) {
  .bus-search .stations { grid-template-columns: minmax(0,1fr); gap: .4rem; }
  .bus-search .stations .field { min-height: 58px; padding-inline: .75rem 2.8rem; }
  .bus-search .swap { left: auto; right: .75rem; transform: translateY(-50%) rotate(90deg); }
}
