/**
 * 2008-2026 Prestaworld
 *
 * NOTICE OF LICENSE
 *
 * The source code of this module is under a commercial license.
 * Each license is unique and can be installed and used on only one website.
 * Any reproduction or representation total or partial of the module, one or more of its components,
 * by any means whatsoever, without express permission from us is prohibited.
 *
 * DISCLAIMER
 *
 * Do not alter or add/update to this file if you wish to upgrade this module to newer
 * versions in the future.
 *
 * @author    prestaworld
 * @copyright 2008-2026 Prestaworld
 * @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0
 * International Registered Trademark & Property of prestaworld
 */

/**
 * Presta Bus Booking — front search & results (Phase 1)
 */

@supports (scrollbar-gutter: stable) {
  :root {
    scrollbar-gutter: stable;
  }
}

#wbb-bus-booking.wbb-page {
  --wbb-bg: #f4f5f7;
  --wbb-card: #fff;
  --wbb-text: #1a1d21;
  --wbb-muted: #6b7280;
  --wbb-border: #e5e7eb;
  --wbb-accent: #d93a3a;
  --wbb-accent-soft: #fde8e8;
  --wbb-radius: 14px;
  --wbb-shadow: 0 12px 40px rgba(15, 23, 42, 0.08);
  max-width: 100%;
  overflow-x: hidden;
  color: var(--wbb-text);
  background: var(--wbb-bg);
  margin: 0 -1rem;
  padding: 0 0 4.5rem;
}

@media (min-width: 768px) {
  #wbb-bus-booking.wbb-page {
    margin: 0;
    border-radius: 0;
  }
}

.wbb-hero {
  background: linear-gradient(145deg, #eef0f4 0%, #f8f9fb 45%, #fdeaea 100%);
  padding: 2rem 1rem 2.5rem;
}

#wbb-bus-booking .wbb-hero--sticky {
  position: sticky;
  top: 0;
  z-index: 12;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06);
}

.wbb-hero-inner {
  max-width: 1120px;
  margin: 0 auto;
}

.wbb-hero-title {
  /* font-size: clamp(1.75rem, 4vw, 2.35rem); */
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
}

.wbb-hero-sub {
  margin: 0 0 1.25rem;
  color: var(--wbb-muted);
  /* font-size: 1.05rem; */
  font-size: 1rem;
  line-height: 1.45;
}

.wbb-alert {
  border-radius: var(--wbb-radius);
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
}

.wbb-alert-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.wbb-alert p {
  margin: 0.25rem 0;
}

.wbb-search-card {
  background: linear-gradient(165deg, #ffffff 0%, #fafbfc 55%, #fff 100%);
  border-radius: calc(var(--wbb-radius) + 6px);
  box-shadow: var(--wbb-shadow), 0 0 0 1px rgba(255, 255, 255, 0.8) inset;
  padding: 1.35rem 1.2rem 1.4rem;
  border: 1px solid rgba(15, 23, 42, 0.06);
}

/* Compact sticky search bar (matches "pill bar" screenshots) */
.wbb-search-card--compact {
  padding: 0.9rem 0.9rem;
  border-radius: 18px;
}

.wbb-searchbar {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.25rem;
}

.wbb-searchbar__row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
}

.wbb-searchbar__row--fields {
  flex-wrap: nowrap;
}

.wbb-searchbar__row--submit {
  justify-content: center;
}

.wbb-searchbar__seg {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  padding: 0.65rem 0.85rem;
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}

.wbb-searchbar__segicon {
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid rgba(226, 232, 240, 0.9);
  flex: 0 0 auto;
}

.wbb-searchbar__segbody {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.wbb-searchbar__seglabel {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #6b7280;
  line-height: 1.1;
}

.wbb-searchbar__input {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0.1rem 0 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--wbb-text);
  outline: none;
  min-width: 0;
}

.wbb-searchbar__input::placeholder {
  color: #94a3b8;
  font-weight: 600;
}

.wbb-searchbar__swap {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: linear-gradient(180deg, #fff 0%, #f1f5f9 100%);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
  cursor: pointer;
  color: #334155;
  font-size: 1.15rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.wbb-searchbar__swap:hover {
  border-color: rgba(254, 202, 202, 1);
  color: var(--wbb-accent);
}

.wbb-searchbar__pills {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.35rem;
  background: rgba(248, 250, 252, 0.95);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
  flex: 0 0 auto;
}

.wbb-search-card--compact .wbb-pill {
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  font-size: 0.9rem;
}

.wbb-searchbar__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  height: 3.25rem;
  padding: 0 1.1rem;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #e23d3d 0%, #c51f1f 100%);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 12px 26px rgba(217, 58, 58, 0.28);
  cursor: pointer;
  flex: 0 0 auto;
  min-width: 220px;
}

.wbb-searchbar__submit[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

.wbb-searchbar__submittext {
  white-space: nowrap;
}

@media (max-width: 900px) {
  .wbb-searchbar__row--fields {
    flex-wrap: wrap;
  }
  .wbb-searchbar__row--submit {
    justify-content: center;
  }
}

@media (max-width: 520px) {
  .wbb-searchbar__submittext {
    display: none;
  }
  .wbb-searchbar__submit {
    width: 3.25rem;
    padding: 0;
    min-width: 3.25rem;
  }
}

.wbb-search-rows {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.wbb-field {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.wbb-search-row--fields {
  display: grid;
  gap: 0.75rem 0.85rem;
  align-items: end;
}

@media (min-width: 900px) {
  .wbb-search-row--fields {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) minmax(11.75rem, 13.25rem);
    gap: 0.65rem 0.9rem;
    align-items: end;
  }
}

@media (max-width: 899px) {
  .wbb-search-row--fields {
    grid-template-columns: 1fr;
  }

  .wbb-swap-wrap {
    justify-self: center;
    padding: 0.15rem 0;
  }
}

.wbb-search-row--meta {
  width: 100%;
}

.wbb-date-meta-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 1rem;
  padding: 0.55rem 0.85rem;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}

@media (min-width: 900px) {
  .wbb-date-meta-bar {
    max-width: 22rem;
    margin-left: auto;
  }
}

.wbb-search-row--submit {
  display: flex;
  justify-content: stretch;
  margin-top: 0.35rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(226, 232, 240, 0.85);
}

.wbb-swap-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: end;
  padding-bottom: 0.2rem;
}

.wbb-swap-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: linear-gradient(180deg, #fff 0%, #f1f5f9 100%);
  color: #475569;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
  transition: transform 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
}

.wbb-swap-btn:hover {
  color: var(--wbb-accent);
  border-color: #fecaca;
  box-shadow: 0 4px 14px rgba(217, 58, 58, 0.12);
}

.wbb-swap-btn:active {
  transform: scale(0.96);
}

.wbb-icon-svg {
  display: block;
  color: #64748b;
}

.wbb-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--wbb-muted);
  margin-bottom: 0.35rem;
}

.wbb-label-invisible {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.wbb-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 3rem;
  border: 1px solid var(--wbb-border);
  border-radius: 12px;
  background: #fafafa;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.wbb-input-wrap--date .wbb-input {
  min-height: 2.75rem;
}

.wbb-input-wrap:focus-within {
  border-color: #cbd5e1;
  box-shadow: 0 0 0 3px rgba(217, 58, 58, 0.12);
  background: #fff;
}

.wbb-input-icon {
  padding-left: 0.65rem;
  font-size: 1rem;
  opacity: 0.85;
  user-select: none;
}

.wbb-input,
.wbb-select {
  flex: 1;
  border: 0;
  background: transparent;
  font-size: 1rem;
  padding: 0.75rem 0.65rem 0.75rem 0.35rem;
  min-width: 0;
  color: var(--wbb-text);
}

.wbb-input:focus,
.wbb-select:focus {
  outline: none;
}

.wbb-date-readable {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--wbb-text);
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.wbb-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  flex-shrink: 0;
}

.wbb-pill {
  border: 1px solid var(--wbb-border);
  background: #fff;
  border-radius: 999px;
  padding: 0.38rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--wbb-text);
  white-space: nowrap;
}

.wbb-pill:hover {
  background: #e5e7eb;
}

.wbb-pill-accent {
  /* background: var(--wbb-accent-soft); */
  /* border-color: #fecaca; */
  /* color: #b91c1c; */
}

.wbb-btn-search {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, #e84545 0%, #c62828 48%, #b91c1c 100%);
  color: #fff;
  font-weight: 600;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
  padding: 0.95rem 1.35rem;
  cursor: pointer;
  min-height: 3.15rem;
  box-shadow: 0 10px 28px rgba(185, 28, 28, 0.28);
  transition: opacity 0.15s, transform 0.1s, box-shadow 0.15s;
}

.wbb-btn-search--full {
  width: 100%;
  max-width: 100%;
}

.wbb-btn-search:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.wbb-btn-search:not(:disabled):hover {
  filter: brightness(1.04);
  box-shadow: 0 12px 32px rgba(185, 28, 28, 0.34);
}

.wbb-btn-search-icon {
  font-size: 1.25rem;
  line-height: 1;
}

.wbb-field-autocomplete {
  position: relative;
  z-index: 1;
}

.wbb-field-autocomplete:has(.wbb-ac-open) {
  z-index: 100;
}

.wbb-input-wrap.wbb-ac-open {
  z-index: 120;
}

.wbb-ac-dropdown {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 5000;
  background: var(--wbb-card);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.14);
  max-height: min(50vh, 300px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

@media (max-width: 639px) {
  .wbb-ac-dropdown {
    max-height: min(45vh, 260px);
  }
}

.wbb-ac-dropdown.wbb-ac-loading {
  min-height: 3rem;
}

.wbb-ac-dropdown.wbb-ac-loading::before {
  content: '';
  display: block;
  margin: 0.75rem auto;
  width: 1.5rem;
  height: 1.5rem;
  border: 2px solid #e5e7eb;
  border-top-color: var(--wbb-accent);
  border-radius: 50%;
  animation: wbb-spin 0.7s linear infinite;
}

@keyframes wbb-spin {
  to {
    transform: rotate(360deg);
  }
}

.wbb-ac-item {
  padding: 0.7rem 0.9rem;
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1.35;
  border-bottom: 1px solid #f3f4f6;
}

.wbb-ac-line {
  display: block;
}

.wbb-ac-city {
  font-weight: 700;
  color: #0f172a;
}

.wbb-ac-stop {
  color: #64748b;
  font-weight: 500;
}

.wbb-ac-dot {
  margin: 0 0.2rem;
  color: #94a3b8;
}

.wbb-ac-item:last-child {
  border-bottom: 0;
}

.wbb-ac-item:hover,
.wbb-ac-item[aria-selected="true"],
.wbb-ac-item--active {
  background: #fff5f5;
}

.wbb-ac-hi {
  background: #fef08a;
  color: var(--wbb-text);
  font-weight: 600;
  padding: 0 0.1em;
  border-radius: 2px;
}

.wbb-ac-empty {
  padding: 0.75rem;
  color: var(--wbb-muted);
  font-size: 0.88rem;
}

.wbb-field-hint {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  color: #b91c1c;
}

.wbb-bus-route-line {
  margin: 0.15rem 0 0.35rem;
  font-size: 0.88rem;
  color: var(--wbb-muted);
}

.wbb-empty-lead {
  margin: 0;
  color: var(--wbb-muted);
  font-size: 0.95rem;
}

.wbb-empty-card--invalid {
  border-style: solid;
  border-color: #fecaca;
  background: #fffafa;
}

.wbb-results-layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1rem 2rem;
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 992px) {
  .wbb-results-layout {
    grid-template-columns: 260px minmax(0, 1fr);
    align-items: start;
  }

  /* When filter UI is disabled, avoid leaving an empty right column. */
  .wbb-results-layout.wbb-results-layout--no-filters {
    grid-template-columns: minmax(0, 1fr);
  }
}

.wbb-filters {
  background: linear-gradient(180deg, #fff 0%, #fafbfc 100%);
  border-radius: var(--wbb-radius);
  border: 1px solid rgba(15, 23, 42, 0.06);
  padding: 1.1rem 1.1rem 1.35rem;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.06);
}

@media (min-width: 992px) {
  .wbb-filters {
    position: sticky;
    top: 1rem;
    align-self: start;
  }
}

@media (max-width: 991px) {
  .wbb-filters {
    position: fixed;
    inset: 0;
    z-index: 200;
    max-width: 100%;
    border-radius: 0;
    transform: translateX(-100%);
    transition: transform 0.22s ease;
    overflow-y: auto;
  }

  .wbb-filters.wbb-filters--open {
    transform: translateX(0);
  }
}

.wbb-filters-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

@media (min-width: 992px) {
  .wbb-filters-header {
    display: none;
  }
}

.wbb-filters-title {
  margin: 0;
  font-size: 1.1rem;
}

.wbb-filters-close {
  border: 0;
  background: #f3f4f6;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.wbb-filter-block {
  margin-bottom: 1rem;
}

.wbb-filter-heading {
  margin: 0 0 0.45rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--wbb-muted);
}

.wbb-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.wbb-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.82rem;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--wbb-border);
  background: #fafafa;
  cursor: pointer;
  user-select: none;
}

.wbb-chip:has(input:checked) {
  border-color: var(--wbb-accent);
  background: var(--wbb-accent-soft);
}

.wbb-chip input {
  margin: 0;
}

.wbb-price-range {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.wbb-input-small {
  border: 1px solid var(--wbb-border);
  border-radius: 10px;
  padding: 0.45rem 0.5rem;
  max-width: 7rem;
}

.wbb-price-sep {
  color: var(--wbb-muted);
}

.wbb-select {
  width: 100%;
  border: 1px solid var(--wbb-border);
  border-radius: 10px;
  padding: 0.55rem 0.65rem;
  background: #fafafa;
}

.wbb-btn-secondary {
  border: 1px solid var(--wbb-border);
  background: #fff;
  border-radius: 10px;
  padding: 0.55rem;
  cursor: pointer;
  font-weight: 500;
}

.wbb-btn-secondary:hover {
  background: #f9fafb;
}

.wbb-btn-block {
  width: 100%;
  margin-top: 0.5rem;
}

.wbb-results-toolbar {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .wbb-results-toolbar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.wbb-results-count {
  margin: 0;
  font-weight: 600;
}

.wbb-sort {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  font-size: 0.88rem;
}

.wbb-sort-label {
  color: var(--wbb-muted);
  margin-right: 0.15rem;
}

.wbb-sort-btn {
  border: 1px solid var(--wbb-border);
  background: #f8fafc;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  cursor: pointer;
  color: #475569;
  font-size: 0.82rem;
  font-weight: 500;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.wbb-sort-btn:hover {
  border-color: #cbd5e1;
  background: #fff;
}

.wbb-sort-btn--active {
  font-weight: 700;
  color: #b91c1c;
  background: var(--wbb-accent-soft);
  border-color: #fecaca;
}

.wbb-card-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.wbb-bus-card {
  background: linear-gradient(165deg, #ffffff 0%, #fafbfc 40%, #fff 100%);
  border-radius: calc(var(--wbb-radius) + 2px);
  border: 1px solid rgba(15, 23, 42, 0.07);
  padding: 1.15rem 1.2rem 1.2rem;
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.06);
}

.wbb-bus-card[hidden] {
  display: none !important;
}

.wbb-bus-card-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  align-items: flex-start;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid #eef0f4;
}

.wbb-operator {
  margin: 0 0 0.2rem;
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.wbb-operator-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.wbb-operator-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #fff;
  object-fit: cover;
  flex: 0 0 auto;
  box-shadow: 0 1px 6px rgba(15, 23, 42, 0.06);
}

.wbb-bus-card-head-badges {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
}

.wbb-rating-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.wbb-rating-badge--muted {
  background: #f1f5f9;
  color: #64748b;
  border-color: #e2e8f0;
  font-weight: 600;
}

.wbb-price-block {
  text-align: right;
}

.wbb-price {
  margin: 0;
  font-size: 1.28rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.wbb-price-hint {
  margin: 0.1rem 0 0;
  font-size: 0.75rem;
  color: var(--wbb-muted);
}

.wbb-bus-card-type-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.75rem 0 0.85rem;
}

@media (min-width: 640px) {
  .wbb-bus-card-type-row {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 1rem;
  }
}

.wbb-bus-meta {
  margin: 0;
  color: var(--wbb-muted);
  font-size: 0.88rem;
}

.wbb-amenities-mini {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.wbb-amenities-mini li {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #475569;
}

.wbb-amenities-mini--empty {
  margin: 0;
  font-size: 0.82rem;
  color: #94a3b8;
  font-style: italic;
}

.wbb-bus-card-time-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.35rem 0.5rem;
  align-items: center;
  padding: 0.85rem 0;
  border-bottom: 1px solid #eef0f4;
}

.wbb-time-block {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.wbb-time-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--wbb-muted);
  font-weight: 600;
}

.wbb-time {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.wbb-time-arrow {
  color: #cbd5e1;
  font-size: 1.1rem;
  padding: 0 0.15rem;
}

.wbb-time-meta {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
  margin-top: 0.35rem;
}

@media (min-width: 560px) {
  .wbb-bus-card-time-row {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto;
    /* gap: 0.5rem 0.65rem; */
    gap: 0.5rem 7.9rem;
  }

  .wbb-time-meta {
    grid-column: auto;
    margin-top: 0;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
  }
}

.wbb-duration-pill,
.wbb-seats-pill {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.wbb-bus-card-bottom {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding-top: 0.85rem;
}

.wbb-bus-card-thumb-row {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

@media (min-width: 520px) {
  .wbb-bus-card-thumb-row {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
  }
}

.wbb-bus-thumb {
  flex-shrink: 0;
  width: 100%;
  max-width: 140px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}

.wbb-bus-thumbs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: nowrap;
  min-width: 0;
}

.wbb-bus-thumb--btn {
  padding: 0;
  cursor: pointer;
  background: transparent;
}

.wbb-bus-thumb--btn:active {
  transform: scale(0.98);
}

.wbb-bus-thumb img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  aspect-ratio: 5 / 3;
}

.wbb-bus-thumb--placeholder {
  aspect-ratio: 5 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 0.8rem;
  font-weight: 600;
}

.wbb-bus-card-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
}

.wbb-card-link-muted {
  font-size: 0.78rem;
  color: #94a3b8;
  font-weight: 600;
  padding: 0.15rem 0.25rem;
}

.wbb-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #e84545 0%, #c62828 100%);
  color: #fff;
  font-weight: 600;
  padding: 0.65rem 1.15rem;
  cursor: pointer;
  width: 100%;
  box-shadow: 0 6px 18px rgba(185, 28, 28, 0.22);
}

@media (min-width: 520px) {
  .wbb-bus-card-bottom .wbb-btn-primary {
    width: auto;
    align-self: flex-end;
    min-width: 9.5rem;
  }
}

.wbb-btn-primary:hover {
  filter: brightness(1.06);
}

a.wbb-btn-view-seats {
  text-decoration: none;
  box-sizing: border-box;
  text-align: center;
}

.wbb-card-link-btn {
  border: 0;
  background: transparent;
  padding: 0.2rem 0.15rem;
  margin: 0;
  font-size: 0.84rem;
  font-weight: 600;
  color: #1d4ed8;
  cursor: pointer;
  text-decoration: none;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}

.wbb-card-link-btn:hover {
  color: #1e40af;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.wbb-card-link-btn:focus-visible {
  outline: 2px solid rgba(37, 99, 235, 0.45);
  outline-offset: 2px;
}

.wbb-muted {
  color: var(--wbb-muted);
  margin-right: 0.35rem;
}

.wbb-filter-zero-msg {
  background: linear-gradient(135deg, #fffbeb 0%, #fff7ed 100%);
  border: 1px solid #fcd34d;
  border-radius: var(--wbb-radius);
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.92rem;
  color: #92400e;
  line-height: 1.45;
}

#wbb-detail-modal[hidden] {
  display: none !important;
}

#wbb-detail-modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}

@media (min-width: 640px) {
  #wbb-detail-modal {
    align-items: center;
    padding: 1.5rem;
  }
}

.wbb-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(3px);
}

.wbb-modal-dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 520px;
  max-height: min(88vh, 640px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -8px 40px rgba(15, 23, 42, 0.18);
  animation: wbb-modal-in 0.28s ease-out;
}

@media (min-width: 640px) {
  .wbb-modal-dialog {
    border-radius: 20px;
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.22);
  }
}

@keyframes wbb-modal-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.wbb-modal-x {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  border-radius: 999px;
  background: #f3f4f6;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  color: var(--wbb-text);
  transition: background 0.15s;
}

.wbb-modal-x:hover {
  background: #e5e7eb;
}

.wbb-modal-heading {
  margin: 0;
  padding: 1.35rem 3rem 0.75rem 1.35rem;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  border-bottom: 1px solid #f3f4f6;
  background: linear-gradient(180deg, #fafafa 0%, #fff 100%);
}

.wbb-modal-content {
  padding: 1.1rem 1.35rem 1.5rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--wbb-text);
}

.wbb-modal-photos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

@media (min-width: 720px) {
  .wbb-modal-photos {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.wbb-modal-photo {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: #f8fafc;
}

/* Photo carousel (listing modal) */
.wbb-photo-stage {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  gap: 10px;
  align-items: center;
}

.wbb-photo-main {
  width: 100%;
  max-height: min(62vh, 520px);
  object-fit: contain;
  background: #0b1220;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.wbb-photo-nav {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(255, 255, 255, 0.92);
  color: #0f172a;
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.wbb-photo-nav:active {
  transform: scale(0.98);
}

.wbb-photo-meta {
  display: flex;
  justify-content: center;
  margin-top: 0.5rem;
  color: #64748b;
  font-weight: 700;
}

@media (max-width: 520px) {
  .wbb-photo-stage {
    grid-template-columns: 38px minmax(0, 1fr) 38px;
    gap: 8px;
  }
  .wbb-photo-nav {
    width: 38px;
    height: 38px;
    font-size: 24px;
  }
}

.wbb-modal-section {
  margin-bottom: 1.25rem;
}

.wbb-modal-section:last-child {
  margin-bottom: 0;
}

.wbb-modal-section h3 {
  margin: 0 0 0.65rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--wbb-muted);
  font-weight: 700;
}

.wbb-modal-point {
  border: 1px solid #eef0f4;
  border-radius: 12px;
  padding: 0.75rem 0.85rem;
  margin-bottom: 0.55rem;
  background: #fcfcfd;
}

.wbb-modal-point:last-child {
  margin-bottom: 0;
}

.wbb-modal-point-name {
  font-weight: 700;
  margin: 0 0 0.25rem;
  color: var(--wbb-text);
}

.wbb-modal-point-meta {
  margin: 0;
  font-size: 0.86rem;
  color: var(--wbb-muted);
}

.wbb-modal-policy {
  margin: 0;
  padding: 0.85rem 1rem;
  background: #f9fafb;
  border-radius: 12px;
  border: 1px solid #eef0f4;
}

body.wbb-modal-open {
  overflow: hidden;
}

.wbb-empty-card {
  background: var(--wbb-card);
  border-radius: var(--wbb-radius);
  border: 1px dashed #d1d5db;
  padding: 2rem 1.5rem;
  text-align: center;
}

.wbb-empty-card--large {
  padding: 2.5rem 1.5rem 2.75rem;
  border-style: solid;
  border-color: #e2e8f0;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.06);
}

.wbb-empty-visual {
  width: 3.5rem;
  height: 3.5rem;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #f1f5f9;
  font-size: 1.65rem;
}

.wbb-empty-card--invalid .wbb-empty-visual {
  background: #fef2f2;
}

.wbb-empty-title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.2rem, 3.5vw, 1.45rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.wbb-empty-lead--muted {
  margin-top: 0.5rem;
  font-size: 0.9rem;
}

.wbb-empty-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
  margin-top: 1.5rem;
}

.wbb-empty-actions .wbb-btn-primary {
  width: auto;
  min-width: 10rem;
}

.wbb-btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.85rem;
  padding: 0 1.25rem;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #334155;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}

.wbb-btn-ghost:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
  text-decoration: none;
  color: #0f172a;
}

.wbb-empty-tips {
  text-align: left;
  max-width: 28rem;
  margin: 1rem auto 0;
  padding-left: 1.25rem;
  color: var(--wbb-muted);
  line-height: 1.55;
}

.wbb-mobile-filter-btn {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  left: 1rem;
  z-index: 40;
  border: 0;
  border-radius: 999px;
  padding: 0.85rem;
  font-weight: 600;
  background: var(--wbb-text);
  color: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  cursor: pointer;
}

@media (min-width: 992px) {
  .wbb-mobile-filter-btn {
    display: none;
  }
}

body.wbb-filters-open {
  overflow: hidden;
}

.wbb-toast {
  position: fixed;
  bottom: 5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  background: #1f2937;
  color: #fff;
  padding: 0.65rem 1rem;
  border-radius: 10px;
  font-size: 0.9rem;
  max-width: min(92vw, 360px);
  text-align: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.wbb-toast.wbb-toast--visible {
  opacity: 1;
  pointer-events: auto;
}
