:root {
  --ink: #111827;
  --muted: #64748b;
  --soft: #f8fafc;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-strong: rgba(255, 255, 255, 0.94);
  --line: rgba(15, 23, 42, 0.1);
  --line-strong: rgba(15, 23, 42, 0.16);
  --accent: #0ea5a4;
  --accent-dark: #0f766e;
  --accent-soft: rgba(14, 165, 164, 0.12);
  --warning: #b45309;
  --shadow: 0 28px 80px rgba(15, 23, 42, 0.18);
  --shadow-soft: 0 16px 42px rgba(15, 23, 42, 0.12);
  --radius-xl: 26px;
  --radius-lg: 18px;
  --radius-md: 12px;
  --control-height: 58px;
  --control-radius: 16px;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, "Th Sarabun New", "PingFang SC", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0.86)),
    radial-gradient(circle at 18% 18%, rgba(14, 165, 164, 0.22), transparent 30%),
    radial-gradient(circle at 86% 24%, rgba(59, 130, 246, 0.16), transparent 28%),
    linear-gradient(135deg, rgba(248, 250, 252, 0.96), rgba(226, 232, 240, 0.84) 48%, rgba(240, 253, 250, 0.9));
}

body.modal-open {
  overflow: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

h1,
p {
  margin: 0;
}

.app-shell {
  min-height: 100vh;
  padding: 18px;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  color: var(--ink);
  text-decoration: none;
  font-size: clamp(1.35rem, 2vw, 1.75rem);
  font-weight: 850;
  letter-spacing: -0.04em;
}

.language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(22px);
}

.language-pill {
  min-width: 46px;
  border: 0;
  border-radius: 999px;
  padding: 9px 12px;
  color: var(--muted);
  background: transparent;
  font-size: 0.82rem;
  font-weight: 800;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.language-pill:hover {
  transform: translateY(-1px);
}

.language-pill.is-active {
  color: white;
  background: var(--ink);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.22);
}

.booking-hero {
  flex: 1;
  min-height: 680px;
  display: grid;
  grid-template-rows: 1fr auto 0.35fr;
  align-items: center;
  justify-items: center;
  gap: 22px;
  padding: 18px 0 44px;
}

.hero-copy {
  width: min(1080px, 100%);
  align-self: end;
  display: grid;
  gap: 10px;
  color: var(--ink);
}

.eyebrow,
.vehicle-tabs-title {
  color: var(--accent-dark);
  font-size: 0.74rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-copy h1 {
  max-width: 760px;
  font-size: clamp(2.45rem, 6vw, 5.3rem);
  line-height: 0.96;
  letter-spacing: 0;
}

.booking-widget {
  width: min(1120px, 100%);
  display: grid;
  gap: 0;
}

.vehicle-tabs-wrap {
  position: relative;
  z-index: 2;
  width: calc(100% - 44px);
  margin: 0 auto -12px;
  padding: 12px 14px 14px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 22px 22px 0 0;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(24px);
}

.vehicle-tabs-title {
  display: block;
  margin: 0 0 8px;
}

.vehicle-tabs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.vehicle-tab {
  position: relative;
  min-width: 0;
  min-height: 72px;
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.42);
  font-weight: 850;
  text-align: center;
  transition: transform 180ms ease, background 180ms ease, border 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.vehicle-tab:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.76);
}

.vehicle-tab.is-selected {
  color: var(--ink);
  border-color: rgba(14, 165, 164, 0.38);
  background: var(--surface-strong);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7), 0 12px 30px rgba(14, 165, 164, 0.16);
}

.vehicle-tab.is-disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.vehicle-tab__label {
  min-width: 0;
  overflow-wrap: anywhere;
}

.vehicle-info-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  color: var(--accent-dark);
  background: var(--accent-soft);
  font-size: 0.72rem;
  font-weight: 950;
  line-height: 1;
}

.vehicle-tooltip {
  position: absolute;
  z-index: 40;
  left: 50%;
  bottom: calc(100% + 10px);
  width: min(260px, 82vw);
  padding: 13px 14px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 16px;
  display: grid;
  gap: 5px;
  color: var(--ink);
  text-align: left;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(22px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, 6px);
  transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
}

.vehicle-tooltip strong {
  font-size: 0.9rem;
  font-weight: 950;
}

.vehicle-tooltip span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 760;
  line-height: 1.35;
}

.vehicle-tab.is-info-open .vehicle-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.vehicle-icon {
  position: relative;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  display: block;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.04);
  opacity: 0.72;
}

.vehicle-icon::before {
  content: "";
  position: absolute;
  left: 5px;
  right: 5px;
  top: 11px;
  height: 16px;
  border-radius: 13px 15px 7px 7px;
  background:
    linear-gradient(135deg, currentColor, rgba(15, 23, 42, 0.46)),
    radial-gradient(circle at 11px -1px, currentColor 0 10px, transparent 10.5px);
}

.vehicle-icon::after {
  content: "";
  position: absolute;
  left: 9px;
  right: 9px;
  bottom: 9px;
  height: 7px;
  border-radius: 999px;
  background: radial-gradient(circle at 3px 3px, var(--ink) 0 3px, transparent 3.5px), radial-gradient(circle at calc(100% - 3px) 3px, var(--ink) 0 3px, transparent 3.5px);
}

.glass-panel {
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(30px);
}

.search-card {
  position: relative;
  z-index: 1;
  border-radius: var(--radius-xl);
  padding: 28px;
  display: grid;
  gap: 18px;
}

.route-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 46px minmax(0, 1fr);
  align-items: end;
  gap: 12px;
}

.search-field {
  position: relative;
}

.autocomplete-label,
.date-field span,
.trip-type-field span,
.passenger-field label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.autocomplete-control {
  position: relative;
}

.autocomplete-input,
.date-field input,
.date-field select,
.trip-type-field select,
.passenger-field input,
.modal-field input,
.modal-field textarea {
  width: 100%;
  height: var(--control-height);
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  outline: 0;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: border 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.autocomplete-input {
  padding: 0 18px;
  font-size: 1.05rem;
  font-weight: 750;
}

.autocomplete-input:focus,
.date-field input:focus,
.date-field select:focus,
.trip-type-field select:focus,
.passenger-field input:focus,
.modal-field input:focus,
.modal-field textarea:focus {
  border-color: rgba(14, 165, 164, 0.52);
  background: white;
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.swap-button {
  width: 46px;
  height: 46px;
  margin-bottom: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-soft);
}

.swap-button span {
  position: relative;
  display: block;
  width: 18px;
  height: 18px;
  margin: auto;
}

.swap-button span::before,
.swap-button span::after {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  height: 2px;
  border-radius: 999px;
  background: var(--ink);
}

.swap-button span::before {
  top: 5px;
  box-shadow: 9px -3px 0 -1px var(--ink);
}

.swap-button span::after {
  bottom: 5px;
  box-shadow: -9px 3px 0 -1px var(--ink);
}

.details-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(132px, 1fr));
  align-items: start;
  gap: 12px;
}

.date-field,
.trip-type-field,
.passenger-field {
  min-width: 0;
  display: grid;
  grid-template-rows: 22px var(--control-height);
  align-content: start;
}

.return-date-field[hidden] {
  display: none;
}

.date-field input,
.date-field select {
  padding: 0 14px;
  color-scheme: light;
  font-size: 0.95rem;
  font-weight: 850;
}

.date-field select,
.trip-type-field select {
  padding: 0 42px 0 14px;
  color: var(--ink);
  font-weight: 850;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 20px) 25px,
    calc(100% - 14px) 25px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.date-field input:disabled,
.date-field select:disabled {
  cursor: not-allowed;
  color: rgba(100, 116, 139, 0.72);
  background-color: rgba(248, 250, 252, 0.72);
}

.stepper {
  height: var(--control-height);
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  display: grid;
  grid-template-columns: 38px 1fr 38px;
  align-items: center;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.82);
}

.stepper-button {
  height: 100%;
  border: 0;
  color: var(--ink);
  background: transparent;
  font-weight: 900;
  font-size: 1.1rem;
}

.stepper-button:disabled {
  cursor: not-allowed;
  color: rgba(100, 116, 139, 0.42);
  background: rgba(15, 23, 42, 0.03);
}

.passenger-field input {
  height: 100%;
  border: 0;
  border-radius: 0;
  padding: 0;
  text-align: center;
  background: transparent;
  font-weight: 850;
  -moz-appearance: textfield;
}

.passenger-field input::-webkit-outer-spin-button,
.passenger-field input::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.capacity-hint {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.capacity-row {
  min-height: 20px;
  margin-top: -8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  align-items: center;
  padding: 0 2px;
}

.search-button {
  min-height: var(--control-height);
  border: 0;
  border-radius: var(--control-radius);
  padding: 0 28px;
  color: white;
  background: linear-gradient(135deg, var(--ink), #0f766e);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.24);
  font-weight: 900;
  align-self: end;
  transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
}

.search-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 44px rgba(15, 23, 42, 0.3);
}

.search-button:disabled {
  cursor: not-allowed;
  opacity: 0.56;
  transform: none;
}

.booking-summary {
  min-height: 82px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  background: rgba(255, 255, 255, 0.58);
}

.summary-main {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.summary-route {
  overflow-wrap: anywhere;
  font-size: 1.08rem;
  font-weight: 900;
}

.summary-meta,
.fare-label span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 750;
}

.fare-label {
  display: grid;
  justify-items: end;
  gap: 3px;
  white-space: nowrap;
}

.fare-label strong {
  color: var(--accent-dark);
  font-size: 1.55rem;
  line-height: 1;
}

.route-status {
  min-height: 20px;
  color: var(--warning);
  font-size: 0.86rem;
  font-weight: 800;
}

.autocomplete-menu {
  position: absolute;
  z-index: 30;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  max-height: 282px;
  overflow: hidden;
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(24px);
}

.autocomplete-option {
  width: 100%;
  border: 0;
  border-radius: 13px;
  padding: 10px 11px;
  display: grid;
  gap: 2px;
  text-align: left;
  color: var(--ink);
  background: transparent;
}

.autocomplete-option:hover,
.autocomplete-option.is-active {
  background: var(--accent-soft);
}

.autocomplete-option span {
  font-weight: 850;
}

.autocomplete-option small {
  color: var(--muted);
  font-size: 0.76rem;
}

.autocomplete-option mark {
  color: var(--accent-dark);
  background: transparent;
}

.autocomplete-empty {
  padding: 12px;
  color: var(--muted);
  font-size: 0.84rem;
}

.booking-modal[hidden] {
  display: none;
}

.booking-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
}

.booking-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.38);
  backdrop-filter: blur(16px);
}

.booking-modal__panel {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  max-height: min(92vh, 860px);
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: var(--radius-xl);
  padding: 24px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 34px 96px rgba(15, 23, 42, 0.28);
  backdrop-filter: blur(30px);
}

.booking-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.booking-modal__header h2 {
  margin: 4px 0 0;
  font-size: 1.8rem;
  line-height: 1.05;
  letter-spacing: 0;
}

.modal-close-button {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.78);
  font-size: 1.3rem;
  line-height: 1;
}

.modal-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.modal-summary-item {
  min-height: 74px;
  padding: 13px 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  display: grid;
  align-content: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.58);
}

.modal-summary-item span,
.modal-field span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.modal-summary-item strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 900;
}

.booking-modal__form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.modal-field {
  display: grid;
  gap: 7px;
}

.modal-field--full,
.booking-modal__status,
.booking-modal__actions {
  grid-column: 1 / -1;
}

.modal-field input,
.modal-field textarea {
  padding: 0 14px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.82);
}

.modal-field textarea {
  min-height: 92px;
  height: auto;
  padding-top: 13px;
  resize: vertical;
}

.modal-field input[aria-invalid="true"] {
  border-color: rgba(180, 83, 9, 0.62);
  box-shadow: 0 0 0 4px rgba(180, 83, 9, 0.12);
}

.modal-error {
  min-height: 17px;
  color: var(--warning);
  font-size: 0.78rem;
  font-weight: 800;
}

.booking-modal__status {
  min-height: 22px;
  color: var(--accent-dark);
  font-size: 0.86rem;
  font-weight: 850;
}

.booking-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.modal-secondary-button,
.modal-primary-button {
  min-height: 50px;
  border-radius: 14px;
  padding: 0 20px;
  font-weight: 900;
}

.modal-secondary-button {
  border: 1px solid var(--line);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.74);
}

.modal-primary-button {
  border: 0;
  color: white;
  background: linear-gradient(135deg, var(--ink), #0f766e);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.22);
}

@media (max-width: 1040px) {
  .vehicle-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .details-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .search-button {
    grid-column: span 2;
  }
}

@media (max-width: 720px) {
  .app-shell {
    padding: 12px;
  }

  .topbar {
    height: auto;
    align-items: flex-start;
  }

  .booking-hero {
    min-height: 0;
    display: block;
    padding: 28px 0;
  }

  .hero-copy {
    margin-bottom: 22px;
  }

  .hero-copy h1 {
    font-size: 2.55rem;
  }

  .vehicle-tabs-wrap {
    width: 100%;
    margin-bottom: 8px;
    border-radius: 20px;
  }

  .vehicle-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .vehicle-tab {
    justify-content: flex-start;
  }

  .search-card {
    padding: 16px;
    border-radius: 22px;
  }

  .route-row,
  .details-row,
  .booking-summary,
  .modal-summary-grid,
  .booking-modal__form {
    grid-template-columns: 1fr;
  }

  .swap-button {
    margin: 0 auto;
    transform: rotate(90deg);
  }

  .search-button {
    grid-column: auto;
    width: 100%;
  }

  .fare-label {
    justify-items: start;
  }

  .booking-modal {
    align-items: end;
    padding: 10px;
  }

  .booking-modal__panel {
    max-height: 94vh;
    padding: 18px;
    border-radius: 22px;
  }

  .booking-modal__actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .modal-secondary-button,
  .modal-primary-button {
    width: 100%;
  }
}
