.hotel-access {
  max-width: 80rem;
  margin-block-start: var(--wa-space-l);
}

.hotel-access__header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-block: var(--wa-space-m) var(--wa-space-l);
}

.hotel-access__title {
  font-size: var(--wa-font-size-xl);
  font-weight: var(--wa-font-weight-bold, 700);
  margin: 0;
}

.hotel-access__subtitle {
  color: var(--wa-color-text-quiet);
  margin: var(--wa-space-xs) 0 0;
}

.role-definitions {
  margin-block-end: var(--wa-space-l);
}

.role-definitions__heading {
  font-size: var(--wa-font-size-l);
  font-weight: var(--wa-font-weight-bold, 700);
}

.role-definitions__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--wa-space-m);
}

@media (max-width: 60rem) {
  .role-definitions__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.role-card {
  background: var(--wa-color-surface-default);
  border: 1px solid var(--wa-color-surface-border);
  border-radius: var(--wa-border-radius-l);
  padding: var(--wa-space-l);
}

.role-card__name {
  font-size: var(--wa-font-size-m);
  font-weight: var(--wa-font-weight-bold, 700);
  margin: 0;
}

.role-card__desc {
  color: var(--wa-color-text-quiet);
  font-size: var(--wa-font-size-s);
  margin: var(--wa-space-xs) 0 0;
  line-height: 1.45;
}

.hotel-access__filters {
  display: flex;
  gap: var(--wa-space-m);
  margin-block-end: var(--wa-space-m);
  align-items: end;
}

.hotel-access__filters wa-select {
  min-width: 14rem;
}

.hotel-access__filters wa-input {
  margin-inline-start: auto;
  min-width: 16rem;
}

@media (max-width: 60rem) {
  .hotel-access__filters {
    flex-wrap: wrap;
  }

  .hotel-access__filters wa-input {
    margin-inline-start: 0;
    width: 100%;
  }
}

/* Same scroll-inside-the-wrap contract as .vip-verifications__table-wrap and
   .admin-overrides__table-wrap: auto layout fills the wrap when the table
   fits (desktop keeps its wrapped cells) and scrolls only when min-content
   exceeds it — at 1024 the Actions column would otherwise sit ~240px beyond
   the viewport with no way to reach it. */
.hotel-access__table-wrap {
  overflow-x: auto;
  width: 100%;
  box-shadow: inset -10px 0 10px -10px var(--wa-color-neutral-border-quiet);
}

.hotel-access__table {
  width: 100%;
  border-collapse: collapse;
}

.hotel-access__table thead th {
  text-align: start;
  color: var(--wa-color-text-quiet);
  font-size: var(--wa-font-size-s);
  border-bottom: 1px solid var(--wa-color-surface-border);
  padding: var(--wa-space-s);
}

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

.hotel-access__sort.is-active {
  color: var(--wa-color-text-normal);
}

.hotel-access__table tbody td {
  padding: var(--wa-space-s);
  border-bottom: 1px solid var(--wa-color-surface-border);
}

/* Actions cell holds the manager Edit button and/or the editor Mint access
   code link. Keep both on one line: at the auto-sized ~84px the bare link
   wrapped one word per line and doubled every row's height. The wrap's
   overflow-x:auto absorbs the wider column on narrow viewports. The flex
   lives on a div inside the td — the td must stay a table cell or the
   collapsed bottom border under the last row renders broken. */
.hotel-access__actions {
  display: flex;
  align-items: center;
  gap: var(--wa-space-s);
  white-space: nowrap;
}

/* Emails are unbreakable ~200px tokens; letting them wrap surrenders the
   min-content the nowrap Actions cell needs, so the whole row stays visible
   at desktop without horizontal scrolling. */
.hotel-access__email {
  overflow-wrap: anywhere;
}

.hotel-access__hotel {
  font-weight: var(--wa-font-weight-semibold, 600);
}

.hotel-access__pagination {
  display: flex;
  align-items: center;
  gap: var(--wa-space-l);
  margin-block-start: var(--wa-space-m);
}

.hotel-access__per-page {
  display: flex;
  align-items: center;
  gap: var(--wa-space-xs);
  color: var(--wa-color-text-quiet);
  font-size: var(--wa-font-size-s);
}

.hotel-access__per-page wa-select {
  min-width: 4.5rem;
}

.hotel-access__count {
  margin-inline: auto;
  color: var(--wa-color-text-quiet);
  font-size: var(--wa-font-size-s);
}

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

.hotel-access__pages .series-nav a {
  min-width: 2rem;
  text-align: center;
  padding: var(--wa-space-2xs, 2px) 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);
}

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

/* Pagy marks the current page aria-disabled too, so the dim rule must exclude
   it — and Figma's current state is a solid brand fill, not a faint pill. */
.hotel-access__pages .series-nav a[aria-current="page"] {
  background: var(--wa-color-brand-fill-loud);
  color: var(--wa-color-brand-on-loud);
}

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

.hotel-access__empty {
  color: var(--wa-color-text-quiet);
  padding: var(--wa-space-xl) 0;
  text-align: center;
}

.access-dialog__form {
  display: grid;
  gap: var(--wa-space-m);
}

.access-dialog__role {
  margin: 0;
  color: var(--wa-color-text-normal);
}

.access-dialog__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--wa-space-m);
}

.access-dialog__warning {
  margin: 0;
}

.access-dialog__note {
  color: var(--wa-color-text-quiet);
  font-size: var(--wa-font-size-s);
  margin: 0;
}

.access-dialog__actions {
  display: flex;
  justify-content: center;
  gap: var(--wa-space-m);
  margin-block-start: var(--wa-space-m);
}

.access-tabs {
  display: flex;
  gap: var(--wa-space-l);
  border-bottom: 1px solid var(--wa-color-surface-border);
  margin-block-end: var(--wa-space-m);
}

.access-tabs__tab {
  background: none;
  border: 0;
  padding: var(--wa-space-s) var(--wa-space-xs);
  font: inherit;
  color: var(--wa-color-text-quiet);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.access-tabs__tab[aria-pressed="true"] {
  color: var(--wa-color-text-normal);
  border-bottom-color: var(--wa-color-brand-60, currentColor);
}

.access-tabs__tab:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* HMS-516 — "Mint access code" is a POST form now (the response carries a
   working sign-in credential); the button keeps the old inline-link look. */
.hotel-access__mint-form {
  display: inline;
}

.hotel-access__mint {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--wa-color-text-link);
  text-decoration: underline;
  cursor: pointer;
}
