/*
 * ACP layer over biz-bs-ee.css — the customer control panel's look.
 *
 * Ported from acp24's resources/scss/acp_style.scss (origin/develop, 2026-10-06). Kept as plain
 * CSS on purpose: the whole delta is custom properties + a dozen layout rules, so it needs no
 * Sass build and ships with the PHP. If it grows past layout into components, promote it to a
 * packages/bsee/src/scss/acp.scss entry (see the ACP plan, Course changes 2026-10-06).
 *
 * Font: Nunito Sans (self-hosted variable font, weights 200–1000), sibling of BSEE's Nunito.
 * Root size: acp24's 20px on every ACP page (html:has(> body.acp-body)), adopted 2026-10-06 after
 * a 16px start; see _README/acp-style.readme.md for the rollout.
 */

@font-face {
  font-family: "Nunito Sans";
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  src: url("fonts/nunito-sans-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Nunito Sans";
  font-style: italic;
  font-weight: 200 1000;
  font-display: swap;
  src: url("fonts/nunito-sans-latin-italic.woff2") format("woff2");
}

:root {
  --acp-font: "Nunito Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --bs-font-sans-serif: var(--acp-font);
  --bs-body-font-family: var(--acp-font);
  --acp-navbar-height: 56px;
  --acp-sidebar-width: 310px;
  --acp-offcanvas-min-height-md: 460px;

  /* acp24 palette (measured 2026-10-06) — see _README/acp-style.readme.md §Tokens */
  --acp-ink: #172b4d;
  --acp-slate: #44546f;
  --acp-tint: #e9f2ff;
  --acp-tint-border: #cce0ff;
  --acp-border-soft: rgba(9, 30, 66, .14);
  --acp-radius: .25rem;
  --acp-nav-color: var(--acp-slate);
  --acp-page-bg: #f8f9fa;
  --acp-sidebar-bg: #fff;
}

/* acp24's dark palette (measured 2026-10-06): navy chrome, charcoal page, blue-grey text. */
/* Native controls (date pickers, scrollbars) follow color-scheme. Bootstrap only declares the
   dark one, so with the OS in dark mode a light ACP page got a dark date picker — say light. */
:root:not([data-bs-theme="dark"]) {
  color-scheme: light;
}

[data-bs-theme="dark"] {
  --acp-ink: #b6c2cf;
  --acp-tint: #092957;
  --acp-tint-border: #0055cc;
  --acp-border-soft: rgba(166, 197, 226, .16);
  --acp-nav-color: #9fadbc;
  --acp-page-bg: #2b3035;
  --acp-sidebar-bg: #091e42;
}

/* Text and page colours come from the tokens above in both themes. The page title's rule is
   masked with --bs-tertiary-bg, so it must equal the page colour or a block shows behind it. */
.acp-body {
  --bs-body-color: var(--acp-ink);
  --bs-tertiary-bg: var(--acp-page-bg);
  --bs-border-color-translucent: var(--acp-border-soft);
  background-color: var(--acp-page-bg);
}

/* BSEE forces its dark page colour with !important; only a matching !important can replace it. */
[data-bs-theme="dark"] body.acp-body:not(.acp-guest) {
  background-color: var(--acp-page-bg) !important;
}

[data-bs-theme="dark"] body.acp-guest {
  background-color: var(--acp-tint) !important;
}

/* ── Typography: BSEE hard-codes Nunito on headings and card headers ─────────────── */
.acp-body h1, .acp-body .h1, .acp-body h2, .acp-body .h2, .acp-body h3, .acp-body .h3,
.acp-body h4, .acp-body .h4, .acp-body h5, .acp-body .h5, .acp-body h6, .acp-body .h6,
.acp-body .card-header {
  font-family: var(--acp-font);
}

.acp-body .card-header {
  letter-spacing: normal;
}

/* ── Base size: acp24's 20px root, body text at 1rem (BSEE's default is 15px) ─────── */
html:has(> body.acp-body) {
  font-size: 20px;
}

.acp-body {
  --bs-body-font-size: 1rem;
}

/* ── Shell: fixed top bar, fixed sidebar on lg+, content offset beside it ────────── */
.acp-body {
  padding-top: var(--acp-navbar-height);
  min-height: 100vh;
}

.acp-topbar {
  height: var(--acp-navbar-height);
  background-color: var(--acp-tint);
  border-bottom: 1px solid var(--acp-tint-border);
}

/* One line at every width: the brand block shrinks and the practice name truncates. */
.acp-topbar {
  flex-wrap: nowrap;
}

.acp-topbar-brand {
  flex: 1 1 auto;
  min-width: 0;
}

.acp-topbar-brand .text-truncate {
  min-width: 0;
}

.acp-notify-dot {
  width: .5rem;
  height: .5rem;
}

/* Same circle as the avatar (40px), white shield on amber. */
.acp-staff-mark {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

/* Bell count: acp24's small badge, tucked onto the bell's top-right corner. */
.acp-bell-count {
  top: 4px;
  right: -10px;
  font-size: .6rem;
  padding: .3em .5em;
}

/* Top bar rollovers, in the buttons' language: a filled circle (staff, Help ?, avatar) turns
   white with its colour as the icon and ring; the bell turns amber. */
.acp-topbar a.bg-warning:hover,
.acp-topbar a.bg-discovery:hover,
.acp-topbar a:hover > .acp-avatar {
  background-color: #fff !important;
  box-shadow: inset 0 0 0 2px currentColor;
}

.acp-topbar a.bg-warning:hover {
  color: var(--bs-warning) !important;
}

.acp-topbar a.bg-discovery:hover {
  color: var(--bs-discovery) !important;
}

.acp-topbar a:hover > .acp-avatar {
  color: var(--bs-primary) !important;
}

.acp-topbar .js-acp-bell:hover {
  color: var(--bs-warning) !important;
}

.acp-brand-name {
  font-size: 1.75rem;
  line-height: 1;
}

.acp-sidebar {
  position: fixed;
  top: var(--acp-navbar-height);
  bottom: 0;
  left: 0;
  width: var(--acp-sidebar-width);
  overflow-y: auto;
  background-color: var(--acp-sidebar-bg);
}

.acp-main {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - var(--acp-navbar-height));
}

@media (min-width: 992px) {
  .acp-main {
    margin-left: var(--acp-sidebar-width);
  }
}

/* Page padding (John's tweak 2026-10-07): 1rem top/bottom everywhere; 1.5rem sides from md up,
   1rem on phones — the same with or without the sidebar. */
.acp-container {
  flex: 1 0 auto;
  padding: 1rem;
}

@media (min-width: 768px) {
  .acp-container {
    padding: 1rem 1.5rem;
  }
}

/* biz-bs-ee's customer-page styles give every <footer> a sidebar-width left margin; ACP's footer
   already sits inside the offset main column. */
.acp-body footer {
  margin-left: 0;
}

/* ── Sidebar nav ──────────────────────────────────────────────────────────────────── */
/* acp24: .875rem, weight 500, slate text and icons, square, 35px rows; active = blue, same weight. */
.acp-nav .nav-link {
  color: var(--acp-nav-color);
  font-size: .875rem;
  font-weight: 500;
  padding: .25rem .5rem;
  border-radius: 0;
}

.acp-nav .nav-link:hover,
.acp-nav .nav-link:focus-visible {
  color: var(--bs-primary);
}

.acp-nav .nav-link.active,
.acp-nav .nav-link.active i {
  color: var(--bs-primary);
}

.acp-nav .acp-nav-children .nav-link {
  padding-left: 1.5rem;
}

/* .nav wraps by default; while a group animates open/closed its height is squeezed and the
   items wrapped into a second column to the right for a moment. One column, always. */
.acp-nav,
.acp-nav-children {
  flex-wrap: nowrap;
}

/* The group caret turns when Bootstrap's collapse marks the toggle expanded. */
.acp-nav .acp-nav-caret {
  transition: transform 0.15s ease;
}

.acp-nav [aria-expanded="true"] .acp-nav-caret {
  transform: rotate(90deg);
}

/* ── Page title: icon disc + title over a rule (acp24's icon-header-widget) ──────── */
.acp-page-title .fa-stack {
  flex-shrink: 0;
}

.acp-page-title-text {
  position: relative;
  line-height: 1.5;
}

.acp-page-title-text span {
  position: relative;
  z-index: 1;
  padding-right: 0.5rem;
  background-color: var(--bs-tertiary-bg);
}

.acp-page-title-text::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 55%;
  border-top: 2px solid var(--bs-primary);
}

.acp-page-subtitle {
  font-size: .8rem;
  padding-left: .5rem;
}

/* ── List filter bar (filter-bar.twig): each dropdown is as wide as its selected option
   ("All" stays narrow) rather than its longest one, and long location names stop at
   11rem — so the unfiltered row fits on one line at laptop widths ─────────────────── */
.acp-filter-bar .form-select {
  field-sizing: content;
}

.acp-filter .form-select {
  max-width: 11rem;
}

/* ── "Show all" collapse buttons (subscribers/show.twig): Bootstrap marks the button .collapsed
   while its target is closed, so the label swaps with no JS ───────────────────────── */
.acp-show-all .acp-show-all-more,
.acp-show-all.collapsed .acp-show-all-less {
  display: none;
}

.acp-show-all.collapsed .acp-show-all-more {
  display: inline;
}

/* ── Back to top (acp.twig, acp.js wireToTop): bottom centre of the content column ─── */
.acp-to-top {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  z-index: 1030;
  transform: translateX(-50%);
  opacity: 0;
  visibility: hidden; /* also out of the tab order while hidden */
  transition: opacity .2s, visibility .2s;
}

@media (min-width: 992px) {
  .acp-to-top {
    left: calc(50% + var(--acp-sidebar-width) / 2);
  }
}

.acp-to-top.is-visible {
  opacity: 1;
  visibility: visible;
}

#main-content:focus {
  outline: none; /* focused only programmatically, by Back to top */
}

/* ── Profile drawer (profile-offcanvas.twig) ─────────────────────────────────────── */
.acp-profile-links {
  min-width: 12rem;
}

.acp-profile-switch {
  max-width: 20rem;
}

/* In-page anchors (Home's section chips, #dash-…) land below the fixed top bar, not behind it. */
.acp-body [id] {
  scroll-margin-top: calc(var(--acp-navbar-height) + 1rem);
}

/* ── Home dashboard (home.twig): acp24's plain chart cards and grey section chips ──── */
/* Plain cards keep the faint outline — BSEE borders a card in its header colour. */
.acp-dash .card {
  border-color: var(--bsee-card-outline);
}

.acp-dash .card-header {
  color: var(--acp-ink);
  font-weight: 700;
  background: transparent;
  border-bottom: 0;
  padding-top: .75rem;
}

.acp-dash-nav .nav-link {
  color: var(--acp-ink);
  font-weight: 500;
  background-color: var(--bs-secondary-bg);
  border-radius: var(--acp-radius);
  padding: .25rem .6rem;
}

/* Hover: amber chip, dark text — blue text on the grey chip was too faint in dark mode. */
.acp-dash-nav .nav-link:hover,
.acp-dash-nav .nav-link:focus-visible {
  color: #000;
  background-color: var(--bs-warning);
}

/* ── Switches inside a blue card header (chart settings "All"): white track, blue knob,
   so an on switch doesn't vanish into the header ───────────────────────────────── */
.acp-body .card-header .form-switch .form-check-input {
  border-color: rgba(255, 255, 255, .75);
  background-color: transparent;
  --bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e");
}

.acp-body .card-header .form-switch .form-check-input:checked {
  border-color: #fff;
  background-color: #fff;
  --bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%230055cc'/%3e%3c/svg%3e");
}

.acp-body .card-header .form-switch .form-check-input:focus {
  box-shadow: 0 0 0 .2rem rgba(255, 255, 255, .5);
}

/* ── Avatar initials ──────────────────────────────────────────────────────────────── */
.acp-avatar {
  width: 40px;
  height: 40px;
  font-size: .8rem;
}

/* ── Tables (DataTables shells) ───────────────────────────────────────────────────── */
.acp-body .table th {
  font-weight: 800;
}

/* Dark: rows sit on the page (acp24), with only a faint stripe. */
[data-bs-theme="dark"] .acp-body .table {
  --bs-table-bg: transparent;
  --bs-table-striped-bg: rgba(255, 255, 255, .04);
  --bs-table-hover-bg: rgba(255, 255, 255, .08);
}

/* ── Label/value detail table (.acp-detail-table: a card's "Email … Phone … " rows, label in a
   th, value in a td). At phone width the label sits over its value, so a long email or phone
   number gets the full row instead of wrapping mid-word beside the label. ───────────────── */
@media (max-width: 575.98px) {
  .acp-detail-table > tbody > tr > * {
    display: block;
    width: 100%;
  }

  .acp-detail-table > tbody > tr > th {
    padding-bottom: 0;
  }

  .acp-detail-table > tbody > tr > td {
    padding-top: .1rem;
  }
}

/* ── Two-line rows at phone width (.acp-table-stack on a list table; acp.js labels the cells).
   Line 1: # · buttons · the main column (.acp-stack-main, set by acp.js from the table's
   data-acp-stack-main; default the 3rd), truncated. Line 2: the other columns, each with its
   column name. The header row hides. DataTables paints each cell (white + an
   inset stripe/hover shadow), so the row takes over the stripe and hover here. ────────── */
@media (max-width: 575.98px) {
  table.table.acp-table-stack,
  table.table.acp-table-stack > tbody {
    display: block;
  }

  table.table.acp-table-stack > thead {
    display: none;
  }

  table.table.acp-table-stack > tbody > tr {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    column-gap: .5rem;
    row-gap: .15rem;
    padding: .4rem .25rem;
    border-bottom: var(--bs-border-width) solid var(--bs-border-color);
  }

  table.table.dataTable.acp-table-stack > tbody > tr > *,
  table.table.dataTable.acp-table-stack.table-striped > tbody > tr:nth-of-type(n) > *,
  table.table.dataTable.acp-table-stack.table-hover > tbody > tr:hover > *,
  table.table.acp-table-stack > tbody > tr > * {
    border: 0;
    padding: 0;
    box-shadow: none;
    background-color: transparent;
  }

  table.table.acp-table-stack.table-striped > tbody > tr:nth-of-type(odd) {
    background-color: var(--bs-table-striped-bg);
  }

  table.table.acp-table-stack.table-hover > tbody > tr:hover {
    background-color: var(--bs-table-hover-bg);
  }

  table.table.acp-table-stack > tbody > tr > td.acp-stack-main {
    flex: 1 1 0;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* A zero-height, full-width item between line 1's cells and the rest = the line break. */
  table.table.acp-table-stack > tbody > tr::after {
    content: "";
    order: 1;
    flex-basis: 100%;
  }

  table.table.acp-table-stack > tbody > tr > td:nth-child(n+3):not(.acp-stack-main) {
    order: 2;
    font-size: .875rem;
  }

  /* An empty cell (e.g. a check column that hides "no") drops out rather than show a bare label. */
  table.table.acp-table-stack > tbody > tr > td:empty {
    display: none;
  }

  table.table.acp-table-stack > tbody > tr > td:nth-child(n+3):not(.acp-stack-main)[data-label]:not([data-label=""])::before {
    content: attr(data-label) ": ";
    color: var(--bs-secondary-color);
  }

  /* Page buttons (Add subscriber, Back to …) get their own centred line under the title. */
  .acp-page-actions {
    width: 100%;
    justify-content: center;
  }
}

/* Row buttons never wrap their icon above the label (MD newsletters' HTML / PDF). */
.acp-icon-buttons .btn {
  white-space: nowrap;
}

/* ── Icon-only row buttons on phones (.acp-icon-buttons on a table): BSEE's button renderer
   writes "icon label" as one run of text, so the label is hidden by zeroing the button's font
   size and restoring it on the icon. The label stays as the link's text for screen readers. ── */
@media (max-width: 575.98px) {
  .acp-icon-buttons .btn {
    font-size: 0;
  }

  .acp-icon-buttons .btn > i {
    font-size: .875rem;
  }
}

/* ── List top bar below lg (phones either way up, small tablets): Add · Filter · Clear share one
   line; Search, Rows and the filters drop down in a sheet (filter-bar.twig, offcanvas-lg). ─── */
@media (max-width: 991.98px) {
  .acp-filter-bar > .btn {
    flex: 1 1 0;
    white-space: nowrap; /* the Filter count badge stays beside the word, not under it */
  }

  .acp-filter-sheet {
    --bs-offcanvas-height: auto;
  }

  .acp-filter-sheet .acp-filter-search {
    width: 100% !important;
  }

  /* A list's header Add button is desktop-only (the filter bar carries it); hide the empty line. */
  .acp-page-actions:not(:has(> :not(.d-lg-inline-flex))) {
    display: none !important;
  }
}

/* ── Keyboard shortcuts page (shortcuts.twig + shortcuts.js): a coloured icon disc per row and
   the keys as keycaps on the right ─────────────────────────────────────────────────── */
.acp-shortcut-icon {
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  font-size: .875rem;
}

.acp-shortcut-list kbd {
  display: inline-block;
  min-width: 1.75rem;
  text-align: center;
  background-color: var(--bs-secondary-bg);
  color: var(--bs-body-color);
  border: 1px solid var(--bs-border-color);
  border-bottom-width: 3px;
}

/* A side card that sticks while a long column scrolls (news item): clear the fixed top bar.
   Only from lg up, matching sticky-lg-top: below that the card is position: relative, and the
   offset would push it down over the footer. */
@media (min-width: 992px) {
  .acp-sticky-card {
    top: calc(var(--acp-navbar-height) + 1rem);
  }
}

/* Row buttons (acpActions renderer in acp.js): acp24's joined, square group at the left. */
.acp-body .table .btn {
  --bs-btn-font-weight: 500;
  --bs-btn-border-width: 1px;
}

.acp-body .table .acp-row-actions {
  white-space: nowrap;
}

.acp-body .table .acp-row-number {
  font-weight: 700;
  text-align: center;
}

/* ── Overlay behind offcanvas / modals: acp24's faint navy, not Bootstrap's grey ──── */
.acp-body .offcanvas-backdrop,
.acp-body .modal-backdrop {
  background-color: rgba(9, 30, 66, .49);
  opacity: 1;
}

/* ── Profile offcanvas drops from the top ─────────────────────────────────────────── */
.acp-body .acp-profile-offcanvas {
  bottom: auto; /* something upstream sets bottom: 0, which stretched the drawer to full height */
  height: auto;
  min-height: 50vh;
}

@media (min-width: 768px) {
  .acp-body .acp-profile-offcanvas {
    min-height: var(--acp-offcanvas-min-height-md);
  }
}

/*
 * Signed-out pages (guest.twig: login, reset, invite, error) — the acp24 look, approved on the
 * login page 2026-10-06. BSEE drives borders, radius and body text through custom properties, so
 * most of the look is token overrides; the rest are BSEE's hard-coded 0.9375rem font sizes.
 * Signed-in pages adopt these one at a time (acp-style.readme.md §Rollout).
 */
.acp-guest {
  padding-top: 0;
  --bs-body-color: var(--acp-ink);
  --bs-border-width: 1px;
  --bs-border-color: var(--acp-border-soft);
  background-color: var(--acp-tint);
}

.acp-guest .form-control,
.acp-guest .form-select,
.acp-guest .input-group-text {
  font-size: 1rem;
  padding: .375rem .75rem;
}

.acp-guest .form-select {
  padding-right: 2.25rem;
}

.acp-guest .input-group-text {
  justify-content: center;
  min-width: 2.9rem;
  color: #fff;
  background-color: var(--acp-slate);
  border-color: var(--acp-slate);
}

.acp-guest .btn {
  --bs-btn-font-size: 1rem;
  --bs-btn-font-weight: 500;
  --bs-btn-padding-y: .375rem;
}

.acp-guest-main {
  padding-top: 5rem;
  padding-bottom: 3rem;
}

.acp-guest-panel {
  max-width: 20rem;
}

/* ── Error pages: lost in space (partials/space-scene.twig) ─────────────────────────────
   A window onto space: the status code with a ringed planet for its 0, an astronaut drifting
   on a snapped tether, twinkling stars and the odd shooting star. CSS-only animation; all of
   it stops for viewers who prefer reduced motion. */
.acp-space {
  display: block;
  width: 100%;
  max-width: 20rem;
  height: auto;
  margin: 0 auto .75rem;
  font-family: inherit;
  filter: drop-shadow(0 .75rem 1.25rem rgba(11, 16, 38, .3));
}

.acp-space-digit {
  font-size: 92px;
  font-weight: 800;
  fill: #fff;
  text-anchor: middle;
}

.acp-space-far,
.acp-space-near {
  transition: transform .4s ease-out;
}

.acp-space-far {
  transform: translate(calc(var(--acp-px, 0) * -4px), calc(var(--acp-py, 0) * -4px));
}

.acp-space-near {
  transform: translate(calc(var(--acp-px, 0) * 12px), calc(var(--acp-py, 0) * 12px));
}

.acp-space-star {
  animation: acp-twinkle 3.2s ease-in-out infinite;
}

.acp-space-planet {
  animation: acp-bob 6s ease-in-out infinite;
}

.acp-space-astronaut {
  transform-box: fill-box;
  transform-origin: center;
  animation: acp-drift 10s ease-in-out infinite;
}

.acp-space-wave {
  transform-box: fill-box;
  transform-origin: left center;
  animation: acp-wave 2.4s ease-in-out infinite;
}

.acp-space-shooting {
  opacity: 0;
  animation: acp-shoot 8s linear infinite 1.5s;
}

.acp-space-tagline {
  font-style: italic;
  color: var(--bs-secondary-color);
  margin-bottom: .75rem;
}

@keyframes acp-twinkle {
  0%, 100% { opacity: 1; }
  50% { opacity: .2; }
}

@keyframes acp-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@keyframes acp-drift {
  0% { transform: translate(0, 0) rotate(-10deg); }
  50% { transform: translate(-16px, 12px) rotate(14deg); }
  100% { transform: translate(0, 0) rotate(-10deg); }
}

@keyframes acp-wave {
  0%, 100% { transform: rotate(-25deg); }
  50% { transform: rotate(20deg); }
}

@keyframes acp-shoot {
  0%, 82% { opacity: 0; transform: translate(0, 0); }
  85% { opacity: 1; }
  95%, 100% { opacity: 0; transform: translate(150px, 70px); }
}

@media (prefers-reduced-motion: reduce) {
  .acp-space * {
    animation: none !important;
  }

  .acp-space-far,
  .acp-space-near {
    transform: none;
  }

  .acp-space-shooting {
    display: none;
  }
}

/* Switch practice: staff search results scroll inside the 400px column */
.acp-switch-results {
  max-height: 16rem;
  overflow-y: auto;
}

.acp-guest-title {
  font-size: 1.75rem;
  font-weight: 500;
  color: var(--acp-ink);
}

/* ── Dashboard widgets ────────────────────────────────────────────────────────────── */
.acp-stat-value {
  font-size: clamp(1.25rem, 2.2vw, 2rem); /* shrinks before it would wrap in a narrow tile */
  font-weight: 700;
  line-height: 1.1;
  font-variant-numeric: tabular-nums; /* digits don't jitter while counting up */
}

.acp-stat-percent {
  font-size: .6em;
}

.acp-stat-label {
  font-size: .875rem;
  font-weight: 300;
}

.acp-chart {
  min-height: 280px;
}

/* Holds the chart's height while it loads; a list, table or message is only as tall as it is. */
.acp-chart.acp-chart-fit {
  min-height: 0;
}

/* Dashboard tables: the first column fills the spare width and truncates with "…". */
.acp-cell-fill {
  width: 100%;
  max-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* The note under a chart is usually empty — don't let its margin add a gap. */
[data-acp-chart-note]:empty {
  display: none;
}

/* ── Command palette (shared component, ACP providers in palette.js) ──────────────── */
/* The header's sort and "live customers" toggles drive staff providers ACP doesn't load. */
.acp-body command-palette .js-palette-sort-btn,
.acp-body command-palette .js-palette-live-btn {
  display: none;
}

/* The highlighted row takes its section's colour, a shade darker than the section bar, with
   white text throughout (the muted second line too): Menu green, Records blue, Keyboard orange. */
.acp-body command-palette .js-palette-item.active {
  --acp-palette-active: var(--bs-primary);
  background-color: color-mix(in srgb, var(--acp-palette-active) 82%, #000);
  border-color: transparent;
  color: #fff;
}

.acp-body command-palette [data-provider="acp-menu"] .js-palette-item.active {
  --acp-palette-active: var(--bs-success);
}

.acp-body command-palette [data-provider="acp-records"] .js-palette-item.active {
  --acp-palette-active: var(--bs-info);
}

.acp-body command-palette [data-provider="shortcuts"] .js-palette-item.active {
  --acp-palette-active: var(--bs-warning);
}

.acp-body command-palette .js-palette-item.active .text-body-secondary,
.acp-body command-palette .js-palette-item.active .text-muted {
  color: rgba(255, 255, 255, .85) !important;
}
