/* ==========================================================================
   SUN Liner Portal - page furniture.

   Things that belong to a SCREEN but are not a control: the page frame, the
   title row, field widths, the pager strip, notices. Controls (buttons, icons,
   grid, badges, cards) are in dx-controls.css; the shell (header, menu,
   footer) is in layout.css. Every colour is a theme.css token.
   ========================================================================== */

.sl-page {
  padding: 18px 22px 26px;
  color: var(--sl-ink);
  font-size: 14px;
}

.sl-page__header {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.sl-page__title {
  margin: 0;
  color: var(--sl-heading);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.sl-page__crumb {
  color: var(--sl-ink-subtle);
  font-size: 12.5px;
}

/* ---- Fields in a toolbar ----------------------------------------------- */

.sl-field--search {
  flex: 1 1 340px;
  max-width: 480px;
}

/* A short fixed list (Active / Inactive) beside the search box. */
.sl-field--status {
  flex: 0 0 160px;
}

/* ---- Grid card while a page is being fetched --------------------------- */

/* The grid stays readable while a page is being fetched, rather than
   disappearing and shifting the layout. */
.sl-card--grid.is-busy {
  opacity: 0.55;
  transition: opacity 0.12s ease-in;
}

.sl-state--error {
  border-color: color-mix(in srgb, var(--sl-stop) 35%, transparent);
  background: var(--sl-stop-soft);
  color: var(--sl-stop);
}

.sl-state--denied {
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 26px 24px;
  border-inline-start: 4px solid var(--sl-orange-500);
}

.sl-state--denied h2 {
  margin: 0;
  color: var(--sl-heading);
  font-size: 17px;
}

/* ---- Pager ------------------------------------------------------------- */

.sl-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 14px;
  border-top: 1px solid var(--sl-line);
  background: var(--sl-surface-raised);
}

/* Keeps the legacy footer wording, which is what users read to know where
   they are: "Page 1 of 4994 (99880 items)". */
.sl-pager__label {
  color: var(--sl-ink-muted);
  font-size: 13px;
}

/* ---- Blazor error UI --------------------------------------------------- */

#blazor-error-ui {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 1000;
  display: none;
  padding: 0.6rem 1.25rem 0.7rem;
  background: var(--sl-warn-soft);
  color: var(--sl-ink);
  box-shadow: 0 -1px 2px rgb(0 0 0 / 20%);
}

#blazor-error-ui .dismiss {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  cursor: pointer;
}

.blazor-error-boundary {
  padding: 1rem 1rem 1rem 1.25rem;
  border-radius: var(--sl-radius);
  background: var(--sl-stop);
  color: var(--sl-ink-on-accent);
}

.blazor-error-boundary::after {
  content: "An error has occurred.";
}

.validation-message {
  color: var(--sl-stop);
}
