/* HMS-339 — Booking management page (.booking-mgmt) */

.booking-mgmt {
  display: flex;
  flex-direction: column;
  gap: var(--wa-space-m);
}

.booking-mgmt__breadcrumb {
  color: var(--wa-color-text-quiet);
  font-size: var(--wa-font-size-s);
}

.booking-mgmt__breadcrumb i {
  font-size: var(--wa-font-size-xs);
  margin-inline: var(--wa-space-2xs);
}

.booking-mgmt__title {
  margin: 0;
  font-size: var(--wa-font-size-xl);
  font-weight: var(--wa-font-weight-bold);
}

.booking-mgmt__event {
  color: var(--wa-color-text-quiet);
  font-size: var(--wa-font-size-s);
}

.booking-mgmt__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: var(--wa-space-s) var(--wa-space-m);
}

.booking-mgmt__search {
  display: flex;
  align-items: end;
  gap: var(--wa-space-s);
  flex: 0 0 17rem;
}

.booking-mgmt__search wa-input {
  width: 100%;
}

/* Figma shows an icon-only search box — keep the label for the accessible name
   but hide it visually (same clip recipe as .visually-hidden). */
.booking-mgmt__search wa-input::part(label) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.booking-mgmt__table-wrap {
  overflow-x: auto;
  border: 1px solid var(--wa-color-surface-border);
  border-radius: var(--wa-border-radius-m);
  background: var(--wa-color-surface-raised);
}

.booking-mgmt__table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--wa-font-size-s);
}

.booking-mgmt__table th {
  text-align: left;
  color: var(--wa-color-text-quiet);
  font-weight: var(--wa-font-weight-semibold);
  padding: var(--wa-space-xs) var(--wa-space-s);
  border-bottom: 1px solid var(--wa-color-surface-border);
  white-space: nowrap;
}

.booking-mgmt__table th i:first-child {
  margin-inline-end: var(--wa-space-2xs);
}

.booking-mgmt__table td {
  padding: var(--wa-space-xs) var(--wa-space-s);
  border-bottom: 1px solid var(--wa-color-surface-border);
  white-space: nowrap;
}

.booking-mgmt__table tbody tr:last-child td {
  border-bottom: none;
}

.booking-mgmt__table tbody tr:hover {
  background: var(--wa-color-surface-default);
}

/* When the table overflows its wrap at narrow widths the Actions column pins
   to the right edge instead of scrolling out of view — same convention as
   block_list.css. */
.booking-mgmt__table th:last-child,
.booking-mgmt__table td:last-child {
  position: sticky;
  right: 0;
  background: var(--wa-color-surface-raised);
  box-shadow: -1px 0 0 var(--wa-color-surface-border);
}

.booking-mgmt__sort {
  display: inline-flex;
  align-items: center;
  gap: var(--wa-space-2xs);
  color: inherit;
  text-decoration: none;
}

.booking-mgmt__footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--wa-space-s);
}

.booking-mgmt__footer form {
  display: flex;
  align-items: center;
  gap: var(--wa-space-2xs);
}

.booking-mgmt__count {
  color: var(--wa-color-text-quiet);
  margin-inline-start: auto;
}

.booking-mgmt__pages {
  margin-inline-start: auto;
}

.booking-mgmt__pages,
.booking-mgmt__pages .series-nav {
  display: flex;
  gap: var(--wa-space-2xs);
  align-items: center;
}

.booking-mgmt__pages .series-nav a {
  min-width: 2rem;
  text-align: center;
  padding: var(--wa-space-2xs) var(--wa-space-xs);
  border-radius: var(--wa-border-radius-m);
  color: var(--wa-color-text-normal);
  text-decoration: none;
  font-size: var(--wa-font-size-s);
}

.booking-mgmt__pages .series-nav a[href]:hover {
  background: var(--wa-color-surface-lowered);
}

.booking-mgmt__pages .series-nav a[aria-current="page"] {
  background: var(--wa-color-brand-fill-loud);
  color: var(--wa-color-brand-on-loud);
}

.booking-mgmt__pages .series-nav a[aria-disabled]:not([aria-current="page"]) {
  opacity: 0.4;
  cursor: default;
}

.booking-mgmt__empty {
  padding: var(--wa-space-l);
  border-radius: var(--wa-border-radius-m);
  background: var(--wa-color-surface-default);
  color: var(--wa-color-text-quiet);
  text-align: center;
}

.booking-mgmt__new-link {
  color: var(--wa-color-brand);
  text-decoration: none;
}

.booking-mgmt__new-link:hover {
  text-decoration: underline;
}

.booking-mgmt__manual-form {
  display: flex;
  flex-direction: column;
  gap: var(--wa-space-m);
  max-width: 36rem;
  padding: var(--wa-space-l);
  border: 1px solid var(--wa-color-surface-border);
  border-radius: var(--wa-border-radius-m);
  background: var(--wa-color-surface-raised);
}

.booking-mgmt__actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--wa-space-s);
}

@media (max-width: 40rem) {
  .booking-mgmt__footer {
    flex-direction: column;
    align-items: stretch;
  }

  .booking-mgmt__header {
    flex-direction: column;
    align-items: stretch;
  }

  .booking-mgmt__search {
    flex: 1 1 auto;
    flex-wrap: wrap;
  }
}
