/* HMS-885 — Emergency relocation admin index matched to Figma 600:28534
   (FRAME ON-SITE OPS - Emergency Relocation): flush KPI strip, badge status
   cells, fixed-proportion tables, and a Show-per-page footer under each. */

.relocation-cases__section {
  margin-top: 1rem;
}

/* ------------------------------------------------------------- KPI strip */

.relocation-cases__kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.relocation-cases__kpi {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 2rem;
  background: var(--wa-color-surface-default);
  border-right: 1px solid var(--wa-color-surface-border);
}

.relocation-cases__kpi:last-child {
  border-right: 0;
}

.relocation-cases__kpi-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--wa-color-text-normal);
}

.relocation-cases__kpi-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.relocation-cases__kpi-stat {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.relocation-cases__kpi-value {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--wa-color-text-normal);
}

.relocation-cases__kpi-desc {
  font-size: 0.875rem;
  line-height: 1.2;
  color: var(--wa-color-text-quiet);
}

.relocation-cases__kpi-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 3rem;
  height: 3rem;
  border-radius: 6px;
  font-size: 1.25rem;
}

.relocation-cases__kpi--active .relocation-cases__kpi-icon,
.relocation-cases__kpi--hotels .relocation-cases__kpi-icon {
  background: var(--wa-color-brand-fill-quiet);
  border: 1px solid var(--wa-color-brand-border-normal);
  color: var(--wa-color-brand-40);
}

.relocation-cases__kpi--completed .relocation-cases__kpi-icon {
  background: var(--wa-color-success-fill-quiet);
  border: 1px solid var(--wa-color-success-border-normal);
  color: var(--wa-color-success-on-quiet);
}

.relocation-cases__kpi--pending .relocation-cases__kpi-icon {
  background: var(--wa-color-warning-fill-quiet);
  border: 1px solid var(--wa-color-warning-border-normal);
  color: var(--wa-color-warning-on-quiet);
}

/* -------------------------------------------------------- section rhythm */

/* HMS-1881 — the available-rooms footer has no bottom margin of its own, so
   the shared issue-log card supplies the visible break after pagination. */
.relocation-cases .on-site__section--issue-log {
  margin-top: 2rem;
}

.relocation-cases__section-title {
  margin: 0 0 0.5rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--wa-color-text-normal);
}

.relocation-cases__desc {
  margin: 0 0 1rem;
  font-size: 1rem;
  color: var(--wa-color-text-quiet);
}

.relocation-cases__note {
  margin: 0 0 1rem;
  font-size: 0.875rem;
  color: var(--wa-color-text-quiet);
}

/* --------------------------------------------------------------- tables */

.relocation-cases__table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}

.relocation-cases__table th,
.relocation-cases__table td {
  padding: 0.75rem 1rem;
  text-align: left;
  vertical-align: middle;
  font-size: 1rem;
  color: var(--wa-color-text-normal);
  border-bottom: 1px solid var(--wa-color-surface-border);
  overflow-wrap: break-word;
}

.relocation-cases__table thead th {
  background: var(--wa-color-surface-lowered);
  font-weight: 600;
}

.relocation-cases__table thead th i {
  margin-right: 0.625rem;
  color: var(--wa-color-text-quiet);
}

/* Fixed-proportion columns keep every data column aligned like the Figma
   tracks; min-widths let the wrap scroll horizontally on narrow screens
   instead of squeezing the tracks to unreadable slivers. Specificity must
   outrank `.admin-table-wrap table`'s min-width: max-content. */
.admin-table-wrap .relocation-cases__table--cases {
  min-width: 62rem;
}

.admin-table-wrap .relocation-cases__table--available {
  min-width: 52rem;
}

.relocation-cases__attendee {
  font-weight: 600;
}

.relocation-cases__hotel {
  font-weight: 600;
}

.relocation-cases__hotel-tag {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--wa-color-text-quiet);
}

.relocation-cases__actions-inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* The Mark-relocated form wraps a single wa-button — display:contents lets it
   sit in the actions flex row like its sibling buttons. */
.relocation-cases__row-form {
  display: contents;
}

.relocation-cases__not-for {
  font-size: 0.8rem;
  color: var(--wa-color-text-quiet);
}

/* --------------------------------------------------------------- badges */

.relocation-cases__badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
}

.relocation-cases__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.125rem 0.5rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}

.relocation-cases__badge--brand {
  background: var(--wa-color-brand-fill-quiet);
  color: var(--wa-color-brand-on-quiet);
}

.relocation-cases__badge--warning {
  background: var(--wa-color-warning-fill-quiet);
  color: var(--wa-color-warning-on-quiet);
}

.relocation-cases__badge--success {
  background: var(--wa-color-success-fill-quiet);
  color: var(--wa-color-success-on-quiet);
}

.relocation-cases__badge--neutral {
  background: var(--wa-color-neutral-fill-quiet);
  color: var(--wa-color-neutral-on-quiet);
}

/* ------------------------------------------------------------ pagination */

.relocation-cases__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
}

.relocation-cases__per-page {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.875rem;
  color: var(--wa-color-text-quiet);
}

.relocation-cases__count {
  margin: 0;
  margin-inline: auto;
  font-size: 0.875rem;
  color: var(--wa-color-text-quiet);
  white-space: nowrap;
}

.relocation-cases__pages {
  display: flex;
}

.relocation-cases__pages .series-nav {
  display: flex;
  align-items: center;
  gap: 0.125rem;
}

.relocation-cases__pages .series-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.625rem;
  padding: 0.125rem 0.375rem;
  border-radius: var(--wa-border-radius-m);
  color: var(--wa-color-text-normal);
  font-size: 0.875rem;
  text-decoration: none;
}

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

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

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

/* ---------------------------------------------------------- narrow screens */

@media (max-width: 48rem) {
  .relocation-cases__kpi-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .relocation-cases__kpi {
    gap: 0.75rem;
    padding: 1rem;
    border-right: 0;
    border: 1px solid var(--wa-color-surface-border);
    border-radius: 8px;
  }

  .relocation-cases__kpi-icon {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1rem;
  }
}

/* --------------------------------------------------------------- legacy */

.relocation-cases__empty {
  color: var(--wa-color-text-quiet);
}

/* HMS-886 — Assign Alternative Room modal matched to Figma 600:19564:
   one 16px rhythm through the body, quiet labels over normal-weight values,
   a brand-outlined selected card, the blue notify banner, and a centered
   Cancel + Assign footer band. */
.relocation-cases__assign-dialog {
  --width: min(40rem, 94vw);
}

.relocation-cases__assign-dialog::part(title) {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--wa-color-text-normal);
}

.relocation-cases__assign-dialog::part(footer) {
  border-top: 1px solid var(--wa-color-neutral-fill-quiet);
  padding-top: var(--wa-space-m);
  justify-content: center;
}

.relocation-cases__assign-dialog [slot="footer"] {
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.relocation-cases__dialog-body,
.relocation-cases__dialog-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.relocation-cases__dialog-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 1rem;
  color: var(--wa-color-text-quiet);
}

.relocation-cases__dialog-value {
  color: var(--wa-color-text-normal);
  text-align: right;
}

.relocation-cases__dialog-sub {
  margin: 0;
  font-size: 0.875rem;
  color: var(--wa-color-text-quiet);
}

.relocation-cases__dialog-divider {
  border: 0;
  border-top: 1px solid var(--wa-color-surface-border);
  margin: 0;
}

.relocation-cases__dialog-heading {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--wa-color-text-normal);
  margin: 0;
}

.relocation-cases__dialog-dates {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.relocation-cases__dialog-dates label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--wa-color-text-normal);
}

.relocation-cases__dialog-dates input {
  width: 100%;
  height: 2.75rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--wa-color-surface-border);
  border-radius: 6px;
  background: var(--wa-color-surface-default);
  color: var(--wa-color-text-normal);
  font-size: 1rem;
  box-sizing: border-box;
}

/* Figma Message Tile — the #E8F3FF fill is the design's literal hex (same
   convention as the wizard callout), ringed by the brand border. */
.relocation-cases__banner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: var(--wa-color-text-normal);
  background: #E8F3FF;
  border: 1px solid var(--wa-color-brand);
  border-radius: 4px;
}

.relocation-cases__banner i {
  color: var(--wa-color-brand);
}

.relocation-cases__room-option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  padding: 1rem;
  border: 1px solid var(--wa-color-surface-border);
  border-radius: 8px;
  background: var(--wa-color-surface-default);
  cursor: pointer;
}

/* The radio stays in the DOM for form semantics and keyboard focus, but the
   card itself is the Figma selection indicator — no circle is drawn. */
.relocation-cases__room-option input[type="radio"] {
  position: absolute;
  opacity: 0;
}

.relocation-cases__room-option:hover {
  border-color: var(--wa-color-brand);
}

.relocation-cases__room-option:focus-within {
  outline: 2px solid var(--wa-color-brand);
  outline-offset: 2px;
}

.relocation-cases__room-option:has(input:checked) {
  border-color: var(--wa-color-brand);
  background: #EAEFF2; /* Figma selected-card fill */
}

.relocation-cases__room-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
}

.relocation-cases__room-hotel {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--wa-color-text-normal);
  overflow-wrap: break-word;
}

.relocation-cases__room-sub {
  font-size: 1rem;
  color: var(--wa-color-text-normal);
}

.relocation-cases__room-price {
  flex: none;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--wa-color-text-normal);
  white-space: nowrap;
}

/* Blocks that cannot take the case's stay (no coverage or zero rooms) stay
   visible but unselectable — staff see why an option is out, not an error
   after submitting. */
.relocation-cases__room-option--unavailable {
  opacity: 0.55;
  cursor: not-allowed;
}

.relocation-cases__room-option--unavailable:hover {
  border-color: var(--wa-color-surface-border);
}

/* HMS-885 QA retest — the Status cell carries only the current status badge.
   Workflow-step chips are intentionally absent; see the Figma status column. */
