html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  padding: 14px;
  font-family:
    ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--foreground);
  background: var(--slate-3);
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

svg {
  display: block;
  flex: none;
  stroke-width: 1.75;
}

kbd {
  display: inline-flex;
  min-width: 1.35rem;
  height: 1.35rem;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 4px);
  background: var(--muted);
  color: var(--muted-foreground);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.7rem;
}

.booking-shell {
  position: relative;
  display: flex;
  width: 100%;
  height: 100%;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--background);
}

.booking-rail {
  display: flex;
  width: 72px;
  flex: 0 0 72px;
  flex-direction: column;
  align-items: center;
  border-right: 1px solid var(--border);
  background: var(--slate-2);
  padding: 10px 8px;
}

.booking-brand {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 8px;
  background: var(--blue-9);
  color: white;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
}

.booking-rail-primary,
.booking-rail-footer {
  display: grid;
  width: 100%;
  justify-items: center;
  gap: 7px;
}

.booking-rail-primary {
  margin-top: 20px;
}

.booking-rail-footer {
  margin-top: auto;
}

.booking-rail-primary a,
.booking-rail-footer button {
  position: relative;
  display: grid;
  width: 56px;
  min-height: 48px;
  place-items: center;
  gap: 2px;
  border: 0;
  border-radius: calc(var(--radius) - 2px);
  background: transparent;
  color: var(--muted-foreground);
  text-decoration: none;
}

.booking-rail-primary a:hover,
.booking-rail-primary a.is-active,
.booking-rail-footer button:hover {
  background: var(--slate-4);
  color: var(--foreground);
}

.booking-rail-primary small {
  font-size: 0.625rem;
  line-height: 1;
}

.notification-dot {
  position: absolute;
  top: 8px;
  right: 12px;
  width: 6px;
  height: 6px;
  border: 1px solid var(--slate-2);
  border-radius: 999px;
  background: var(--red-9);
}

.booking-secondary {
  position: relative;
  z-index: 20;
  height: 100%;
  min-height: 0;
  flex: 0 0 auto;
}

.booking-sidebar-header {
  display: flex;
  min-height: 57px;
  grid-template-columns: 1fr auto;
  align-items: center;
  justify-content: space-between;
  padding-inline: 16px;
}

.booking-sidebar-header strong {
  font-size: 1rem;
}

.booking-sidebar-footer {
  border-top: 1px solid var(--sidebar-border);
  line-height: 1.25;
}

.booking-sidebar-footer .muted {
  color: var(--muted-foreground);
  font-size: 0.75rem;
}

.booking-main {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  flex-direction: column;
  background: var(--background);
}

.booking-toolbar {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--border);
  padding: 12px 24px;
}

.booking-title-row {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.booking-eyebrow {
  display: none;
  color: var(--muted-foreground);
  font-size: 0.75rem;
}

.booking-toolbar h1 {
  margin: 0;
  font-size: 1.125rem;
  line-height: 1.5rem;
  font-weight: 600;
}

.booking-search {
  max-width: 22rem;
}

button.booking-mobile-menu {
  display: none;
}

.booking-filterbar {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--border);
  padding: 9px 24px;
}

.booking-filterbar > nav {
  width: auto;
  gap: 0;
}

/* stylelint-disable-next-line no-descending-specificity -- Status tabs override the shared native-button baseline. */
.booking-filterbar > nav > button {
  line-height: inherit;
  white-space: normal;
}

.booking-result-count {
  flex: none;
  color: var(--muted-foreground);
  font-size: 0.75rem;
}

.booking-scroll {
  min-height: 0;
  flex: 1 1 auto;
  border-radius: 0;
}

.booking-list {
  min-width: 48rem;
}

.booking-row {
  border-bottom: 1px solid var(--border);
}

.booking-row-trigger {
  display: grid;
  width: 100%;
  min-height: 0;
  align-items: stretch;
  justify-content: stretch;
  gap: 14px;
  border: 0;
  background: transparent;
  padding: 20px 28px;
  color: inherit;
  font: inherit;
  line-height: inherit;
  white-space: normal;
  text-align: left;
  cursor: pointer;
}

.booking-row-trigger:hover {
  background: var(--slate-2);
}

.booking-row-trigger:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: -2px;
}

.booking-summary {
  display: grid;
  grid-template-columns: max-content max-content minmax(10rem, 1fr) max-content;
  align-items: center;
  gap: 20px;
  color: var(--muted-foreground);
}

:where(.booking-summary) > span:not(.badge),
.booking-meta > span {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
}

.booking-summary .booking-reference {
  color: var(--blue-10);
  font-size: 0.9375rem;
  font-weight: 600;
}

.booking-route {
  display: grid;
  grid-template-columns: minmax(10rem, 1fr) minmax(12rem, 2fr) minmax(
      10rem,
      1fr
    );
  align-items: center;
  gap: 20px;
}

.booking-place {
  display: grid;
  gap: 2px;
}

.booking-place strong {
  font-size: 1.05rem;
  font-weight: 600;
}

.booking-place > span {
  color: var(--muted-foreground);
}

.booking-destination {
  text-align: right;
}

.booking-journey {
  position: relative;
  display: grid;
  min-height: 42px;
  place-items: center;
}

.booking-route-line {
  position: absolute;
  top: 12px;
  right: 0;
  left: 0;
  border-top: 2px dotted var(--slate-7);
}

.booking-journey > svg {
  position: relative;
  z-index: 1;
  box-sizing: content-box;
  background: var(--background);
  color: var(--slate-10);
  padding-inline: 10px;
}

.booking-row-trigger:hover .booking-journey > svg {
  background: var(--slate-2);
}

.booking-journey small {
  align-self: end;
  color: var(--muted-foreground);
  font-size: 0.6875rem;
}

.booking-meta {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 22px;
  overflow: hidden;
  border-radius: calc(var(--radius) - 2px);
  background: var(--slate-3);
  padding: 7px 10px;
  color: var(--muted-foreground);
  font-size: 0.78rem;
}

.booking-meta > span:first-child {
  color: var(--foreground);
}

.booking-meta > span span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.badge[status="Confirmed"] {
  background: var(--green-4);
  color: var(--green-11);
}

.badge[status="Pending"] {
  background: var(--amber-4);
  color: var(--amber-11);
}

.badge[status="Change Requested"] {
  background: var(--blue-4);
  color: var(--blue-11);
}

.booking-empty {
  min-height: 24rem;
}

.booking-dialog {
  display: contents;
}

.booking-dialog > dialog {
  position: fixed;
}

.booking-dialog-reference {
  color: var(--blue-10);
  font-size: 0.75rem;
  font-weight: 600;
}

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

.booking-detail-grid > div {
  display: grid;
  gap: 3px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
}

.booking-detail-grid dt {
  color: var(--muted-foreground);
  font-size: 0.75rem;
}

.booking-detail-grid dd {
  margin: 0;
  font-weight: 500;
}

.booking-detail-wide {
  grid-column: 1 / -1;
}

@media (width <= 1020px) {
  .booking-rail {
    width: 64px;
    flex-basis: 64px;
  }

  .booking-summary {
    gap: 12px;
  }

  .booking-meta {
    gap: 14px;
  }

  .booking-meta > span:nth-last-child(-n + 2) {
    display: none;
  }
}

@media (width <= 760px) {
  body {
    padding: 0;
  }

  .booking-shell {
    border: 0;
    border-radius: 0;
  }

  .booking-rail {
    display: none;
  }

  .booking-secondary {
    position: absolute;
    inset: 0 auto 0 0;
    height: 100%;
    box-shadow: var(--shadow-lg);
  }

  .booking-secondary[collapsed] {
    box-shadow: none;
  }

  button.booking-mobile-menu,
  .booking-eyebrow {
    display: inline-flex;
  }

  .booking-toolbar {
    min-height: 64px;
    padding: 10px 14px;
  }

  .booking-search {
    max-width: 12rem;
  }

  .booking-search [align="inline-end"] {
    display: none;
  }

  .booking-filterbar {
    overflow-x: auto;
    padding-inline: 14px;
  }

  .booking-result-count {
    display: none;
  }

  .booking-row-trigger {
    gap: 12px;
    padding-inline: 18px;
  }

  .booking-list {
    min-width: 0;
  }

  .booking-summary {
    grid-template-columns: minmax(0, 1fr) max-content;
    gap: 8px;
  }

  :where(.booking-summary) > span:nth-child(2),
  :where(.booking-summary) > span:nth-child(3) {
    display: none;
  }

  .booking-route {
    grid-template-columns: minmax(0, 1fr) 42px minmax(0, 1fr);
    gap: 8px;
  }

  .booking-place strong {
    overflow-wrap: anywhere;
    font-size: 0.9375rem;
  }

  .booking-place > span {
    font-size: 0.75rem;
  }

  .booking-route-line {
    right: -4px;
    left: -4px;
  }

  .booking-journey small {
    display: none;
  }

  .booking-meta {
    gap: 14px;
    overflow: visible;
  }

  .booking-meta > span:nth-child(n + 3) {
    display: none;
  }
}
