/* Bus Booking: the J&J website look (theme.css tokens) for the product shell, home page and product-specific widgets.
   Screens themselves use @jandj/ui, coloured by src/theme.ts. Served from public/ as-is (not bundled). */
@import url("theme.css");
@import url("workspaces.css");

/* the bus brand: red primary over the J&J palette (keep in step with src/theme.ts) */
:root,
:root[data-theme="light"] {
  --color-primary: #e11d24;
  --color-primary-hover: #b9151b;
  --color-primary-dark: #b9151b;
  --color-primary-rgb: 225, 29, 36;
  --scroll-bar-color: #e11d24;
}

:root {
  --bb-container: 1300px;
  --bb-header-h: 72px;
  --bb-tint: rgba(var(--color-primary-rgb), 0.08);
}

html {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  font-family: var(--font-family-primary);
  color: var(--textBlue);
  background: var(--color-background-secondary);
}

.bb-container {
  max-width: var(--bb-container);
  margin: 0 auto;
  padding: 0 16px;
}

.bb-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.bb-main {
  flex: 1;
}

/* ---------------- Header ---------------- */

.bb-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg-white);
  box-shadow: 0 6px 20px rgba(var(--color-shadow-rgb), 0.06);
}

.bb-header__inner {
  min-height: var(--bb-header-h);
  display: flex;
  align-items: center;
  gap: 24px;
}

.bb-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex: none;
}

.bb-logo__img {
  height: 60px;
  width: auto;
  display: block;
}

.bb-logo__product {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-primary);
  background: var(--bb-tint);
  border-radius: var(--radius-2xl);
  padding: 4px 12px;
  white-space: nowrap;
}

.bb-nav {
  flex: 1;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0 30px;
  align-self: stretch;
}

/* links run the full header height, so the active underline sits on the header's bottom edge */
.bb-nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 0 6px;
  color: var(--textBlack);
  text-decoration: none;
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-medium);
  transition: color 0.2s ease;
}

.bb-nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--color-primary);
  transform: scaleX(0);
  transition: transform 0.25s ease;
}

.bb-nav__link:hover,
.bb-nav__link.active {
  color: var(--color-primary);
}

.bb-nav__link.active::after {
  transform: scaleX(1);
}

.bb-header__actions {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: none;
}

/* header dropdowns (language, account) */
.bb-menu {
  position: relative;
}

.bb-menu__button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 6px;
  border: none;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--textBlack);
  font-family: inherit;
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
}

.bb-menu__button:hover {
  color: var(--color-primary);
}

.bb-menu__chevron {
  transition: transform 0.2s ease;
}
.bb-menu__button[aria-expanded="true"] .bb-menu__chevron {
  transform: rotate(180deg);
}

.bb-menu__panel {
  position: absolute;
  z-index: 1100;
  top: calc(100% + 10px);
  right: 0;
  min-width: 200px;
  padding: 6px;
  border: 1px solid var(--color-border-primary);
  border-radius: var(--radius-md);
  background: var(--bg-white);
  box-shadow: 0 16px 34px rgba(var(--color-shadow-rgb), 0.16);
}

.bb-menu__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.bb-menu__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 9px 12px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--textBlack);
  font-family: inherit;
  font-size: var(--font-size-md);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.bb-menu__item:hover,
.bb-menu__item:focus-visible {
  background: rgba(var(--color-primary-rgb), 0.08);
  color: var(--color-primary);
  outline: none;
}

.bb-menu__item--current {
  color: var(--color-primary);
  font-weight: var(--font-weight-semibold);
}
.bb-menu__item--danger {
  color: var(--color-primary);
}

.bb-menu__divider {
  height: 1px;
  margin: 6px 4px;
  background: var(--color-border-primary);
}

.bb-account__email {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* signed out: the red Login / Sign Up button */
.bb-login {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 26px;
  border-radius: var(--radius-lg);
  background: var(--color-primary);
  color: var(--color-text-inverse);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-medium);
  text-decoration: none;
  white-space: nowrap;
  /* box-shadow: 0 6px 16px rgba(var(--color-primary-rgb), 0.3); */
  transition: background-color 0.2s ease;
}

.bb-login:hover {
  background: var(--color-primary-dark);
}

.bb-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.4px;
  padding: 10px 22px;
  border-radius: var(--radius-2xl);
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 0.25s ease,
    color 0.25s ease,
    border-color 0.25s ease,
    opacity 0.25s ease;
}

.bb-pill--solid {
  border: none;
  color: var(--color-text-inverse);
  background: linear-gradient(
    135deg,
    var(--color-accent) 0%,
    var(--bg-primary) 100%
  );
}

.bb-pill--solid:hover {
  opacity: 0.9;
}

.bb-pill--outline {
  color: var(--textBlue);
  background: transparent;
  border: 1.5px solid var(--color-border-primary);
}

.bb-pill--outline:hover {
  color: var(--color-text-inverse);
  background: var(--color-primary);
  border-color: var(--color-primary);
}

.bb-menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--color-background-secondary);
  color: var(--textBlue);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex: none;
}

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* ---------------- Footer ---------------- */

.bb-footer {
  margin-top: 48px;
  background: #0b1424;
  color: var(--color-text-inverse-light);
  /* border-radius: var(--radius-xl) var(--radius-xl) 0 0; */
  font-size: var(--font-size-md);
}

.bb-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 32px 64px;
  padding: 36px 0px 28px 0px;
}

.bb-footer__about {
  flex: 1 1 300px;
  max-width: 380px;
  margin-right: auto;
}

.bb-footer__col {
  flex: 0 0 auto;
  min-width: 120px;
}

.bb-footer__brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.bb-footer__mark {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-inverse);
  background: linear-gradient(
    135deg,
    var(--color-primary) 0%,
    var(--color-primary-dark) 100%
  );
}

.bb-footer__name {
  display: block;
  color: var(--color-text-inverse);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  line-height: 1.2;
}

.bb-footer__tagline {
  display: block;
  font-size: 12px;
  color: var(--color-text-inverse-muted);
}

.bb-footer__text {
  margin: 16px 0 0;
  font-size: var(--font-size-sm);
  line-height: var(--line-height-md);
  color: var(--color-text-inverse-lighter);
}

.bb-footer__social {
  display: flex;
  gap: 12px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.bb-footer__social-link {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
}

.bb-footer__social-link:hover {
  transform: translateY(-2px);
}
.bb-footer__social-link--facebook {
  background: #1877f2;
}
.bb-footer__social-link--instagram {
  background: linear-gradient(45deg, #f58529, #dd2a7b, #8134af);
}
.bb-footer__social-link--youtube {
  background: #ff0000;
}
.bb-footer__social-link--linkedin {
  background: #0a66c2;
}

.bb-footer__title {
  margin: 0 0 14px;
  color: var(--color-text-inverse);
  font-weight: var(--font-weight-semibold);
}

.bb-footer__links,
.bb-footer__contact {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.bb-footer__contact li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--color-text-inverse-light);
  overflow-wrap: anywhere;
}

.bb-footer__contact svg {
  flex: none;
  margin-top: 1px;
  color: var(--color-text-inverse);
}

.bb-footer__link {
  color: var(--color-text-inverse-light);
  text-decoration: none;
  transition: color 0.2s ease;
  font-size: var(--font-size-sm);
}

.bb-footer__link:hover {
  color: var(--color-primary);
}

.bb-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  padding: 16px 0px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--color-text-inverse-light);
}

.bb-footer__mottos {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--font-size-sm);
}

.bb-footer__mottos li + li::before {
  content: "|";
  margin: 0 12px;
  color: var(--color-text-inverse-muted);
}

/* ---------------- Home: hero, search card, highlights ---------------- */

.bb-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* light hero: the photo washed out to white on the left, so dark text reads on it */
.bb-hero {
  position: relative;
  color: var(--textBlack);
  background:
    linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.96) 0%,
      rgba(255, 255, 255, 0.9) 48%,
      rgba(255, 255, 255, 0.55) 64%,
      rgba(255, 255, 255, 0) 80%
    ),
    url("../images/hero_img.png") right center / cover no-repeat,
    var(--bg-white);
}

.bb-hero__content {
  padding-top: 72px;
  padding-bottom: 150px;
}

.bb-hero__eyebrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 16px;
  margin: 0 0 14px;
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-semibold);
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--textBlack);
}

.bb-hero__sep {
  color: var(--textMediumGrey);
  letter-spacing: 0;
}

.bb-hero__title {
  margin: 0;
  max-width: 680px;
  font-size: clamp(38px, 5.4vw, 66px);
  font-weight: var(--font-weight-black);
  line-height: 1.05;
  letter-spacing: -1px;
  color: var(--textBlue);
}

.bb-hero__title-line {
  display: block;
}

.bb-hero__title em {
  font-style: normal;
  color: var(--color-primary);
}

.bb-hero__description {
  margin: 18px 0 0;
  max-width: 560px;
  font-size: var(--font-size-xl);
  line-height: 1.5;
  color: var(--textDarkGrey);
}

.bb-hero__highlights {
  display: flex;
  flex-wrap: wrap;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}

.bb-hero__highlight {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 22px;
}

.bb-hero__highlight:first-child {
  padding-left: 0;
}
.bb-hero__highlight + .bb-hero__highlight {
  border-left: 1px solid rgba(0, 0, 0, 0.12);
}

.bb-hero__highlight-icon {
  display: inline-flex;
  flex: none;
  color: var(--color-primary);
}

.bb-hero__highlight-label {
  max-width: 120px;
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-medium);
  line-height: 1.3;
  color: var(--textBlack);
}

.bb-search-wrap {
  position: relative;
  margin-top: -112px;
}

.bb-search-wrap__alert {
  margin-bottom: 12px;
}

.bb-trip-types {
  display: inline-flex;
  gap: 8px;
  padding: 8px;
  background: var(--bg-white);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: 0 -6px 18px rgba(var(--color-shadow-rgb), 0.08);
}

.bb-trip-type {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 160px;
  padding: 11px 26px;
  border: none;
  border-radius: var(--radius-md);
  background: #eef0f3;
  color: var(--textBlack);
  font-family: inherit;
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-semibold);
}

.bb-trip-type svg {
  flex: none;
}

/* not available yet (Round Trip, Multi City): same look as the design, but no pointer */
.bb-trip-type:disabled {
  cursor: not-allowed;
}

.bb-trip-type--active {
  background: var(--color-primary);
  color: var(--color-text-inverse);
  box-shadow: 0 4px 12px rgba(var(--color-primary-rgb), 0.35);
}

.bb-search-card {
  background: var(--bg-white);
  border-radius: 0 var(--radius-xl) var(--radius-xl) var(--radius-xl);
  box-shadow: 0 0px 20px rgba(var(--color-shadow-rgb), 0.16);
  padding: 22px 22px 16px;
}

/* the search form (home card and results page). The @jandj/ui fields are restyled here (MUI class names) to the
   design: fixed labels above 54px fields, no floating-label notch, a solid red Search button. */
.bb-search-row {
  --bb-field-h: 54px;
  --bb-label-h: 26px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.bb-search-row__place {
  flex: 1 1 0;
  min-width: 0;
}
.bb-search-row__date {
  flex: 0 0 205px;
}
.bb-search-row__passengers {
  flex: 0 0 150px;
}
.bb-search-row__submit {
  flex: 0 0 190px;
  padding-top: var(--bb-label-h);
}

.bb-search-row .MuiInputLabel-root {
  position: static;
  transform: none;
  max-width: none;
  height: var(--bb-label-h);
  margin: 0;
  font-family: var(--font-family-primary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  line-height: 20px;
  color: var(--textBlue);
}

.bb-search-row .MuiInputLabel-root.Mui-focused {
  color: var(--color-primary);
}
.bb-search-row .MuiInputLabel-asterisk {
  display: none;
}

.bb-search-row .MuiOutlinedInput-root,
.bb-search-row .MuiPickersOutlinedInput-root {
  min-height: var(--bb-field-h);
  border-radius: var(--radius-md);
  background: var(--bg-white);
}

.bb-search-row .MuiOutlinedInput-notchedOutline,
.bb-search-row .MuiPickersOutlinedInput-notchedOutline {
  top: 0;
  border-radius: var(--radius-md);
}

.bb-search-row .MuiOutlinedInput-notchedOutline legend,
.bb-search-row .MuiPickersOutlinedInput-notchedOutline legend {
  display: none;
}

.bb-search-row .MuiInputBase-input::placeholder {
  color: var(--textMediumGrey);
  opacity: 1;
}

.bb-search-row .MuiInputAdornment-positionStart {
  color: var(--textDarkGrey);
}

.bb-search-row .MuiFormHelperText-root {
  margin: 4px 2px 0;
  font-size: 12px;
}

.bb-search-row__submit .MuiButton-root {
  height: var(--bb-field-h);
  border-radius: var(--radius-md);
  font-family: var(--font-family-primary);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  text-transform: capitalize;
  /* box-shadow: 0 6px 16px rgba(var(--color-primary-rgb), 0.3);*/
}

.bb-search-row__submit .MuiButton-startIcon {
  margin-right: 10px;
}

/* the clear (⊗) button inside From / To, at the field's right */
.bb-field-clear {
  position: absolute;
  z-index: 1;
  top: calc(var(--bb-label-h) + (var(--bb-field-h) - 28px) / 2);
  right: 8px;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--textMediumGrey);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.bb-field-clear:hover {
  color: var(--textBlack);
  background: var(--bg-light-grey);
}

.bb-search-row__place .MuiInputBase-input {
  padding-right: 34px;
  font-size: var(--font-size-md);
}
.bb-search-row__date .MuiPickersSectionList-root{
   font-size: var(--font-size-md);
}

/* Journey Date: the calendar button on the left, like the other fields' icons */
.bb-search-row__date .MuiPickersInputBase-root {
  flex-direction: row-reverse;
  justify-content: flex-end;
}
.bb-search-row__date .MuiPickersInputBase-root .MuiInputAdornment-root {
  margin: 0 6px 0 -6px;
}
.bb-search-row__date .MuiPickersSectionList-root {
  flex: 1;
}

/* an outlined calendar (like the other fields' line icons) in place of the picker's filled one; the button still
   opens the calendar */
.bb-search-row__date .MuiInputAdornment-root .MuiIconButton-root {
  margin-right: 0;
  color: var(--textDarkGrey);
}
.bb-search-row__date .MuiInputAdornment-root .MuiIconButton-root svg {
  display: none;
}
.bb-search-row__date .MuiInputAdornment-root .MuiIconButton-root::before {
  content: "";
  width: 20px;
  height: 20px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4M7 14h2M11 14h2M15 14h2M7 17.5h2M11 17.5h2'/%3E%3C/svg%3E")
    center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4M7 14h2M11 14h2M15 14h2M7 17.5h2M11 17.5h2'/%3E%3C/svg%3E")
    center / contain no-repeat;
}
.bb-search-row__date .MuiInputAdornment-root .MuiIconButton-root:hover {
  color: var(--color-primary);
}

/* Passengers: a person icon over the select's left edge */
.bb-search-row__passengers {
  position: relative;
}

.bb-field-icon {
  position: absolute;
  z-index: 1;
  top: calc(var(--bb-label-h) + (var(--bb-field-h) - 20px) / 2);
  left: 14px;
  display: inline-flex;
  color: var(--textDarkGrey);
  pointer-events: none;
}

.bb-search-row__passengers .MuiNativeSelect-select {
  padding-left: 44px;
  font-size: var(--font-size-md);
}

/* until From and To are chosen: the same red, faded (not grey) */
.bb-search-row__submit .MuiButton-root.Mui-disabled {
  color: var(--color-text-inverse);
  background: rgba(var(--color-primary-rgb), 0.45);
  box-shadow: none;
}

/* place suggestions: a dropdown under the field */
.bb-search-row__place > .MuiStack-root {
  position: relative;
}

.bb-place-menu {
  position: absolute;
  z-index: 20;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 280px;
  overflow-y: auto;
  padding: 6px;
  background: var(--bg-white);
  border: 1px solid var(--color-border-primary);
  border-radius: var(--radius-md);
  box-shadow: 0 14px 30px rgba(var(--color-shadow-rgb), 0.16);
}

.bb-place-menu .MuiButton-root {
  justify-content: flex-start;
  width: 100%;
  padding: 8px 10px;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--textBlue);
  font-family: var(--font-family-primary);
  font-weight: var(--font-weight-medium);
  text-align: left;
}

.bb-place-menu .MuiButton-root:hover,
.bb-place-menu .MuiButton-root:focus-visible {
  border: none;
  background: rgba(var(--color-primary-rgb), 0.08);
  color: var(--color-primary);
}

.bb-swap {
  flex: none;
  width: 42px;
  height: 42px;
  margin-top: calc(var(--bb-label-h) + (var(--bb-field-h) - 42px) / 2);
  border-radius: 50%;
  border: none;
  background: rgba(var(--color-primary-rgb), 0.1);
  color: var(--color-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    transform 0.25s ease;
}

.bb-swap:hover:not(:disabled) {
  background: rgba(var(--color-primary-rgb), 0.18);
  transform: rotate(180deg);
}

.bb-swap:disabled {
  cursor: default;
  opacity: 0.5;
}

.bb-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 24px;
  margin: 16px 0 0;
  padding: 14px 4px 0;
  border-top: 1px solid var(--color-border-primary);
  list-style: none;
}

.bb-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-medium);
  color: var(--textBlue);
}

.bb-badge__check {
  flex: none;
  color: var(--color-primary);
}

.bb-features {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  margin: 40px 0 0;
  padding: 8px 0;
  list-style: none;
}

.bb-feature {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.bb-feature__icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  background: rgba(var(--color-primary-rgb), 0.1);
  margin-bottom: 14px;
  transition: transform 0.25s ease;
  border: 4px solid #fff;
}

.bb-feature:hover .bb-feature__icon {
  transform: translateY(-3px);
}

.bb-feature__title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  color: var(--textBlack);
}

.bb-feature__text {
  margin-top: 6px;
  font-size: var(--font-size-md);
  color: var(--textDarkGrey);
}

@media (max-width: 720px) {
  .bb-features {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 16px;
    margin-top: 32px;
  }
  .bb-feature__icon {
    width: 56px;
    height: 56px;
  }
  .bb-feature__title {
    font-size: var(--font-size-md);
  }
  .bb-feature__text {
    font-size: var(--font-size-sm);
  }
}

@media (prefers-reduced-motion: reduce) {
  .bb-feature__icon {
    transition: none;
  }
}

/* ---------------- Home: carousel sections (offers, popular routes) ---------------- */

.bb-section-title {
  margin: 0;
  font-size: clamp(24px, 3vw, var(--font-size-3xl));
  font-weight: var(--font-weight-bold);
  color: var(--textBlue);
}

.bb-section-subtitle {
  margin: 6px 0 0;
  font-size: var(--font-size-md);
  color: var(--textDarkGrey);
}

.bb-carousel-section {
  margin-top: 56px;
}

.bb-carousel-section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 24px;
  margin-bottom: 20px;
}

.bb-carousel-section__actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.bb-carousel-section__all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--color-primary);
  font-weight: var(--font-weight-regular);
  text-decoration: none;
  text-underline-offset: 4px;
  font-size: var(--font-size-md);
}

.bb-carousel-section__all:hover {
  color: var(--color-primary-dark);
}

.bb-carousel-section__nav {
  display: inline-flex;
  gap: 8px;
}

.bb-scroll-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--color-border-primary);
  background: var(--bg-white);
  color: var(--textBlue);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

.bb-scroll-btn:hover:not(:disabled) {
  color: var(--color-text-inverse);
  background: var(--color-primary);
  border-color: var(--color-primary);
}

.bb-scroll-btn:disabled {
  cursor: default;
  opacity: 0.4;
}

/* carousel: the track moves by one card (its width + the gap); --bb-per-view and --bb-index come from the component */
.bb-carousel {
  --bb-gap: 20px;
  /* clip (not hidden): the row can't be scrolled at all, only moved by the carousel */
  overflow: hidden;
  overflow: clip;
  padding: 4px 0 12px;
  margin: -4px 0 0;
  touch-action: pan-y;
}

.bb-carousel__track {
  display: flex;
  gap: var(--bb-gap);
  margin: 0;
  padding: 0;
  list-style: none;
  transform: translateX(
    calc(var(--bb-index) * (100% + var(--bb-gap)) / var(--bb-per-view) * -1)
  );
}

.bb-carousel__track--animate {
  transition: transform 0.55s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.bb-carousel__track > .bb-carousel__item {
  display: flex;
  flex: 0 0
    calc((100% - (var(--bb-per-view) - 1) * var(--bb-gap)) / var(--bb-per-view));
}

/* the card fills its slide, so every card in a row has the same height */
.bb-carousel__item > * {
  flex: 1;
  min-width: 0;
}

.bb-carousel__dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 6px;
}

.bb-carousel__dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgba(var(--color-primary-rgb), 0.25);
  cursor: pointer;
  transition:
    width 0.3s ease,
    background-color 0.3s ease;
}

.bb-carousel__dot--active {
  width: 24px;
  background: var(--color-primary);
}

.bb-offer {
  position: relative;
  overflow: hidden;
  min-height: 170px;
  padding: 20px 22px;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.bb-offer--peach {
  background: linear-gradient(135deg, #fff4ea 0%, #ffe3cc 100%);
}
.bb-offer--sky {
  background: linear-gradient(135deg, #eef7ff 0%, #cfe6fb 100%);
}
.bb-offer--lavender {
  background: linear-gradient(135deg, #f5f0ff 0%, #e2d7fb 100%);
}

.bb-offer__art {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 58%;
  height: 100%;
  background-repeat: no-repeat;
  background-position: right bottom;
  background-size: contain;
  pointer-events: none;
}

.bb-offer__body {
  position: relative;
  max-width: 62%;
}

.bb-offer__kicker {
  margin: 0;
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  color: var(--textBlack);
}

.bb-offer__headline {
  margin: 0;
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  line-height: 1.25;
  color: var(--textBlack);
}

.bb-offer__headline strong {
  color: var(--color-primary);
  font-weight: inherit;
}

.bb-offer__kicker + .bb-offer__headline {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-semibold);
}

.bb-offer__subline {
  margin: 2px 0 0;
  font-size: var(--font-size-lg);
  color: var(--textBlack);
}

.bb-offer__code-label {
  margin: 16px 0 4px;
  font-size: var(--font-size-md);
  color: var(--textDarkGrey);
}

.bb-offer__code {
  display: inline-block;
  padding: 5px 16px;
  border: 1.5px dashed rgba(var(--color-primary-rgb), 0.55);
  border-radius: var(--radius-sm);
  background: var(--bg-white);
  color: var(--color-primary);
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.5px;
}

@media (max-width: 600px) {
  .bb-carousel-section {
    margin-top: 40px;
  }
  .bb-carousel {
    --bb-gap: 14px;
  }
  .bb-offer__headline {
    font-size: var(--font-size-xl);
  }
}

@media (prefers-reduced-motion: reduce) {
  .bb-carousel__track--animate,
  .bb-carousel__dot,
  .bb-scroll-btn {
    transition: none;
  }
}

/* ---------------- Home: popular routes ---------------- */

.bb-routes .bb-carousel {
  --bb-gap: 16px;
}

.bb-route-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--bg-white);
  box-shadow: 0 6px 18px rgba(var(--color-shadow-rgb), 0.08);
  color: inherit;
  text-decoration: none;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.bb-route-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 26px rgba(var(--color-shadow-rgb), 0.14);
}

.bb-route-card:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* the city picture (or a gradient), with the city name over a dark fade */
.bb-route-card__media {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  background: linear-gradient(160deg, #3b6db3 0%, #1e3a6e 55%, #0b1424 100%)
    center / cover no-repeat;
  background-size: cover;
  background-position: center;
}

.bb-route-card__media::after {
  content: "";
  position: absolute;
  inset: 45% 0 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.72) 100%
  );
}

.bb-route-card__city {
  position: absolute;
  z-index: 1;
  left: 14px;
  right: 14px;
  bottom: 10px;
  color: var(--color-text-inverse);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-semibold);
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bb-route-card__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 14px 14px;
}

.bb-route-card__route {
  font-size: var(--font-size-sm);
  color: var(--textDarkGrey);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bb-route-card__next {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--font-size-sm);
  color: var(--textBlack);
}

.bb-route-card__next strong {
  font-weight: var(--font-weight-bold);
}

.bb-route-card__icon {
  flex: none;
  display: inline-flex;
  color: var(--color-primary);
}

@media (max-width: 600px) {
  .bb-routes .bb-carousel {
    --bb-gap: 12px;
  }
  .bb-route-card__city {
    font-size: var(--font-size-lg);
  }
  .bb-route-card__next {
    font-size: 12px;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bb-route-card {
    transition: none;
  }
  .bb-route-card:hover {
    transform: none;
  }
}

/* ---------------- Home: why travel with us ---------------- */

.bb-why {
  margin-top: 56px;
}

.bb-why__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.bb-why__card {
  padding: 22px 22px 24px;
  border-radius: var(--radius-lg);
  background: var(--bg-white);
  border: 1px solid var(--color-border-primary);
  box-shadow: 0 6px 18px rgba(var(--color-shadow-rgb), 0.05);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.bb-why__card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 26px rgba(var(--color-shadow-rgb), 0.1);
}

.bb-why__icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  background: rgba(var(--color-primary-rgb), 0.1);
  margin-bottom: 16px;
}

.bb-why__title {
  margin: 0;
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  line-height: 1.3;
  color: var(--textBlack);
}

.bb-why__text {
  margin: 8px 0 0;
  font-size: var(--font-size-md);
  line-height: var(--line-height-md);
  color: var(--textDarkGrey);
}

@media (max-width: 960px) {
  .bb-why__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .bb-why {
    margin-top: 40px;
  }
  .bb-why__grid {
    gap: 12px;
  }
  .bb-why__card {
    padding: 16px;
  }
  .bb-why__icon {
    width: 46px;
    height: 46px;
    margin-bottom: 12px;
  }
  .bb-why__title {
    font-size: var(--font-size-md);
  }
  .bb-why__text {
    font-size: var(--font-size-sm);
  }
}

@media (prefers-reduced-motion: reduce) {
  .bb-why__card {
    transition: none;
  }
  .bb-why__card:hover {
    transform: none;
  }
}

/* ---------------- Home: how to book (steps) ---------------- */

.bb-steps {
  margin-top: 56px;
}

.bb-steps__list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}

.bb-step {
  position: relative;
  padding-left: 34px;
}

/* the chevron between steps */
.bb-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 36px;
  right: 30px;
  width: 9px;
  height: 9px;
  border-top: 2px solid var(--textMediumGrey);
  border-right: 2px solid var(--textMediumGrey);
  transform: rotate(45deg);
}

.bb-step__visual {
  position: relative;
  display: inline-block;
}

.bb-step__number {
  position: absolute;
  top: -2px;
  left: -34px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary);
  color: var(--color-text-inverse);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  box-shadow: 0 4px 10px rgba(var(--color-primary-rgb), 0.35);
}

.bb-step__icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  background: rgba(var(--color-primary-rgb), 0.08);
}

.bb-step__title {
  margin: 14px 0 0;
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  color: var(--textBlack);
}

.bb-step__text {
  margin: 8px 0 0;
  max-width: 260px;
  font-size: var(--font-size-md);
  line-height: var(--line-height-md);
  color: var(--textDarkGrey);
}

@media (max-width: 720px) {
  .bb-steps {
    margin-top: 40px;
  }
  .bb-steps__list {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .bb-step {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 16px;
    align-items: center;
    padding-left: 14px;
  }
  .bb-step__visual {
    grid-row: span 2;
  }
  .bb-step__number {
    left: -14px;
    width: 24px;
    height: 24px;
  }
  .bb-step__icon {
    width: 60px;
    height: 60px;
  }
  .bb-step__title {
    margin: 0;
    font-size: var(--font-size-md);
  }
  .bb-step__text {
    margin: 4px 0 0;
    max-width: none;
    font-size: var(--font-size-sm);
  }
  /* steps stack: the chevron points down, under each icon */
  .bb-step:not(:last-child)::after {
    top: auto;
    bottom: -16px;
    right: auto;
    left: 40px;
    transform: rotate(135deg);
    width: 7px;
    height: 7px;
  }
}

/* ---------------- Home: download our app ---------------- */

.bb-app {
  position: relative;
  overflow: visible;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(220px, 0.9fr) minmax(0, 0.8fr);
  align-items: center;
  gap: 24px;
  margin-top: 120px; /* room for the phone picture rising above the panel */
  padding: 36px 40px;
  border-radius: var(--radius-xl);
  background: linear-gradient(120deg, #fff1f1 0%, #ffe4e4 100%);
}

/* the same type as the hero title: very heavy, navy, with the highlight in red */
.bb-app__title {
  margin: 0;
  font-size: clamp(32px, 3.6vw, 48px);
  font-weight: var(--font-weight-black);
  line-height: 1.05;
  letter-spacing: -1px;
  color: var(--textBlue);
}

.bb-app__title em {
  font-style: normal;
  color: var(--color-primary);
  /* "Our App" never splits across lines */
  white-space: nowrap;
}

.bb-app__text {
  margin: 14px 0 0;
  max-width: 420px;
  font-size: var(--font-size-lg);
  line-height: 1.5;
  color: var(--textDarkGrey);
}

.bb-app__stores {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 24px;
}

.bb-store {
  position: relative;
  display: inline-block;
  width: 168px;
  border-radius: 10px;
  text-decoration: none;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

a.bb-store:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
}

/* the badge image, cropped to the badge (see BadgeImage) */
.bb-store__badge {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 10px;
}

.bb-store__badge img {
  position: absolute;
  max-width: none;
  display: block;
}

/* no store page yet */
.bb-store--soon {
  cursor: default;
}

.bb-store--soon .bb-store__badge {
  opacity: 0.8;
}

.bb-store__soon {
  position: absolute;
  top: -9px;
  right: -8px;
  padding: 2px 8px;
  border-radius: var(--radius-2xl);
  background: var(--color-primary);
  color: #fff;
  font-size: 10px;
  font-weight: var(--font-weight-semibold);
  white-space: nowrap;
}

/* the phone picture (it has its own pink circle) rises above the panel */
.bb-app__visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-self: stretch;
  margin: -95px 0 -75px 0px;
}

.bb-app__phone {
  display: block;
  width: auto;
  height: 400px;
  max-width: 100%;
  object-fit: contain;
  filter: drop-shadow(0 20px 30px rgba(var(--color-shadow-rgb), 0.18));
}

.bb-app__features {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bb-app__feature {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-medium);
  color: var(--textBlack);
}

.bb-app__feature-icon {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  background: rgba(var(--color-primary-rgb), 0.12);
}

@media (max-width: 960px) {
  .bb-app {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    margin-top: 56px;
    padding: 30px;
  }
  .bb-app__visual {
    display: none;
  }
}

@media (max-width: 600px) {
  .bb-app {
    grid-template-columns: 1fr;
    gap: 24px;
    margin-top: 40px;
    padding: 24px 18px;
  }
  .bb-app__text {
    font-size: var(--font-size-md);
  }
  .bb-store {
    width: calc(50% - 7px);
    max-width: 180px;
  }
  .bb-app__features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }
  .bb-app__feature {
    font-size: var(--font-size-sm);
  }
}

@media (prefers-reduced-motion: reduce) {
  .bb-store {
    transition: none;
  }
  a.bb-store:hover {
    transform: none;
  }
}

/* ---------------- Search results ---------------- */

.bb-results {
  padding-top: 20px;
  padding-bottom: 20px;
}

.bb-results__search {
  margin-bottom: 20px;
  padding: 18px 20px 12px;
  border-radius: var(--radius-xl);
  background: var(--bg-white);
  box-shadow: 0 10px 30px rgba(var(--color-shadow-rgb), 0.08);
}

.bb-results__layout {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.bb-link-button {
  padding: 0;
  border: none;
  background: none;
  color: var(--color-primary);
  font-family: inherit;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* filters (left) */
.bb-filters {
  position: sticky;
  top: calc(var(--bb-header-h) + 12px);
}

.bb-filters__panel {
  padding: 16px 16px 8px;
  border: 1px solid var(--color-border-primary);
  border-radius: var(--radius-lg);
  background: var(--bg-white);
}

.bb-filters__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-border-primary);
}

.bb-filters__heading {
  margin: 0;
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--textBlack);
}

.bb-filters__group {
  margin: 0;
  padding: 14px 0 10px;
  border: none;
  border-bottom: 1px solid var(--color-border-primary);
}

.bb-filters__group:last-child {
  border-bottom: none;
}

.bb-filters__title {
  margin-top: 0;
  padding: 0;
  margin-bottom: 8px;
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-bold);
  color: var(--textBlack);
}

.bb-filters__search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 8px;
  padding: 0 10px;
  border: 1px solid var(--color-border-primary);
  border-radius: var(--radius-md);
  color: var(--textMediumGrey);
}

.bb-filters__search input {
  flex: 1;
  min-width: 0;
  padding: 8px 0;
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: var(--font-size-sm);
}

.bb-filters__search:focus-within {
  border-color: var(--color-primary);
}

.bb-filters__empty {
  margin: 4px 0;
  font-size: var(--font-size-sm);
  color: var(--textMediumGrey);
}

/* a checkbox row: red box when checked, count on the right */
.bb-check {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  font-size: var(--font-size-sm);
  color: var(--textBlack);
  cursor: pointer;
}

.bb-check input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.bb-check__box {
  flex: none;
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--borderDark);
  border-radius: 4px;
  background: var(--bg-white) center / 12px no-repeat;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease;
}

.bb-check input:checked + .bb-check__box {
  border-color: var(--color-primary);
  background-color: var(--color-primary);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7'/%3E%3C/svg%3E");
}

.bb-check input:focus-visible + .bb-check__box {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.bb-check__label {
  flex: 1;
  min-width: 0;
}
.bb-check__count {
  color: var(--textMediumGrey);
  font-size: var(--font-size-sm);
}

/* the bar above the list */
.bb-results__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 20px;
  margin-bottom: 14px;
  padding: 12px 16px;
  border-radius: var(--radius-lg);
  background: var(--bg-white);
  border: 1px solid var(--color-border-primary);
}

.bb-results__summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 0;
  margin: 0;
  font-size: var(--font-size-lg);
  color: var(--textBlack);
}

.bb-results__summary > * + *::before {
  content: "|";
  margin: 0 14px;
  color: var(--borderDark);
}

.bb-results__route {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: var(--font-weight-medium);
}

.bb-results__tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bb-results__sort {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: var(--font-size-md);
  color: var(--textBlack);
}

.bb-results__sort select {
  min-width: 190px;
  padding: 8px 10px;
  border: 1px solid var(--color-border-primary);
  border-radius: var(--radius-md);
  background: var(--bg-white);
  font-family: inherit;
  font-size: var(--font-size-md);
  color: var(--textBlack);
}

.bb-results__filter-toggle {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid var(--color-border-primary);
  border-radius: var(--radius-md);
  background: var(--bg-white);
  font-family: inherit;
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-medium);
  color: var(--textBlack);
  cursor: pointer;
}

.bb-results__none {
  padding: 32px;
  border-radius: var(--radius-lg);
  background: var(--bg-white);
  text-align: center;
  color: var(--textDarkGrey);
}

/* a bus card */
.bb-trip-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bb-trip {
  display: grid;
  grid-template-columns: 150px minmax(150px, 1fr) minmax(280px, 1.4fr) 170px;
  grid-template-areas:
    "media operator timeline buy"
    "media footer footer footer";
  gap: 10px 20px;
  padding: 16px 18px;
  border: 1px solid var(--color-border-primary);
  border-radius: var(--radius-lg);
  background: var(--bg-white);
  box-shadow: 0 4px 14px rgba(var(--color-shadow-rgb), 0.05);
}

.bb-trip__media {
  grid-area: media;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 90px;
  border-radius: var(--radius-md);
  background: rgba(var(--color-primary-rgb), 0.06);
  color: var(--color-primary);
}

.bb-trip__media img {
  max-width: 80%;
  max-height: 80px;
  object-fit: contain;
}
.bb-trip__bus {
  display: block;
  width: 110px;
  height: 70px;
}

.bb-trip__operator {
  grid-area: operator;
  min-width: 0;
}

.bb-trip__name {
  margin: 0;
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  color: var(--textBlack);
}

.bb-trip__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.bb-trip__tags li {
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  background: #eef0f3;
  font-size: var(--font-size-sm);
  color: var(--textBlack);
}

.bb-trip__timeline {
  grid-area: timeline;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: start;
}

.bb-trip__stop {
  display: flex;
  flex-direction: column;
}
.bb-trip__time {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  color: var(--textBlack);
}
.bb-trip__place {
  font-size: var(--font-size-md);
  color: var(--textBlack);
}
.bb-trip__point {
  font-size: var(--font-size-sm);
  color: var(--textDarkGrey);
}

.bb-trip__duration {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding-top: 2px;
  font-size: var(--font-size-sm);
  color: var(--textDarkGrey);
}

.bb-trip__line {
  position: relative;
  display: block;
  width: 100%;
  min-width: 60px;
  height: 2px;
  background: var(--borderDark);
}

.bb-trip__line::before,
.bb-trip__line::after {
  content: "";
  position: absolute;
  top: -3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--borderDark);
}

.bb-trip__line::before {
  left: 0;
}
.bb-trip__line::after {
  right: 0;
}

.bb-trip__buy {
  grid-area: buy;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.bb-trip__price {
  margin: 0;
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--textBlack);
  white-space: nowrap;
}

.bb-trip__price-from {
  margin-right: 6px;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-regular);
  color: var(--textDarkGrey);
}

.bb-trip__price--none {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--textDarkGrey);
}

.bb-trip__select {
  width: 100%;
  padding: 11px 16px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--color-primary);
  color: var(--color-text-inverse);
  font-family: inherit;
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.bb-trip__select:hover:not(:disabled) {
  background: var(--color-primary-dark);
}
.bb-trip__select:disabled {
  background: var(--bg-light-grey2);
  color: var(--textDarkGrey);
  cursor: not-allowed;
}

.bb-trip__footer {
  grid-area: footer;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
}

.bb-trip__links {
  display: flex;
  gap: 18px;
}

.bb-trip__more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: none;
  background: none;
  color: #1a56c8;
  font-family: inherit;
  font-size: var(--font-size-sm);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.bb-trip__more svg {
  transition: transform 0.2s ease;
}
.bb-trip__more[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.bb-trip__amenities {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bb-trip__amenities li {
  padding: 4px 10px;
  border: 1px solid var(--color-border-primary);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  color: var(--textDarkGrey);
}

.bb-trip__seats {
  margin-left: auto;
  padding: 5px 14px;
  border-radius: var(--radius-md);
  background: #e7f6ec;
  color: #1d7a3e;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  white-space: nowrap;
}

.bb-trip__seats--none {
  background: #eceff1;
  color: var(--textDarkGrey);
}

.bb-trip__panel {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px 24px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--color-background-secondary);
  font-size: var(--font-size-sm);
}

.bb-trip__panel h4 {
  margin: 0 0 6px;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
}
.bb-trip__panel ul {
  margin: 0;
  padding-left: 18px;
}
.bb-trip__panel span {
  color: var(--textDarkGrey);
}

.bb-trip__details {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 6px 16px;
  margin: 0;
}

.bb-trip__details dt {
  color: var(--textDarkGrey);
}
.bb-trip__details dd {
  margin: 0;
}

.bb-trip__delay {
  grid-column: 1 / -1;
  margin: 0;
  font-size: var(--font-size-sm);
  color: var(--color-warning);
}

/* card extras (approved design): badge, rating marker, bus photo, View Seats, amenity icons, seat map */
.bb-trip {
  position: relative;
}

/* "Best Deal": the lowest real fare in the results */
.bb-trip__badge {
  position: absolute;
  z-index: 1;
  top: -9px;
  left: 14px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  background: var(--color-primary);
  color: var(--color-text-inverse);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  box-shadow: 0 4px 10px rgba(var(--color-primary-rgb), 0.3);
}

/* reviews don't exist yet: a "New" marker in the rating's place */
.bb-trip__rating {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 4px 0 0;
  font-size: var(--font-size-sm);
  color: var(--textDarkGrey);
}

.bb-trip__rating span {
  color: #f5a623;
  font-size: var(--font-size-md);
}

/* one bus photo for every card: the red bus of the hero image, cropped to the bus (swap the image here) */
.bb-trip__media {
  overflow: hidden;
  background: transparent;
}

.bb-trip__photo {
  display: block;
  width: 150px;
  height: 100px;
  object-fit: contain;
}

.bb-trip__view-seats {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: none;
  background: none;
  color: var(--color-primary);
  font-family: inherit;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
}

.bb-trip__view-seats svg {
  transition: transform 0.2s ease;
}
.bb-trip__view-seats[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.bb-trip__amenities li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.bb-trip__amenities svg {
  flex: none;
  color: var(--textBlack);
}

/* the seat map inside a card */
.bb-trip__seatmap {
  display: block;
  background: var(--bg-white);
  border: 1px solid var(--color-border-primary);
}

.bb-trip__seatmap-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  font-size: var(--font-size-md);
  color: var(--textDarkGrey);
}

.bb-trip__seatmap-actions .bb-trip__select {
  width: auto;
  padding: 10px 22px;
}

@media (max-width: 1100px) {
  .bb-trip {
    grid-template-columns: 110px minmax(0, 1fr) 150px;
    grid-template-areas:
      "media operator buy"
      "timeline timeline timeline"
      "footer footer footer";
  }
  .bb-trip__photo {
    transform: scale(0.73);
  }
}

@media (max-width: 900px) {
  .bb-results__layout {
    grid-template-columns: 1fr;
  }
  /* filters fold behind the "Filters" button */
  .bb-filters {
    position: static;
    display: none;
  }
  .bb-filters--open {
    display: block;
  }
  .bb-results__filter-toggle {
    display: inline-flex;
  }
}

@media (max-width: 600px) {
  .bb-results__search {
    padding: 14px 12px 8px;
  }
  .bb-results__summary {
    font-size: var(--font-size-md);
  }
  .bb-results__summary > * + *::before {
    margin: 0 8px;
  }
  .bb-results__tools {
    width: 100%;
    justify-content: space-between;
  }
  .bb-results__sort select {
    min-width: 0;
  }
  .bb-trip {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "operator buy"
      "timeline timeline"
      "footer footer";
    padding: 14px;
  }
  .bb-trip__media {
    display: none;
  }
  .bb-trip__buy {
    min-width: 120px;
  }
  .bb-trip__time {
    font-size: var(--font-size-lg);
  }
  .bb-trip__seats {
    margin-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bb-check__box,
  .bb-trip__select,
  .bb-trip__more svg {
    transition: none;
  }
}

/* ---------------- Login ---------------- */
.bb-login-page {
  padding: 32px 0 56px;
  min-height: calc(100svh - var(--bb-header-h));
  background: #f5f7fa;
}
.bb-main:has(.bb-login-page) + .bb-footer {
  margin-top: 0;
}
.bb-auth__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  color: var(--textDarkGrey);
  font-size: 14px;
  text-decoration: none;
}
.bb-auth__back:hover {
  color: var(--color-primary);
}
.bb-auth {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  /* max-width: 1080px; */
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid #e4e9ef;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 18px 54px rgba(0, 24, 72, 0.07);
}
.bb-auth__brand {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 720px;
  padding: 48px 40px 28px;
  isolation: isolate;
  color: #fff;
  background: #102d43;
}
.bb-auth__brand::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(
      180deg,
      rgba(4, 24, 40, 0.86),
      rgba(4, 24, 40, 0.3) 45%,
      rgba(4, 24, 40, 0.12) 62%,
      #0c273b 91%
    ),
    url("../images/hero_img.png") 67% center / cover no-repeat;
}
.bb-auth__eyebrow {
  display: block;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: 1.8px;
}
.bb-auth__headline {
  margin: 22px 0 18px;
  color: #fff;
  font-size: clamp(36px, 4vw, 52px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -1.8px;
}
.bb-auth__description {
  margin: 0;
  color: #e4eaf0;
  font-size: 16px;
  line-height: 1.7;
}
.bb-auth__travel-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding: 24px 0;
  font-size: 15px;
  font-weight: 600;
}
.bb-auth__highlights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  list-style: none;
  padding: 24px 0 0;
  margin: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
}
.bb-auth__highlights li {
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 11px;
  line-height: 1.6;
  color: #e4eaf0;
}
.bb-auth__highlights svg {
  color: #fff;
}
.bb-auth__panel {
  display: flex;
  flex-direction: column;
  padding: 36px 48px;
  background: #fff;
}
.bb-auth__switch {
  margin: 0;
  text-align: right;
  font-size: 12px;
  color: var(--textDarkGrey);
}
.bb-auth__switch a {
  margin-left: 5px;
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: none;
}
.bb-auth__switch a:hover {
  text-decoration: underline;
}
.bb-auth__eyebrow--form {
  margin-top: 42px;
  color: var(--color-primary);
  letter-spacing: 2px;
}
.bb-auth__title {
  margin: 10px 0 0;
  font-size: 38px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -1px;
  color: var(--textBlue);
}
.bb-auth__intro {
  margin: 12px 0 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--textDarkGrey);
}
.bb-auth__form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 28px;
}
.bb-auth__input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.bb-auth__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--textBlue);
}
.bb-auth__field {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 12px 0 16px;
  border: 1px solid #dce3eb;
  border-radius: 10px;
  background: #fcfdfe;
  color: #7a8799;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}
.bb-auth__field:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.1);
}
.bb-auth__field svg {
  flex: none;
}
.bb-auth__field input {
  flex: 1;
  min-width: 0;
  height: 50px;
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  color: var(--textBlack);
}
.bb-auth__field input::placeholder {
  color: #7a8799;
}
.bb-auth__eye {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 44px;
  padding: 8px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--textDarkGrey);
  cursor: pointer;
}
.bb-auth__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.bb-auth__remember {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--textDarkGrey);
}
.bb-auth__remember input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.bb-auth__remember .bb-check__box {
  width: 16px;
  height: 16px;
  border-color: var(--color-primary);
  background-color: var(--color-primary);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7'/%3E%3C/svg%3E");
}
.bb-auth__forgot {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-primary);
  text-underline-offset: 3px;
}
.bb-auth__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 52px;
  border: none;
  border-radius: 10px;
  background: var(--color-primary);
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(var(--color-primary-rgb), 0.15);
  transition: background-color 0.2s ease;
}
.bb-auth__submit:hover:not(:disabled) {
  background: var(--color-primary-dark);
}
.bb-auth__submit:disabled {
  opacity: 0.55;
  box-shadow: none;
  cursor: not-allowed;
}
.bb-auth__or {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 24px 0 18px;
  font-size: 10px;
  color: var(--textDarkGrey);
}
.bb-auth__or::before,
.bb-auth__or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e4e9ef;
}
.bb-auth__social {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.bb-auth__social button {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 48px;
  padding: 12px 8px;
  border: 1px solid #e4e9ef;
  border-radius: 10px;
  background: #fafbfc;
  color: var(--textDarkGrey);
  font-family: inherit;
  font-size: 11px;
  cursor: not-allowed;
}
.bb-auth__social-note {
  margin: 10px 0 0;
  font-size: 11px;
  text-align: center;
  color: var(--textDarkGrey);
}
.bb-auth__help {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  padding: 16px 0 0;
  border-top: 1px solid #e4e9ef;
  color: var(--textBlack);
  text-decoration: none;
}
.bb-auth__help:hover strong {
  color: var(--color-primary);
}
.bb-auth__help-icon {
  display: inline-flex;
  padding: 10px;
  border-radius: 10px;
  background: #fff3f3;
  color: var(--color-primary);
}
.bb-auth__help > span:nth-child(2) {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 3px;
  font-size: 12px;
  color: var(--textDarkGrey);
}
.bb-auth__help strong {
  font-size: 13px;
  color: var(--textBlue);
}
.bb-auth__help > svg:last-child {
  color: var(--textDarkGrey);
}
.bb-login-page a:focus-visible,
.bb-login-page button:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 4px;
}
@media (max-width: 860px) {
  .bb-auth {
    grid-template-columns: 1fr;
    max-width: 520px;
  }
  .bb-auth__brand {
    display: none;
  }
  .bb-auth__back {
    display: flex;
    max-width: 520px;
    margin-inline: auto;
  }
}
@media (max-width: 600px) {
  .bb-login-page {
    padding: 20px 0 32px;
  }
  .bb-auth {
    border-radius: 16px;
  }
  .bb-auth__panel {
    padding: 28px 22px;
  }
  .bb-auth__eyebrow--form {
    margin-top: 30px;
  }
  .bb-auth__title {
    font-size: 34px;
  }
  .bb-auth__social button {
    flex-direction: column;
  }
}
@media (prefers-reduced-motion: reduce) {
  .bb-auth__field,
  .bb-auth__submit {
    transition: none;
  }
}

.bb-auth__name-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.bb-auth__field-hint {
  margin: 0;
  color: var(--textDarkGrey);
  font-size: 11px;
  line-height: 1.5;
}
.bb-auth__password-toggle {
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
}
.bb-register-page .bb-auth__eyebrow--form {
  margin-top: 28px;
}
.bb-register-page .bb-auth__form {
  gap: 16px;
  margin-top: 24px;
}
.bb-auth__registration-success {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin: 32px 0;
}
.bb-auth__registration-success > p {
  color: var(--textDarkGrey);
  font-size: 14px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.bb-auth__registration-success .bb-auth__submit {
  text-decoration: none;
}
@media (max-width: 400px) {
  .bb-auth__name-row {
    grid-template-columns: 1fr;
  }
}

/* ---------------- Portal bars (operator, crew) ---------------- */

.bb-subbar {
  background: var(--bg-white);
  border-bottom: 1px solid var(--color-border-primary);
  padding: 12px 16px;
}

.bb-subbar strong {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  color: var(--textBlue);
}

.bb-subnav {
  margin-top: 10px;
}

.bb-subnav__link {
  display: inline-block;
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: var(--radius-2xl);
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

.bb-subnav__link:hover {
  color: var(--color-primary);
  background: var(--bb-tint);
}

.bb-subnav__link.active {
  color: var(--color-text-inverse);
  background: var(--color-primary);
  font-weight: var(--font-weight-semibold);
}

/* ---------------- Shared widgets ---------------- */

.bb-muted {
  color: var(--color-text-secondary);
}
.bb-text-13 {
  font-size: 13px;
}
.bb-link {
  color: var(--color-primary);
}
.bb-fieldset-reset {
  border: none;
  margin: 0;
  padding: 0;
}
.bb-input-code {
  width: 70px;
}

.bb-facts {
  display: grid;
  grid-template-columns: minmax(120px, max-content) 1fr;
  gap: 6px 16px;
  margin: 0;
}

.bb-facts__row {
  display: contents;
}
.bb-facts__label {
  color: var(--color-text-secondary);
}
.bb-facts__value {
  margin: 0;
}

.bb-stat {
  min-width: 140px;
  padding: 14px 16px;
  background: var(--bg-white);
  border: 1px solid var(--color-border-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.bb-stat__label {
  font-size: 13px;
  color: var(--color-text-secondary);
}
.bb-stat__value {
  font-size: 24px;
  font-weight: var(--font-weight-bold);
  color: var(--textBlue);
}

/* ---------------- Seat map and layout editor ---------------- */

.bb-seat-grid {
  display: grid;
  grid-template-columns: repeat(var(--bb-cols), 44px);
  grid-template-rows: repeat(var(--bb-rows), 44px);
  gap: 4px;
  max-width: 100%;
  overflow-x: auto;
}

.bb-seat-cell {
  grid-row: var(--bb-row) / span var(--bb-row-span, 1);
  grid-column: var(--bb-col) / span var(--bb-col-span, 1);
}

.bb-seat {
  padding: 0;
  font-family: inherit;
  font-size: 12px;
  color: var(--textBlue);
  background: #f5f5f5;
  border: 1px solid var(--color-border-primary);
  border-radius: var(--radius-sm);
  cursor: default;
}

.bb-seat--clickable {
  cursor: pointer;
}
.bb-seat--available {
  background: #e8f5e9;
  cursor: pointer;
}
.bb-seat--held {
  background: #fff3e0;
}
.bb-seat--booked {
  background: #e3f2fd;
}
.bb-seat--blocked {
  background: #eceff1;
}
.bb-seat--cancelled {
  background: #ffebee;
}
.bb-seat--structure {
  background: transparent;
  border: none;
  color: var(--color-text-secondary);
}

.bb-seat--selected,
.bb-seat--selected.bb-seat--available {
  color: var(--color-text-inverse);
  background: var(--color-primary);
  border-color: var(--color-primary);
}

.bb-legend {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}

.bb-legend__swatch {
  width: 14px;
  height: 14px;
  border: 1px solid var(--color-border-primary);
  border-radius: 3px;
}

.bb-layout-grid {
  display: grid;
  grid-template-columns: repeat(var(--bb-cols), 44px);
  gap: 4px;
  overflow-x: auto;
}

.bb-layout-cell {
  height: 44px;
  padding: 0;
  font-family: inherit;
  font-size: 11px;
  background: var(--bg-white);
  border: 1px dashed var(--borderDark);
  border-radius: var(--radius-sm);
}

.bb-layout-cell--structure {
  background: #f5f5f5;
}
.bb-layout-cell--seat {
  background: #e3f2fd;
}

/* ---------------- Small screens ---------------- */

@media (max-width: 960px) {
  .bb-menu-toggle {
    display: inline-flex;
  }
  .bb-header__inner {
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 10px;
    padding-bottom: 10px;
  }
  .bb-logo {
    flex: 1;
  }
  .bb-logo__img {
    height: 60px;
  }
  .bb-nav {
    display: none;
    order: 3;
    flex-basis: 100%;
    flex-direction: column;
    gap: 0;
    border-top: 1px solid var(--color-border-primary);
    padding-top: 6px;
  }
  .bb-nav--open {
    display: flex;
  }
  .bb-nav__link {
    padding: 10px 4px;
  }
  .bb-nav__link::after {
    display: none;
  }
  .bb-account__email {
    display: none;
  }
  .bb-header__actions {
    gap: 6px;
  }
  .bb-login {
    padding: 9px 16px;
    font-size: var(--font-size-md);
    border-radius: var(--radius-md);
  }
  .bb-hero__content {
    padding-top: 40px;
    padding-bottom: 140px;
  }
  .bb-hero {
    background:
      linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.92) 0%,
        rgba(255, 255, 255, 0.8) 60%,
        rgba(255, 255, 255, 0.55) 100%
      ),
      url("../images/hero_img.png") 70% center / cover no-repeat,
      var(--bg-white);
  }
  .bb-hero__description {
    font-size: var(--font-size-lg);
  }
  /* the highlights: two by two, no dividers */
  .bb-hero__highlights {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 16px;
  }
  .bb-hero__highlight {
    padding: 0;
  }
  .bb-hero__highlight + .bb-hero__highlight {
    border-left: none;
  }
  .bb-hero__highlight-label {
    max-width: none;
  }
  .bb-search-row {
    flex-wrap: wrap;
  }
  .bb-search-row__place {
    flex: 1 1 calc(50% - 35px);
  }
  .bb-search-row__date,
  .bb-search-row__passengers {
    flex: 1 1 160px;
  }
  .bb-search-row__submit {
    flex: 1 1 200px;
  }
}

@media (max-width: 600px) {
  .bb-hero__eyebrow {
    font-size: var(--font-size-sm);
    letter-spacing: 2px;
  }
  .bb-search-card {
    padding: 16px 14px 12px;
  }
  .bb-search-row__place {
    flex-basis: 100%;
  }
  .bb-search-row__date {
    flex: 1 1 55%;
  }
  .bb-search-row__passengers {
    flex: 1 1 35%;
  }
  .bb-search-row__submit {
    flex-basis: 100%;
  }
  .bb-search-row__submit {
    padding-top: 0;
  }
  /* the swap button sits between From and To, at the right */
  .bb-swap {
    margin: -6px 0 -6px auto;
    transform: rotate(90deg);
  }
  .bb-swap:hover:not(:disabled) {
    transform: rotate(270deg);
  }
  .bb-trip-types {
    display: flex;
  }
  .bb-trip-type {
    flex: 1 1 auto;
    min-width: 0;
    gap: 6px;
    padding: 9px 6px;
    font-size: var(--font-size-sm);
    white-space: nowrap;
  }
  .bb-trip-type svg {
    width: 18px;
    height: 18px;
  }
  .bb-badges {
    justify-content: flex-start;
  }
  .bb-badge {
    flex: 1 1 45%;
    font-size: var(--font-size-sm);
  }
}

@media (max-width: 480px) {
  .bb-hero__description {
    font-size: var(--font-size-md);
  }
  .bb-hero__highlight-label {
    font-size: var(--font-size-sm);
  }
  .bb-logo__product {
    display: none;
  }
  .bb-lang__name {
    display: none;
  }
  /* icon only; the text stays for screen readers */
  .bb-login {
    padding: 10px 12px;
  }
  .bb-login span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .bb-pill {
    padding: 8px 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bb-nav__link,
  .bb-nav__link::after,
  .bb-pill,
  .bb-swap,
  .bb-subnav__link {
    transition: none;
  }
}

@media (max-width: 720px) {
  .bb-footer__inner {
    gap: 28px 32px;
  }
  .bb-footer__about {
    flex-basis: 100%;
    max-width: none;
  }
  .bb-footer__col {
    flex: 1 1 40%;
  }
  .bb-footer__col--contact {
    flex-basis: 100%;
  }
  .bb-footer__bottom {
    flex-direction: column;
    align-items: flex-start;
    font-size: var(--font-size-sm);
  }
}

/* ---- platform admin area (/admin) ---- */
.bb-admin__roles {
  display: block;
  margin: 4px 0 8px;
  font-size: 13px;
  color: var(--bb-muted, #64748b);
  text-transform: capitalize;
}

.bb-admin__datetime {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: var(--bb-muted, #64748b);
}

.bb-admin__datetime input {
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font: inherit;
  color: inherit;
}

/* Recurring trip schedules (approved 2026-10-07): weekday picker and upcoming trips */
.bb-schedule-days {
  display: grid;
  gap: 8px;
}
.bb-schedule-days__label {
  font-size: 13px;
  font-weight: 600;
  color: #637181;
}
.bb-schedule-trips {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
  max-height: 320px;
  overflow-y: auto;
}
