/* Global overrides loaded after the design token layer (verapath-variables.css).
   Component-level CSS lives in the scoped bundles via Verapath.App.styles.css.

   ─── Maintenance contract ─────────────────────────────────────────────────
   Rules in this file are BACKSTOP overrides against third-party CSS —
   Radzen (.rz-*), Syncfusion (.e-*), or user-agent defaults that the token
   system cannot reach. Each block uses `!important` and MUST be paired with a
   comment explaining the specific third-party surface it targets so the block
   can be removed when that surface is eliminated.

   Long-term goal: shrink this file. When replacing a third-party component
   with a first-party Verapath equivalent (e.g. the sidebar nav below, which
   is now served by VerapathSidebar + VerapathLinkItem), delete the
   corresponding override block in the same change.

   Do NOT add application-level styling here. Page- and component-level
   styling belongs in scoped `.razor.css` files.
   ─────────────────────────────────────────────────────────────────────────── */

/* ── Radzen dropdown / multiselect dark-mode overrides.
   Applied when an ancestor carries `.toggle-holder-dark`. Remove when
   Radzen dropdowns are replaced by VerapathDropdown / MultiSelectDropdown. */
:root:has(.toggle-holder-dark) .rz-dropdown-panel,
:root:has(.toggle-holder-dark) .rz-multiselect-panel,
:root:has(.toggle-holder-dark) .rz-dropdown-panel .rz-dropdown-items-wrapper,
:root:has(.toggle-holder-dark) .rz-multiselect-panel .rz-multiselect-items-wrapper,
:root:has(.toggle-holder-dark) .rz-dropdown-panel .rz-dropdown-items,
:root:has(.toggle-holder-dark) .rz-multiselect-panel .rz-multiselect-items,
:root:has(.toggle-holder-dark) .rz-multiselect-panel .rz-multiselect-header {
    background: #2C2C2C !important;
    color: #ECECE0 !important;
    border-color: #444444 !important;
}

:root:has(.toggle-holder-dark) .rz-dropdown-item,
:root:has(.toggle-holder-dark) .rz-multiselect-item,
:root:has(.toggle-holder-dark) .rz-dropdown-panel .rz-dropdown-label,
:root:has(.toggle-holder-dark) .rz-multiselect-panel .rz-inputtext,
:root:has(.toggle-holder-dark) .rz-multiselect-panel .rz-multiselect-filter-container,
:root:has(.toggle-holder-dark) .rz-multiselect-panel .rz-multiselect-filter-icon,
:root:has(.toggle-holder-dark) .rz-multiselect-panel .rz-multiselect-close,
:root:has(.toggle-holder-dark) .rz-multiselect-panel .rz-multiselect-close .rzi {
    background: transparent !important;
    color: #ECECE0 !important;
}

:root:has(.toggle-holder-dark) .rz-multiselect-panel .rz-inputtext,
:root:has(.toggle-holder-dark) .rz-dropdown-filter {
    background: #1E1E1E !important;
    color: #ECECE0 !important;
    border-color: #444444 !important;
}

:root:has(.toggle-holder-dark) .rz-dropdown-item:hover,
:root:has(.toggle-holder-dark) .rz-dropdown-item.rz-state-highlight,
:root:has(.toggle-holder-dark) .rz-dropdown-item.rz-state-focus,
:root:has(.toggle-holder-dark) .rz-multiselect-item:hover,
:root:has(.toggle-holder-dark) .rz-multiselect-item.rz-state-highlight,
:root:has(.toggle-holder-dark) .rz-multiselect-item.rz-state-focus {
    background: #323232 !important;
    color: #ECECE0;
}

/* ── VeraPath admin sidebar (dark rail) — backstop overrides.
   Loads after Verapath.App.styles.css and all third-party CSS, guaranteeing the
   sidebar link colors win over Syncfusion/Radzen/UA `a:visited`. Keep in sync
   with VerapathSidebar.razor.css and VerapathLinkItem.razor.css. */
.vp-sidebar--always-dark .vp-sidebar__nav a.vp-linkitem,
.vp-sidebar--always-dark .vp-sidebar__nav a.vp-linkitem:link,
.vp-sidebar--always-dark .vp-sidebar__nav a.vp-linkitem:visited,
.vp-sidebar--always-dark .vp-sidebar__nav a.vp-linkitem:hover,
.vp-sidebar--always-dark .vp-sidebar__nav a.vp-linkitem:active,
.vp-sidebar--always-dark .vp-sidebar__nav a.vp-linkitem:focus,
.vp-sidebar--always-dark .vp-sidebar__nav a.vp-linkitem:focus-visible,
.vp-sidebar--always-dark .vp-sidebar__nav a.vp-linkitem span,
.vp-sidebar--always-dark .vp-sidebar__nav a.vp-linkitem svg,
.vp-sidebar--always-dark .vp-sidebar__nav a.vp-linkitem path,
.vp-sidebar--always-dark .vp-sidebar__nav a.vp-linkitem polyline,
.vp-sidebar--always-dark .vp-sidebar__nav a.vp-linkitem line {
    color: rgba(228, 233, 228, 0.86) !important;
    -webkit-text-fill-color: rgba(228, 233, 228, 0.86) !important;
    text-decoration: none !important;
    stroke: currentColor;
}

/* Pill shape: 10px margin L/R, 10px border-radius, reserved 4px left border
   so the active state can change border-color without shifting layout. */
.vp-sidebar--always-dark .vp-sidebar__nav a.vp-linkitem {
    margin-left: 10px !important;
    margin-right: 10px !important;
    width: calc(100% - 20px) !important;
    border-radius: 10px !important;
    border-left: 4px solid transparent !important;
    box-sizing: border-box !important;
}

/* Suppress the legacy ::before stripe; the green left border is now a real
   border-left on the active anchor (see rule below). */
.vp-sidebar--always-dark .vp-sidebar__nav a.vp-linkitem.vp-linkitem--active::before {
    display: none !important;
}

.vp-sidebar--always-dark .vp-sidebar__nav a.vp-linkitem:hover,
.vp-sidebar--always-dark .vp-sidebar__nav a.vp-linkitem:focus-visible {
    background: rgba(255, 255, 255, 0.05) !important;
    color: rgba(240, 244, 240, 0.96) !important;
    -webkit-text-fill-color: rgba(240, 244, 240, 0.96) !important;
}

.vp-sidebar--always-dark .vp-sidebar__nav a.vp-linkitem.vp-linkitem--active,
.vp-sidebar--always-dark .vp-sidebar__nav a.vp-linkitem.vp-linkitem--active:link,
.vp-sidebar--always-dark .vp-sidebar__nav a.vp-linkitem.vp-linkitem--active:visited,
.vp-sidebar--always-dark .vp-sidebar__nav a.vp-linkitem.vp-linkitem--active:hover,
.vp-sidebar--always-dark .vp-sidebar__nav a.vp-linkitem.vp-linkitem--active:active,
.vp-sidebar--always-dark .vp-sidebar__nav a.vp-linkitem.vp-linkitem--active:focus,
.vp-sidebar--always-dark .vp-sidebar__nav a.vp-linkitem.vp-linkitem--active:focus-visible {
    background: rgba(163, 233, 107, 0.12) !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    border-left-color: var(--color-bright-green, #a3e96b) !important;
}

.vp-sidebar--always-dark .vp-sidebar__nav a.vp-linkitem.vp-linkitem--active .vp-linkitem__icon,
.vp-sidebar--always-dark .vp-sidebar__nav a.vp-linkitem.vp-linkitem--active .vp-linkitem__icon-shell,
.vp-sidebar--always-dark .vp-sidebar__nav a.vp-linkitem.vp-linkitem--active .vp-linkitem__icon *,
.vp-sidebar--always-dark .vp-sidebar__nav a.vp-linkitem.vp-linkitem--active .vp-linkitem__icon-shell * {
    color: #a3e96b !important;
    -webkit-text-fill-color: #a3e96b !important;
}

.vp-sidebar--always-dark .vp-linkgroup__label {
    color: rgba(255, 255, 255, 0.42) !important;
}

/* Chevron caret in collapsible section headers — match the muted gray so it
   reads as part of the label row, not a standalone green pip. */
.vp-sidebar--always-dark .vp-linkgroup__chevron {
    color: rgba(255, 255, 255, 0.42) !important;
    background: rgba(255, 255, 255, 0.04) !important;
}

.vp-sidebar--always-dark .vp-linkgroup__header:hover .vp-linkgroup__chevron {
    color: rgba(255, 255, 255, 0.75) !important;
    background: rgba(255, 255, 255, 0.08) !important;
}

/* Profile menu (Dark Mode / Admin / My Account / Log Out) — wider vertical
   breathing room between rows. The sidebar renders its menu at
   `.vp-sidebar__pm-items`, which ships with a 2px gap (too tight for the
   padded ProfileBadgeMenuItem rows). */
.vp-sidebar--always-dark .vp-sidebar__pm-items {
    gap: 10px !important;
}

/* ── VerapathNumberInput: dark-mode input surface (bug #27 finding #4) ──
   The .vp-number-field__wrapper uses color-mix(..., white) which does not
   adapt to dark mode. VerapathDropdown works correctly because it uses
   var(--vp-surface-input); applying the same token here aligns the two. */
.dark .vp-number-field__wrapper,
[data-theme="dark"] .vp-number-field__wrapper {
    background: var(--vp-surface-input);
    border-color: var(--vp-border-default);
}

/* ──────────────────────────────────────────────────────────────────────
   Dashboard dialogs — guaranteed dark-mode override.
   ──────────────────────────────────────────────────────────────────────
   Lives in site.css (loaded unconditionally on every page) instead of
   dashboard-portals.css (loaded via HeadContent, timing-dependent and
   browser-cacheable). Triggers on ANY of these dark-mode signals so it
   wins regardless of which path put the page into dark mode:
     - body.dark / body.dark-theme / body.toggle-holder-dark (theme.js)
     - <html data-theme="dark"> (App.razor bootstrap)
     - .dashboard-dialog-dark on the dialog itself (server-side CssClass)
   Specificity is intentionally extreme (html body chain + double class)
   to outrank Radzen's own dialog defaults plus any cached older rules.
──────────────────────────────────────────────────────────────────────── */

html body :where(.dashboard-dialog-dark, .dv-edit-chart-dialog--dark, .dv-settings-dialog--dark).rz-dialog,
html body.dark .rz-dialog.dashboard-dialog,
html body.dark-theme .rz-dialog.dashboard-dialog,
html body.toggle-holder-dark .rz-dialog.dashboard-dialog,
html[data-theme="dark"] body .rz-dialog.dashboard-dialog,
html[data-theme="dark"] body .rz-dialog.dv-edit-chart-dialog,
html[data-theme="dark"] body .rz-dialog.dv-settings-dialog {
    background: #2a3530 !important;
    color: rgba(255, 255, 255, 0.94) !important;
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
    border-radius: 14px !important;
    box-shadow:
        0 12px 32px rgba(0, 0, 0, 0.55),
        0 32px 64px rgba(0, 0, 0, 0.40) !important;
}

html body :where(.dashboard-dialog-dark, .dv-edit-chart-dialog--dark, .dv-settings-dialog--dark) .rz-dialog-titlebar,
html body.dark .rz-dialog.dashboard-dialog .rz-dialog-titlebar,
html body.dark-theme .rz-dialog.dashboard-dialog .rz-dialog-titlebar,
html body.toggle-holder-dark .rz-dialog.dashboard-dialog .rz-dialog-titlebar,
html[data-theme="dark"] body .rz-dialog.dashboard-dialog .rz-dialog-titlebar,
html[data-theme="dark"] body .rz-dialog.dv-edit-chart-dialog .rz-dialog-titlebar,
html[data-theme="dark"] body .rz-dialog.dv-settings-dialog .rz-dialog-titlebar {
    background: #2a3530 !important;
    color: rgba(255, 255, 255, 0.94) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.10) !important;
}

html body :where(.dashboard-dialog-dark, .dv-edit-chart-dialog--dark, .dv-settings-dialog--dark) .rz-dialog-content,
html body.dark .rz-dialog.dashboard-dialog .rz-dialog-content,
html body.dark-theme .rz-dialog.dashboard-dialog .rz-dialog-content,
html body.toggle-holder-dark .rz-dialog.dashboard-dialog .rz-dialog-content,
html[data-theme="dark"] body .rz-dialog.dashboard-dialog .rz-dialog-content,
html[data-theme="dark"] body .rz-dialog.dv-edit-chart-dialog .rz-dialog-content,
html[data-theme="dark"] body .rz-dialog.dv-settings-dialog .rz-dialog-content {
    background: #2a3530 !important;
    color: rgba(255, 255, 255, 0.92) !important;
}

html body :where(.dashboard-dialog-dark, .dv-edit-chart-dialog--dark, .dv-settings-dialog--dark) .rz-dialog-title,
html body.dark .rz-dialog.dashboard-dialog .rz-dialog-title,
html body.toggle-holder-dark .rz-dialog.dashboard-dialog .rz-dialog-title,
html[data-theme="dark"] body .rz-dialog.dashboard-dialog .rz-dialog-title {
    color: rgba(255, 255, 255, 0.96) !important;
}

html body :where(.dashboard-dialog-dark, .dv-edit-chart-dialog--dark, .dv-settings-dialog--dark) .rz-dialog-titlebar-close,
html body.dark .rz-dialog.dashboard-dialog .rz-dialog-titlebar-close,
html body.toggle-holder-dark .rz-dialog.dashboard-dialog .rz-dialog-titlebar-close {
    color: rgba(255, 255, 255, 0.62) !important;
    background: transparent !important;
}

html body :where(.dashboard-dialog-dark, .dv-edit-chart-dialog--dark, .dv-settings-dialog--dark) .rz-dialog-titlebar-close:hover,
html body.dark .rz-dialog.dashboard-dialog .rz-dialog-titlebar-close:hover {
    color: rgba(255, 255, 255, 0.95) !important;
    background: rgba(255, 255, 255, 0.08) !important;
}

/* Dialog content text inside Settings + Add Charts so they aren't dark text on dark surface */
html body :where(.dashboard-dialog-dark, .dv-settings-dialog--dark) label,
html body :where(.dashboard-dialog-dark, .dv-settings-dialog--dark) .dv-filter-label,
html body :where(.dashboard-dialog-dark, .dv-settings-dialog--dark) .dv-filter-help,
html body :where(.dashboard-dialog-dark, .dv-settings-dialog--dark) .dv-add-chart-label,
html body :where(.dashboard-dialog-dark, .dv-settings-dialog--dark) .dv-add-chart-status,
html body :where(.dashboard-dialog-dark, .dv-settings-dialog--dark) .dv-add-chart-summary {
    color: rgba(255, 255, 255, 0.78) !important;
}

html body :where(.dashboard-dialog-dark, .dv-settings-dialog--dark) .rz-textbox,
html body :where(.dashboard-dialog-dark, .dv-settings-dialog--dark) .rz-dropdown {
    background: rgba(255, 255, 255, 0.05) !important;
    color: rgba(255, 255, 255, 0.92) !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
}

html body :where(.dashboard-dialog-dark, .dv-settings-dialog--dark) .rz-textbox::placeholder {
    color: rgba(255, 255, 255, 0.42) !important;
}

/* Add Chart option cards in dark mode */
html body :where(.dashboard-dialog-dark) .dv-add-chart-option {
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: rgba(255, 255, 255, 0.90) !important;
}

html body :where(.dashboard-dialog-dark) .dv-add-chart-option:not(:disabled):hover {
    background: rgba(255, 255, 255, 0.07) !important;
    border-color: rgba(163, 233, 107, 0.45) !important;
}

html body :where(.dashboard-dialog-dark) .dv-add-chart-option--disabled {
    background: rgba(255, 255, 255, 0.025) !important;
    color: rgba(255, 255, 255, 0.42) !important;
}

/* Access summary banner inside Settings */
html body :where(.dashboard-dialog-dark, .dv-settings-dialog--dark) .dv-access-summary {
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: rgba(255, 255, 255, 0.85) !important;
}

html body :where(.dashboard-dialog-dark, .dv-settings-dialog--dark) .dv-access-user-chip {
    background: rgba(255, 255, 255, 0.06) !important;
    color: rgba(255, 255, 255, 0.90) !important;
    border: 1px solid rgba(255, 255, 255, 0.10) !important;
}

/* Fullscreen widget — Verapath SVG chart text uses var(--vp-content-text)
   which resolves to midnight outside the dark cascade. Force white so
   axis labels and titles read on the dark dialog surface. */
html body :where(.dashboard-dialog-dark) .vp-chart__title,
html body :where(.dashboard-dialog-dark) .vp-chart__axis-label,
html body :where(.dashboard-dialog-dark) .vp-chart__grid-line,
html body :where(.dashboard-dialog-dark) .vp-line-chart__legend,
html body :where(.dashboard-dialog-dark) .vp-line-chart__legend-label {
    fill: rgba(255, 255, 255, 0.92) !important;
    color: rgba(255, 255, 255, 0.92) !important;
}

html body :where(.dashboard-dialog-dark) .vp-chart__grid-line,
html body :where(.dashboard-dialog-dark) .vp-chart__axis-line {
    stroke: rgba(255, 255, 255, 0.12) !important;
}

/* The fullscreen body wrapper — make sure background reads as the
   dialog surface (not a stray light card behind the chart). */
html body :where(.dashboard-dialog-dark) .dv-fullscreen-body {
    background: transparent !important;
}

/* ──────────────────────────────────────────────────────────────────────
   Per-chart Edit drawer styling — guaranteed-load.
   ──────────────────────────────────────────────────────────────────────
   The drawer body uses an unscoped class chain (.dv-edit-chart-root +
   .dv-edit-chart-section etc.). The original styles live in
   dashboard-portals.css which loads via Dashboard.razor's HeadContent
   and can be browser-cached. Mirror them here in site.css (cache-busted
   via the asset map) so the per-widget settings panel always renders
   styled, regardless of whether the portals stylesheet is current. */

.dv-edit-chart-root {
    padding: 6px 4px 4px;
    font-family: var(--font-body, 'Season Sans', system-ui, sans-serif);
    color: var(--color-midnight, #223029);
}

.dv-edit-chart-root-dark {
    color: rgba(255, 255, 255, 0.92);
}

/* Status pill at the top of the panel */
.dv-edit-chart-status {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(163, 233, 107, 0.10);
    border: 1px solid rgba(163, 233, 107, 0.22);
    font-size: 12px;
    font-weight: 500;
    color: var(--color-midnight, #223029);
    transition: background 0.2s ease, border-color 0.2s ease;
}

.dv-edit-chart-root-dark .dv-edit-chart-status {
    background: rgba(163, 233, 107, 0.10);
    border-color: rgba(163, 233, 107, 0.22);
    color: rgba(255, 255, 255, 0.92);
}

.dv-edit-chart-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 0 3px rgba(163, 233, 107, 0.18);
}

.dv-edit-chart-status-dot--saving {
    background: var(--color-bright-green, #a3e96b);
    animation: dv-edit-chart-pulse 1s ease-in-out infinite;
}

.dv-edit-chart-status-dot--saved {
    background: var(--color-green, #0ea665);
    box-shadow: 0 0 0 3px rgba(14, 166, 101, 0.22);
}

.dv-edit-chart-status-dot--error {
    background: var(--color-red, #f9574d);
    box-shadow: 0 0 0 3px rgba(249, 87, 77, 0.22);
}

.dv-edit-chart-status-text {
    line-height: 1.4;
}

.dv-edit-chart-status-text--muted {
    color: var(--color-gray-01, #909893);
    font-weight: 500;
}

.dv-edit-chart-root-dark .dv-edit-chart-status-text--muted {
    color: rgba(255, 255, 255, 0.55);
}

@keyframes dv-edit-chart-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.92); }
}

/* Section blocks (Display, Filter overrides, Widget settings, Danger zone) */
.dv-edit-chart-section {
    padding: 16px 14px;
    margin-bottom: 14px;
    border-radius: 12px;
    background: rgba(34, 48, 41, 0.025);
    border: 1px solid rgba(34, 48, 41, 0.08);
}

/* Mobile: tighter section padding so the dropdowns inside can sit
   closer to the panel edge and the Syncfusion multi-select chips
   don't overflow at 414px. The toggle label gets a word-break +
   width cap so a long label like "Pin specific agents" doesn't
   collide with the toggle switch on its right. */
@media (max-width: 414px) {
    .dv-edit-chart-section {
        padding: 12px 10px;
    }

    .dv-edit-chart-toggle-label {
        word-break: break-word;
        max-width: calc(100% - 48px);
    }
}

.dv-edit-chart-root-dark .dv-edit-chart-section {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.08);
}

.dv-edit-chart-section--danger {
    background: rgba(249, 87, 77, 0.045);
    border-color: rgba(249, 87, 77, 0.20);
}

.dv-edit-chart-root-dark .dv-edit-chart-section--danger {
    background: rgba(249, 87, 77, 0.08);
    border-color: rgba(249, 87, 77, 0.30);
}

.dv-edit-chart-section-eyebrow {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--color-gray-01, #909893);
    margin-bottom: 12px;
}

.dv-edit-chart-root-dark .dv-edit-chart-section-eyebrow {
    color: rgba(255, 255, 255, 0.55);
}

.dv-edit-chart-section-eyebrow--danger {
    color: var(--color-red, #f9574d);
}

.dv-edit-chart-section-help {
    font-size: 12px;
    line-height: 1.55;
    color: var(--color-gray-01, #909893);
    margin: 0 0 12px;
}

.dv-edit-chart-root-dark .dv-edit-chart-section-help {
    color: rgba(255, 255, 255, 0.6);
}

/* Form rows + labels */
.dv-edit-chart-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.dv-edit-chart-row:first-child {
    margin-top: 0;
}

.dv-edit-chart-label {
    font-family: var(--font-body, 'Season Sans', system-ui, sans-serif);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-gray-01, #909893);
    line-height: 1;
}

.dv-edit-chart-root-dark .dv-edit-chart-label {
    color: rgba(255, 255, 255, 0.6);
}

/* Text input (Widget title) */
.dv-edit-chart-text {
    width: 100%;
    height: 38px;
    padding: 0 12px;
    border-radius: 8px;
    border: 1px solid rgba(34, 48, 41, 0.18);
    background: var(--color-white, #ffffff);
    color: var(--color-midnight, #223029);
    font-family: var(--font-body, 'Season Sans', system-ui, sans-serif);
    font-size: 13px;
    font-weight: 500;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    box-sizing: border-box;
}

.dv-edit-chart-text:focus {
    outline: none;
    border-color: var(--color-bright-green, #a3e96b);
    box-shadow: 0 0 0 3px rgba(163, 233, 107, 0.22);
}

.dv-edit-chart-root-dark .dv-edit-chart-text {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.92);
    border-color: rgba(255, 255, 255, 0.14);
}

.dv-edit-chart-root-dark .dv-edit-chart-text:focus {
    border-color: var(--color-bright-green, #a3e96b);
    box-shadow: 0 0 0 3px rgba(163, 233, 107, 0.30);
}

/* Number input (Page size) */
.dv-edit-chart-number {
    width: 100%;
    height: 38px;
    padding: 0 12px;
    border-radius: 8px;
    border: 1px solid rgba(34, 48, 41, 0.18);
    background: var(--color-white, #ffffff);
    color: var(--color-midnight, #223029);
    font-family: var(--font-body, 'Season Sans', system-ui, sans-serif);
    font-size: 13px;
    font-weight: 500;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    box-sizing: border-box;
}

.dv-edit-chart-number:focus {
    outline: none;
    border-color: var(--color-bright-green, #a3e96b);
    box-shadow: 0 0 0 3px rgba(163, 233, 107, 0.22);
}

.dv-edit-chart-root-dark .dv-edit-chart-number {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.92);
    border-color: rgba(255, 255, 255, 0.14);
}

.dv-edit-chart-root-dark .dv-edit-chart-number:focus {
    border-color: var(--color-bright-green, #a3e96b);
    box-shadow: 0 0 0 3px rgba(163, 233, 107, 0.30);
}

/* Toggle switch (custom date range / pin agents) */
.dv-edit-chart-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 6px 0;
    user-select: none;
    margin-top: 6px;
    position: relative;
}

.dv-edit-chart-toggle-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.dv-edit-chart-toggle-track {
    position: relative;
    width: 32px;
    height: 18px;
    border-radius: 999px;
    background: rgba(34, 48, 41, 0.20);
    transition: background 0.18s ease;
    flex-shrink: 0;
}

.dv-edit-chart-root-dark .dv-edit-chart-toggle-track {
    background: rgba(255, 255, 255, 0.18);
}

.dv-edit-chart-toggle-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--color-white, #ffffff);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.20);
    transition: transform 0.18s ease;
}

.dv-edit-chart-toggle-input:checked + .dv-edit-chart-toggle-track {
    background: var(--color-bright-green, #a3e96b);
}

.dv-edit-chart-toggle-input:checked + .dv-edit-chart-toggle-track .dv-edit-chart-toggle-thumb {
    transform: translateX(14px);
}

.dv-edit-chart-toggle-input:focus-visible + .dv-edit-chart-toggle-track {
    outline: 2px solid rgba(163, 233, 107, 0.45);
    outline-offset: 2px;
}

.dv-edit-chart-toggle-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--color-midnight, #223029);
    line-height: 1.3;
}

.dv-edit-chart-root-dark .dv-edit-chart-toggle-label {
    color: rgba(255, 255, 255, 0.92);
}

/* Danger zone Remove button */
.dv-edit-chart-remove {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 38px;
    padding: 0 14px;
    border-radius: 8px;
    border: 1px solid rgba(249, 87, 77, 0.40);
    background: transparent;
    color: var(--color-red, #f9574d);
    font-family: var(--font-body, 'Season Sans', system-ui, sans-serif);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.dv-edit-chart-remove:hover {
    background: rgba(249, 87, 77, 0.10);
    border-color: rgba(249, 87, 77, 0.65);
}

.dv-edit-chart-remove i.material-icons {
    font-size: 16px;
    line-height: 1;
}

.dv-edit-chart-remove:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(249, 87, 77, 0.30);
}

/* Make embedded Verapath dropdowns sit nicely in the row */
.dv-edit-chart-input {
    width: 100%;
}

/* Drawer overrides — give the drawer body a slightly tighter top
   padding so the status pill sits right under the title bar. */
.dv-edit-chart-drawer .vp-drawer__body {
    padding-top: 16px !important;
}

/* ──────────────────────────────────────────────────────────────────────
   API docs import wizard (used by both Admin → Update Server → API
   Templates and Admin → APIs). The picker dialog gets a definite height
   so the inner flex chain — modal body → wizard host → wizard body
   → review section → calls list — can distribute space and let the
   calls list scroll independently of the modal.
   ────────────────────────────────────────────────────────────────────── */
.vp-api-template-picker-dialog {
    --vp-modal-width: min(960px, calc(100vw - 32px));
    height: calc(100vh - 64px);
}

.vp-api-template-picker-dialog .vp-modal__body {
    padding: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.vp-api-template-picker-dialog .vp-api-docs-import-wizard {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.vp-api-template-picker-dialog .vp-api-docs-import-wizard > .vp-wizard {
    flex: 1;
    min-height: 0;
}

.vp-api-template-picker-dialog .vp-wizard__body {
    min-height: 0;
    display: flex;
    flex-direction: column;
}

/* The wizard wraps each step's content in an unstyled keyed div between
   the wizard body and the review section, so we make that wrapper a
   flex container too or the chain breaks. */
.vp-api-template-picker-dialog .vp-wizard__body > div {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.vp-api-template-picker-dialog .vp-api-docs-import-wizard__review {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

/* Calls list grows to fill the remaining wizard body, replacing the
   fixed 380px cap that used to leave whitespace below it. */
.vp-api-template-picker-dialog .vp-api-docs-import-wizard__calls {
    flex: 1;
    min-height: 0;
    max-height: none;
}

/* ── User-agent focus outline on page-title H1.
   Routes.razor declares `<FocusOnNavigate Selector="h1" />`, which
   programmatically focuses the page H1 on every routed navigation so screen
   readers announce the new page. With keyboard-initiated navigation (F5,
   Tab/Enter), the UA's `:focus-visible` heuristic then paints a black outline
   around the heading. The H1 is non-interactive, so suppress the visible ring.
   Matches the rule shipped in the default Blazor template and already present
   in Verapath.ComponentsTest/wwwroot/app.css. */
h1:focus,
h1:focus-visible {
    outline: none !important;
}
