/* ---------------------------------------------------------------------------
   assets/css/forpay-bus.css — bus search / seats / booking / tickets
   Shared by bus.php, busTicketDetails.php and busTicketHistory.php.
   --------------------------------------------------------------------------- */

/* ---------- search (BusStopsScreen) ---------- */
.bus-hero { background: var(--fp-masthead); padding: .5rem 1rem 1.25rem; border-radius: 0 0 1.5rem 1.5rem; }
.bus-route { display: flex; align-items: center; background: var(--bs-body-bg); border: 1px solid var(--bs-border-color); border-radius: 1rem; }
.bus-route-side { flex: 1; min-width: 0; }
.bus-side { width: 100%; border: 0; background: transparent; padding: 1rem .9rem; border-radius: .75rem; color: var(--bs-body-color); text-align: left; }
.bus-side:hover { background: var(--bs-secondary-bg); }
.bus-side-label { display: flex; align-items: center; gap: 4px; font-size: .75rem; color: var(--bs-secondary-color); }
.bus-side-name { display: block; margin-top: 6px; font-weight: 700; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bus-side-name.is-empty { color: var(--bs-secondary-color); }
.bus-swap { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 50%; border: 1px solid var(--bs-border-color); background: var(--bs-body-bg);
  color: var(--bs-primary); display: flex; align-items: center; justify-content: center; transition: transform .3s; }
.bus-field-card { border: 1px solid var(--bs-border-color); border-radius: 1rem; background: var(--bs-body-bg); padding: .5rem .75rem; }
.bus-field-btn { display: flex; align-items: center; gap: .65rem; border: 0; background: transparent; color: var(--bs-body-color); padding: .35rem .25rem; min-width: 0; }
.bus-date-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.bus-step-btn { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--bs-primary); background: rgba(var(--bs-primary-rgb), .12);
  color: var(--bs-primary); display: inline-flex; align-items: center; justify-content: center; }
.bus-step-btn:disabled { border-color: var(--bs-border-color); background: transparent; color: var(--bs-secondary-color); }
.bus-chip { border: 1px solid var(--bs-border-color); background: var(--bs-body-bg); color: var(--bs-body-color); border-radius: 999px;
  padding: .3rem .8rem; font-size: .8rem; font-weight: 600; white-space: nowrap; }
.bus-chip.is-selected { background: var(--bs-primary); border-color: var(--bs-primary); color: #fff; }
.bus-chip.is-disabled { opacity: .4; }
.bus-chip-quick.is-selected { background: rgba(var(--bs-primary-rgb), .12); color: var(--bs-primary); }
.bus-recent { width: 100%; display: flex; align-items: center; gap: .75rem; padding: .75rem .9rem; margin-bottom: .5rem; border: 1px solid var(--bs-border-color);
  border-radius: .9rem; background: var(--bs-body-bg); color: var(--bs-body-color); }
.bus-recent:hover { border-color: var(--bs-primary); }
.bus-info-chip { display: inline-flex; align-items: center; gap: 3px; font-size: .72rem; font-weight: 600; padding: .2rem .5rem; border-radius: .4rem;
  background: rgba(var(--bs-primary-rgb), .07); color: var(--bs-primary); }
/* Input and icon share ONE grid cell, so the icon centres against the input's
   own height — a password-manager extension injects a 26px <img> into this
   wrapper, which used to push the magnifier below the field. */
.fp-search { position: relative; display: grid; }
.fp-search > .form-control { grid-area: 1 / 1; }
.fp-search > i { grid-area: 1 / 1; align-self: center; justify-self: start; margin-left: .875rem; color: var(--bs-secondary-color); pointer-events: none; z-index: 2; }
.fp-search .form-control { padding-left: 2.5rem; }
.bus-stop-row { width: 100%; display: flex; align-items: center; gap: .75rem; padding: .55rem .75rem; border: 0; border-radius: .5rem; background: transparent; color: var(--bs-body-color); text-align: left; }
.bus-stop-row:hover { background: var(--bs-secondary-bg); }

/* ---------- snack bar ---------- */
.bus-snack { position: fixed; left: 50%; bottom: 1.5rem; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 2000; max-width: min(92vw, 520px);
  background: #323232; color: #fff; padding: .6rem 1rem; border-radius: .5rem; font-size: .85rem; transition: opacity .2s, transform .2s; }
.bus-snack.is-on { opacity: 1; transform: translate(-50%, 0); }
.bus-snack.is-error { background: #d32f2f; border-radius: .75rem; }
.bus-snack.is-gender { background: #AD1457; border-radius: 10px; }

/* ---------- list (BusListScreen) ---------- */
.bus-datestrip { display: flex; gap: 8px; padding: .6rem .5rem; background: var(--bs-body-bg); border-bottom: 1px solid var(--bs-border-color); }
.bus-date { flex: 1; border: 1px solid var(--bs-primary); border-radius: .6rem; background: transparent; color: var(--bs-primary); padding: .5rem .25rem; font-size: .75rem; line-height: 1.3; }
.bus-date.is-selected { background: var(--bs-primary); color: #fff; }
.bus-sortbar { display: flex; align-items: center; gap: .6rem; padding: .6rem 1rem; background: var(--bs-body-bg); border-bottom: 1px solid var(--bs-border-color); }
.bus-sort { border: 1px solid var(--bs-border-color); border-radius: 20px; background: transparent; color: var(--bs-body-color); padding: .3rem .7rem; font-size: .75rem; font-weight: 600; }
.bus-sort.is-selected { border-color: var(--bs-primary); background: rgba(var(--bs-primary-rgb), .12); color: var(--bs-primary); }
.bus-list { padding: .75rem .875rem 1.5rem; max-height: 70vh; overflow-y: auto; overscroll-behavior: contain; }
.bus-card { border: 1px solid var(--bs-border-color); border-radius: .9rem; background: var(--bs-body-bg); padding: .875rem; margin-bottom: .75rem; cursor: pointer; box-shadow: 0 2px 6px rgba(0,0,0,.06); transition: border-color .15s; }
.bus-card:hover { border-color: var(--bs-primary); }
.bus-type-chip { display: inline-block; font-size: .72rem; font-weight: 600; padding: .15rem .5rem; border-radius: .25rem; background: rgba(var(--bs-primary-rgb), .08); color: var(--bs-primary); }
.bus-fare { font-size: 1.15rem; font-weight: 800; color: var(--bs-primary); white-space: nowrap; }
.bus-fab { position: fixed; right: 1.5rem; bottom: 1.5rem; width: 56px; height: 56px; border-radius: 16px; border: 0; background: var(--bs-primary); color: #fff; font-size: 1.3rem;
  box-shadow: 0 6px 16px rgba(0,0,0,.25); z-index: 1040; }
.bus-fab-badge { position: absolute; top: -4px; right: -4px; width: 18px; height: 18px; border-radius: 50%; background: var(--bs-danger); color: #fff; font-size: 9px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; }
.bus-filter { width: min(78vw, 400px) !important; border-radius: 1rem 0 0 1rem; }
.bus-filter-title { font-size: .85rem; font-weight: 700; }
.bus-range { position: relative; height: 32px; }
.bus-range-track { position: absolute; left: 0; right: 0; top: 14px; height: 4px; border-radius: 4px; background: rgba(var(--bs-primary-rgb), .2); }
.bus-range-fill { position: absolute; top: 0; height: 100%; border-radius: 4px; background: var(--bs-primary); }
.bus-range input[type=range] { position: absolute; left: 0; right: 0; top: 0; width: 100%; height: 32px; margin: 0; background: transparent; -webkit-appearance: none; pointer-events: none; }
.bus-range input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; pointer-events: auto; width: 20px; height: 20px; border-radius: 50%; background: var(--bs-primary); border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.3); cursor: pointer; }
.bus-range input[type=range]::-moz-range-thumb { pointer-events: auto; width: 20px; height: 20px; border-radius: 50%; background: var(--bs-primary); border: 2px solid #fff; cursor: pointer; }
.bus-range input[type=range]::-webkit-slider-runnable-track { background: transparent; }
.bus-range input[type=range]::-moz-range-track { background: transparent; }

/* offer / notice banners */
.bus-offer-host { margin-bottom: .6rem; }
.bus-offer-track { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 2px 5px; }
.bus-offer-track::-webkit-scrollbar { display: none; }
.bus-offer { flex: 0 0 92%; scroll-snap-align: start; position: relative; overflow: hidden; border-radius: 14px; color: #fff; height: 158px; display: flex; flex-direction: column;
  box-shadow: 0 3px 8px rgba(0,0,0,.18); }
.bus-offer.is-offer  { background: linear-gradient(135deg, #FF6D00, #FFAB00); }
.bus-offer.is-notice { background: linear-gradient(135deg, #1565C0, #1E88E5); }
.bus-offer-ghost { position: absolute; right: -10px; top: -6px; font-size: 72px; opacity: .08; }
.bus-offer-head { display: flex; align-items: center; padding: .45rem .9rem; background: rgba(0,0,0,.13); font-size: .8rem; font-weight: 700; position: relative; }
.bus-offer-body { padding: .4rem .9rem; font-size: .8rem; line-height: 1.45; overflow-y: auto; flex: 1; position: relative; color: rgba(255,255,255,.92); }
.bus-offer-body b, .bus-offer-body strong { font-weight: 700; color: #fff; }
.bus-offer-body p { margin: 0; }

/* ---------- seats (SeatLayoutScreen) ---------- */
.bus-route-strip { padding: .6rem 1rem; background: var(--bs-body-bg); border-bottom: 1px solid var(--bs-border-color); }
.bus-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem .75rem; font-size: .72rem; }
.bus-legend-dot { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 4px; vertical-align: -2px; }
.bus-legend-dot.is-avail { background: var(--bs-success); } .bus-legend-dot.is-ladies { background: #E91E63; }
.bus-legend-dot.is-restricted { background: #FFA726; } .bus-legend-dot.is-sold { background: #BDBDBD; }
.bus-legend-dot.is-blocked { background: #616161; } .bus-legend-dot.is-selected { background: var(--bs-primary); }
.bus-deck-toggle { display: flex; justify-content: center; gap: 12px; padding: .5rem; }
.bus-deck { border: 1px solid var(--bs-primary); border-radius: 20px; background: transparent; color: var(--bs-primary); padding: .45rem 1.1rem; font-size: .8rem; font-weight: 600; }
.bus-deck.is-selected { background: var(--bs-primary); color: #fff; }
.bus-deck-scroll { padding: .5rem 1rem 1rem; overflow-x: auto; max-height: 65vh; overflow-y: auto; }
.bus-deck-inner { display: flex; flex-direction: column; align-items: flex-start; }
.bus-driver-row { display: flex; justify-content: flex-end; margin-bottom: 8px; }
.bus-driver { border-radius: 10px; background: #FFF8E1; border: 1.5px solid #FFB300; color: #FFA000; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 8px; font-weight: 700; }
.bus-driver i { font-size: 18px; }
.bus-seat-row { display: flex; align-items: flex-start; }
.bus-toilet { border-radius: 10px; background: #E3F2FD; border: 1.2px solid #90CAF9; color: #42A5F5; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 8px; font-weight: 700; flex: 0 0 auto; }
.bus-toilet i { font-size: 18px; }
.bus-exit { margin-top: 4px; text-align: center; }
.bus-exit-band { border: 1px solid #FFB74D; background: #FFF3E0; color: #F57C00; border-radius: 6px; padding: 5px 0; font-size: 9px; font-weight: 800; letter-spacing: .8px; }
.bus-seat { flex: 0 0 auto; position: relative; padding: 0; border-radius: 10px; border: 1.5px solid; display: flex; flex-direction: column; overflow: hidden; background: transparent; }
.bus-seat-ic { flex: 1; display: flex; align-items: center; justify-content: center; }
.bus-seat-strip { height: 18px; line-height: 18px; font-size: 8.5px; font-weight: 700; text-align: center; }
.bus-seat-strip.is-muted { color: #9E9E9E !important; }
.bus-seat.is-selected   { border-color: var(--bs-primary); background: rgba(var(--bs-primary-rgb), .08); color: var(--bs-primary); }
.bus-seat.is-selected .bus-seat-strip { background: rgba(var(--bs-primary-rgb), .18); }
.bus-seat.is-restricted { border-color: #FFA726; background: #FFF3E0; color: #FB8C00; }
.bus-seat.is-restricted .bus-seat-strip { background: rgba(255,167,38,.18); }
.bus-seat.is-avail      { border-color: var(--bs-success); background: rgba(var(--bs-success-rgb), .04); color: var(--bs-success); }
.bus-seat.is-avail .bus-seat-strip { background: rgba(var(--bs-success-rgb), .18); }
.bus-seat.is-ladies     { border-color: #E91E63; background: rgba(233,30,99,.04); color: #E91E63; }
.bus-seat.is-ladies .bus-seat-strip { background: rgba(233,30,99,.18); }
.bus-seat.is-blocked    { border-color: #E0E0E0; background: #F5F5F5; color: #BDBDBD; }
.bus-seat.is-blocked .bus-seat-strip { background: rgba(224,224,224,.18); }
.bus-seat.is-sold       { border-color: #E0E0E0; background: #FAFAFA; color: #BDBDBD; }
.bus-seat.is-sold .bus-seat-strip { background: rgba(238,238,238,.18); }
[data-bs-theme=dark] .bus-seat.is-blocked, [data-bs-theme=dark] .bus-seat.is-sold { background: var(--bs-secondary-bg); border-color: var(--bs-border-color); color: #757575; }
[data-bs-theme=dark] .bus-seat.is-restricted { background: rgba(255,167,38,.1); }
[data-bs-theme=dark] .bus-driver { background: rgba(255,179,0,.12); } [data-bs-theme=dark] .bus-toilet { background: rgba(66,165,245,.12); } [data-bs-theme=dark] .bus-exit-band { background: rgba(255,152,0,.12); }
@keyframes bus-shake { 0%,100% { transform: translateX(0); } 10% { transform: translateX(6px); } 30% { transform: translateX(-6px); } 50% { transform: translateX(6px); } 70% { transform: translateX(-6px); } 90% { transform: translateX(6px); } }
.bus-shake { animation: bus-shake .45s; }
.bus-bottombar { display: flex; align-items: center; gap: .75rem; padding: .75rem 1rem; border-top: 1px solid var(--bs-border-color); background: var(--bs-tertiary-bg); position: sticky; bottom: 0; z-index: 5; }
.form-floating > label { z-index: 1; }

/* ---------- travellers ---------- */
.bus-box { border: 1px solid var(--bs-border-color); border-radius: .9rem; background: var(--bs-body-bg); padding: .75rem; color: var(--bs-body-color); }
.bus-ic-box { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: rgba(var(--bs-primary-rgb), .1); color: var(--bs-primary); font-size: 1.2rem; }
.bus-count-pill { font-size: .72rem; font-weight: 700; padding: .3rem .65rem; border-radius: 20px; background: rgba(var(--bs-primary-rgb), .08); color: var(--bs-primary); white-space: nowrap; }
.bus-infobox { padding: .65rem; border-radius: .75rem; background: rgba(var(--bs-warning-rgb), .12); color: var(--bs-warning-text-emphasis); font-size: .78rem; }
.bus-pax { border: 1px solid var(--bs-border-color); border-radius: 14px; background: var(--bs-body-bg); margin-bottom: .75rem; overflow: hidden; }
.bus-pax.is-filled { border: 1.5px solid rgba(var(--bs-success-rgb), .55); background: rgba(var(--bs-success-rgb), .07); }
.bus-pax.is-shaking { border: 1.5px solid rgba(var(--bs-danger-rgb), .65); background: rgba(var(--bs-danger-rgb), .04); }
.bus-pax.is-shaking .bus-missing { color: var(--bs-danger) !important; }
.bus-pax-head { display: flex; align-items: center; gap: .5rem; padding: .6rem .75rem; background: rgba(var(--bs-primary-rgb), .06); border-bottom: 1px solid var(--bs-border-color); }
.bus-pax.is-female .bus-pax-head { background: rgba(233,30,99,.08); }
.bus-pax.is-filled .bus-pax-head { background: rgba(var(--bs-success-rgb), .10); }
.bus-seat-badge { display: inline-flex; align-items: center; padding: .25rem .65rem; border-radius: 8px; background: var(--bs-primary); color: #fff; font-size: .8rem; font-weight: 800; white-space: nowrap; }
.bus-pax.is-female .bus-seat-badge, .bus-seat-badge.is-female { background: #E91E63; }
.bus-pax.is-filled .bus-seat-badge { background: var(--bs-success); }
.bus-edit-ic { border: 0; border-radius: 6px; padding: .25rem .4rem; background: rgba(var(--bs-primary-rgb), .1); color: var(--bs-primary); font-size: .8rem; }
.bus-pax.is-filled .bus-edit-ic { background: rgba(var(--bs-success-rgb), .15); color: var(--bs-success); }
.bus-avatar { width: 36px; height: 36px; flex: 0 0 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; background: rgba(var(--bs-primary-rgb), .15); color: var(--bs-primary); }
.bus-avatar.is-success { background: rgba(var(--bs-success-rgb), .15); color: var(--bs-success); }
.bus-sug { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--bs-border-color); border-radius: 20px; background: var(--bs-body-bg); color: var(--bs-body-color); padding: .35rem .7rem .35rem .4rem; font-size: .75rem; font-weight: 600; }
.bus-sug.is-applied { border: 1.5px solid var(--bs-primary); background: rgba(var(--bs-primary-rgb), .12); color: var(--bs-primary); }
.bus-sug-av { width: 18px; height: 18px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 800; background: rgba(var(--bs-primary-rgb), .15); color: var(--bs-primary); }
.bus-sug.is-applied .bus-sug-av { background: var(--bs-primary); color: #fff; }

/* ---------- boarding / dropping ---------- */
.bus-bd-tabs { display: flex; background: var(--fp-masthead); }
.bus-bd-tab { flex: 1; border: 0; border-bottom: 2px solid transparent; background: transparent; padding: .7rem .25rem; color: rgba(255,255,255,.6); font-size: .85rem; font-weight: 700; }
.bus-bd-tab.is-active { color: #fff; border-bottom-color: #fff; }
.bus-point { display: flex; align-items: flex-start; gap: .6rem; padding: .65rem .75rem; margin-bottom: .5rem; border: 1px solid var(--bs-border-color); border-radius: 12px; background: var(--bs-body-bg); cursor: pointer; }
.bus-point.is-selected { border-color: var(--bs-primary); background: rgba(var(--bs-primary-rgb), .07); }
.bus-radio { width: 18px; height: 18px; flex: 0 0 18px; border-radius: 50%; border: 2px solid var(--bs-secondary-color); margin-top: 2px; position: relative; }
.bus-radio.is-on { border-color: var(--bs-primary); }
.bus-radio.is-on::after { content: ''; position: absolute; inset: 3px; border-radius: 50%; background: var(--bs-primary); }

/* ---------- ticket details / history ---------- */
.bus-status-banner { display: flex; align-items: center; gap: .75rem; padding: .75rem; border-radius: .75rem; border: 1px solid; }
.bus-stamp { position: absolute; top: 0; right: 0; padding: 3px 8px; font-size: 9px; font-weight: 800; letter-spacing: .5px; color: #fff; border-radius: 0 .75rem 0 .5rem; }
.bus-pax-card { position: relative; border: 1px solid var(--bs-border-color); border-radius: .75rem; background: var(--bs-body-bg); overflow: hidden; margin-bottom: .5rem; }
.bus-pax-card.is-selected { border-color: var(--bs-primary); background: rgba(var(--bs-primary-rgb), .07); }
.bus-pax-card.is-cancelled { border-color: rgba(var(--bs-danger-rgb), .35); background: rgba(var(--bs-danger-rgb), .04); }
.bus-pax-main { display: flex; align-items: center; gap: .7rem; padding: .75rem; width: 100%; border: 0; background: transparent; color: var(--bs-body-color); text-align: left; }
.bus-check { width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--bs-border-color); display: inline-flex; align-items: center; justify-content: center; flex: 0 0 22px; }
.bus-check.is-on { background: var(--bs-primary); border-color: var(--bs-primary); color: #fff; }
.bus-mini-chip { display: inline-block; font-size: 10px; padding: .1rem .45rem; border-radius: 20px; background: var(--bs-secondary-bg); color: var(--bs-secondary-color); }
.bus-card-box { border: 1px solid var(--bs-border-color); border-radius: 14px; background: var(--bs-body-bg); padding: .85rem; margin-bottom: .75rem; }
.bus-slab { border: 1px solid var(--bs-border-color); border-radius: 10px; padding: .75rem; margin-bottom: .5rem; background: var(--bs-tertiary-bg); }
.bus-slab.is-current { border-color: rgba(var(--bs-danger-rgb), .3); background: rgba(var(--bs-danger-rgb), .07); }
.bus-slab.is-selected { border-color: var(--bs-primary); }
.bus-live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--bs-success); animation: bus-blink 1s infinite; margin-right: 4px; }
@keyframes bus-blink { 0%,100% { opacity: 1; } 50% { opacity: .2; } }
.bus-timeline { position: relative; padding-left: 26px; }
.bus-timeline::before { content: ''; position: absolute; left: 8px; top: 8px; bottom: 8px; width: 2px; background: var(--bs-border-color); }
.bus-tl-item { position: relative; margin-bottom: .75rem; }
.bus-tl-item::before { content: ''; position: absolute; left: -22px; top: 6px; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--bs-primary); background: var(--bs-body-bg); }
.bus-tl-item.is-sel::before { background: var(--bs-primary); }
.bus-watermark { position: absolute; right: 1rem; top: 6rem; font-size: 3rem; font-weight: 900; letter-spacing: 4px; opacity: .07; transform: rotate(-18deg); pointer-events: none; text-transform: uppercase; }
.bus-ticket { border: 1px solid var(--bs-border-color); border-radius: 1rem; background: var(--bs-body-bg); overflow: hidden; margin-bottom: .75rem; cursor: pointer; box-shadow: 0 3px 10px rgba(0,0,0,.06); }
.bus-ticket:hover { border-color: var(--bs-primary); }
.bus-dashed { height: 1px; background-image: repeating-linear-gradient(90deg, var(--bs-border-color) 0 4px, transparent 4px 6px); margin: .6rem .875rem; }
.bus-ticket-head { display: flex; align-items: center; gap: 6px; padding: .6rem .875rem; background: rgba(var(--bs-primary-rgb), .06); color: var(--bs-primary); font-weight: 700; font-size: .85rem; }
.bus-ticket-foot { display: flex; align-items: center; gap: 4px; padding: .5rem .875rem; background: rgba(var(--bs-secondary-bg-rgb, 233,236,239), .4); font-size: .75rem; color: var(--bs-secondary-color); }
.bus-status-pill { display: inline-flex; align-items: center; gap: 4px; padding: .3rem .55rem; border-radius: 8px; color: #fff; font-size: .72rem; font-weight: 800; letter-spacing: .5px; }
.bus-chip-soft { display: inline-flex; align-items: center; gap: 3px; font-size: .72rem; font-weight: 500; padding: .2rem .45rem; border-radius: .4rem; background: var(--bs-secondary-bg); color: var(--bs-secondary-color); }
