/*
 * New hex color palette overrides — loaded behind the `pv_new_hex_colors` waffle flag.
 *
 * Replaces the old teal-grey pit-viper neutral palette with a warm brown-grey palette,
 * and updates the primary brand from #16696D to #073a46.
 *
 * Two mechanisms are used:
 *   1. CSS custom property overrides at :root — covers tokens pit-viper exposes via var()
 *   2. Hardcoded selector overrides — covers values pit-viper bakes in without a token hook
 *
 * This file is intentionally temporary. Once the flag is fully rolled out, the plan is to
 * update _tokens-v2.scss in the pit-viper repo directly and delete this file.
 * See: https://github.com/turquoise-health/turquoise_site (branch DE-361-New-hex-colors)
 */

:root {
  /* ── Semantic color tokens ───────────────────────────────────── */

  /* Main brand */
  --color-background-brand: #073a46;
  --color-text-brand: #073a46;
  --color-text-interactive: #073a46;
  --color-border-brand: #073a46;
  --color-brand-secondary: #073a46;
  --color-background-brand-inverse: #0d5256;
  --color-background-brand-gradient: linear-gradient(109deg, #0d5256 0%, #01262b 100%);

  /* Text */
  --color-text-subdued: #4a4641;
  --color-text-tertiary: #6e6962;
  --color-text-tertiary-hover: #4a4641;
  --color-text-quaternary: #928c84;
  --color-text-interactive: #121313;

  --color-text-red: #E85E33;
  --color-text-warning: #A97909;
  --color-text-success: #59762E;
  --toast-success-icon-color: #59762E;

  /* Tag */
  --tag-secondary-background-color: #FDFDFC;
  --tag-red-color: #E85E33;
  --tag-red-background-color: #FDEDE8;
  --tag-orange-background-color: #FAEBC6;
  --tag-orange-color: #A97909;
  --tag-green-color: #59762E;
  --tag-green-background-color: #E0EECE;
  --tag-purple-color: #9B5EB5;
  --tag-purple-background-color: #F0DCF8;
  --tag-blue-color: #3B7ABA;
  --tag-blue-background-color: #D1E5F9;

  /* ── shape (already wired to PvPill dotVariant dots) ────────────── */
  --shape-neutral: #A89F92;
  --shape-warning: #FCB510;
  --shape-error: #FA6E42;
  --shape-success: #9DD549;
  --shape-purple: #DD8EFF;
  --shape-blue: #4D9FF2;;

  /* ── border ──────────────────────────────────────────────────── */
  --color-border-critical: #E85E33;
  --color-border-warning: #A97909;

  /* Pagination */
  --pagination-item-hover-background-color: #ECE8E2;
  --pagination-item-pressed-background-color: #D8D2CA;
  --pagination-item-color: #121313;
  --pagination-background-color: #FDFDFC;
  --pagination-item-width: 24px;
  --pagination-disabled-color: #92908F;
  --pagination-disabled-background-color: #EDEBE7;

  /* Selected page reads as a ghost/secondary button rather than a solid fill.
     These track the .pv-button-secondary tokens so the two can't drift.
     --pagination-item-active-border needs pit-viper >= 2.223.0. */
  --pagination-item-active-background-color: var(--button-secondary-background-color, #FFFFFF);
  --pagination-item-active-color: var(--button-secondary-color, #121313);
  --pagination-item-active-border: 1px solid var(--button-secondary-border-color, #E3E7EA);

  /* Border / stroke */
  --color-border: #e7e7e7;

  /* Surfaces */
  --color-background-body: #FDFDFC;
  --color-background-brand-accent: #ece8e2;
  --color-background-neutral-warm: #f8f7f1;
  --color-background-inverse: #282522;
  --color-background-accent: #F9F8F6;
  --pv-color-surface-secondary: #F9F8F6;
  --color-text-secondary-lighten-5: #E2DDD6;
  --color-background-critical: #FDEDE8;
  --color-background-success: #E0EECE;
  --color-background-warning: #FAEBC6;
  --color-background-accent-1: #F0DCF8;
  --color-background-accent-2: #D1E5F9;

  /* Tree */
  --pv-color-hover: #ECE8E2;
  --pv-color-active: #D8D2CA;

  /* ── Primary button ──────────────────────────────────────────── */
  --button-primary-background-color: #073a46;
  --button-primary-hover-background-color: #0d5256;
  --button-primary-pressed-background-color: #01262b;

  /* ── Tertiary button ─────────────────────────────────────────── */
  --button-tertiary-background-color: #4a4641;
  --button-tertiary-hover-background-color: #393632;
  --button-tertiary-pressed-background-color: #5c5852;

  /* ── Ghost / secondary / outline buttons ────────────────────── */
  --button-ghost-hover-background-color: #ece8e2;
  --button-ghost-pressed-background-color: #d8d2ca;
  --button-secondary-background-color: #FDFDFC;
  --button-secondary-border-color: #e7e7e7;
  --button-secondary-hover-background-color: #ece8e2;
  --button-secondary-pressed-background-color: #d8d2ca;
  --button-secondary-outline-border-color: #e7e7e7;
  --button-secondary-outline-hover-background-color: #ece8e2;
  --button-secondary-outline-pressed-background-color: #d8d2ca;
  --button-primary-outline-border-color: #e7e7e7;
  --button-primary-outline-hover-background-color: #ece8e2;
  --button-ai-hover-background-color: #ece8e2;
  --button-ai-pressed-background-color: #d8d2ca;
  --button-disabled-color: #92908F;
  --button-disabled-background-color: #EDEBE7;

  /* These variants ship their own disabled greys instead of reading
     --button-disabled-*, so they can only be reached via their own tokens
     (pit-viper#1000, needs >= 2.224.0). --button-link-tertiary-disabled-background-color
     is deliberately not set: upstream is already transparent, which is correct. */
  --button-icon-disabled-color: #92908F;
  --button-icon-disabled-background-color: #EDEBE7;
  --button-link-tertiary-disabled-color: #92908F;
  --button-floating-disabled-background-color: #92908F;
  --button-floating-on-dark-disabled-background-color: #EDEBE7;

  /* ── Text inputs ─────────────────────────────────────────────── */
  --text-input-border-color: #e7e7e7;
  --text-input-hover-border-color: #e7e2d9;
  --text-input-placeholder-color: #6e6962;
  --text-input-focus-border-color: #36C5BA;

  /* ── Checkbox ────────────────────────────────────────────────── */
  --checkbox-border: #e7e2d9;
  --checkbox-hover-background-color: #FDFDFC;
  --checkbox-hover-border-color: #e7e2d9;
  --checkbox-pressed-background-color: #d8d2ca;
  --checkbox-checked-background-color: #073a46;
  --checkbox-checked-border-color: #073a46;
  --checkbox-checked-hover-background-color: #0d5256;
  --checkbox-checked-hover-border-color: #0d5256;
  --checkbox-checked-pressed-background-color: #01262b;
  --checkbox-hover-background-color: #ECE8E2;

  /* ── Radio ───────────────────────────────────────────────────── */
  --radio-checked-after-background-color: #073a46;
  --radio-checked-hover-background-color: #FDFDFC;
  --radio-checked-disabled-after-background-color: #e7e2d9;
  --radio-checked-disabled-border-color: #e7e2d9;

  /* ── Toggle ──────────────────────────────────────────────────── */
  --toggle-border: 1px solid #e7e7e7;
  --toggle-hover-background-color: #ece8e2;
  --toggle-pressed-background-color: #d8d2ca;
  --toggle-disabled-color: #4a4641;
  --toggle-selected-background-color: #073a46;
  --toggle-selected-border-color: #073a46;
  --toggle-selected-hover-background-color: #0d5256;
  --toggle-selected-pressed-background-color: #01262b;
  --toggle-tertiary-background-color: #F3F1EB;

  /* ── Tabs ────────────────────────────────────────────────────── */
  --tab-list-active-text-color: #073a46;
  --tab-list-indicator-color: #073a46;
  --tab-list-border-color: #e7e7e7;
  --tab-list-indicator-inactive-color: #e7e7e7;
  --tab-list-text-color: #6e6962;
  --tab-list-hover-background-color: #ece8e2;
  --tab-list-pressed-background-color: #d8d2ca;
  --tab-list-active-text-color: #073a46;

  /* ── Tags ────────────────────────────────────────────────────── */
  --tag-background-color: #F3F1EB;
  --tag-primary-background-color: #073a46;
  --tag-highlight-color: #073a46;
  --tag-turquoise-color: #073a46;
  --tag-secondary-color: #4a4641;
  --tag-secondary-border-color: #e7e2d9;
  --tag-hover-background-color: #ece8e2;
  --tag-pressed-background-color: #d8d2ca;

  /* ── Cards ───────────────────────────────────────────────────── */
  --card-background-color: #FDFDFC;
  --card-border-color: #e7e7e7;
  --card-hover-border-color: #e7e7e7;
  --card-hover-background-color: #ece8e2;
  --card-pressed-background-color: #d8d2ca;
  --card-secondary-background-color: #FDFDFC;

  /* ── Pagination ──────────────────────────────────────────────── */
  --pagination-item-color: #121313;
  --pagination-item-hover-background-color: #ece8e2;
  --pagination-item-pressed-background-color: #d8d2ca;

  /* ── Accordion ───────────────────────────────────────────────── */
  --accordion-summary-hover-background-color: #ece8e2;
  --accordion-summary-pressed-background-color: #d8d2ca;
  --accordion-background-color: #FDFDFC;

  /* ── Popover ─────────────────────────────────────────────────── */
  --popover-list-item-hover-background-color: #ece8e2;
  --popover-list-item-pressed-background-color: #d8d2ca;

  /* ── Selectable labels ───────────────────────────────────────── */
  --selectable-label-border: 1px solid #e7e7e7;
  --selectable-label-hover-background-color: #ece8e2;
  --selectable-label-pressed-background-color: #d8d2ca;
  --selectable-label-selected-border-color: #073a46;
  --selectable-label-subdued-color: #073a46;

  /* ── Banner ──────────────────────────────────────────────────── */
  --banner-secondary-border-color: #E7E7E7;
  --banner-secondary-background-color: #FDFDFC;
  --banner-tertiary-background-color: #F3F1EB;

  /* ── Keyboard hint ───────────────────────────────────────────── */
  --kbd-color: #6e6962;

  /* ── Layout sidebar ──────────────────────────────────────────── */
  --layout-primary-icon-color: #6e6962;
  --layout-primary-sidebar-border-color: #e7e7e7;
  --layout-primary-sidebar-header-border-color: #e7e7e7;
  --layout-primary-sidebar-toggle-color: #6e6962;
  --layout-primary-subdued-color: #4a4641;

  /* ── Nav group border ────────────────────────────────────────── */
  --nav-list-group-border-open: 1px solid #e7e7e7;

  /* ── Skeleton loader / datepicker ───────────────────────────── */
  --p-skeleton-background: #F3F1EB;
  --p-datepicker-today-background: #FDFDFC;

  /* ── Nav list (light sidebar; also set in template) */
  --nav-list-text-color: #4a4641;
  --nav-list-hover-background-color: #ece8e2;
  --nav-list-hover-text-color: #073a46;
  --nav-list-active-text-color: #121313;
  --nav-list-pressed-background-color: #d8d2ca;
  --nav-list-pressed-text-color: #01262b;

  /* Counter */
  --counter-background-color: #073A46;

  /* PDF Viewer */
  --pdf-viewer-container-background: #FDFDFC;

  --selectable-label-background-color: #FDFDFC;

  --popover-list-selected-item-background-color: #ECE8E2;

  --text-input-disabled-background-color: #EDEBE7 !important;
  --text-input-disabled-text-color: #92908F;

  /* Stepper */
  --stepper-active-background-color: #B8B1A8;
  --stepper-inactive-background-color: #E2DDD6;
}
*:focus-visible {
  outline-color: #ECE8E2;
}

.pv-layout-sidebar {
  background-color: #FDFDFC;
}

/* ── Hardcoded old-palette overrides (no CSS custom property hook) ─────── */

.pv-surface-lighten-5 {
  background-color: #E2DDD6;
}

/* ── #073a46 — primary brand (hardcoded #16696d / #176f6f) ──────────── */
[data-list-style=display]::before,
.pv-toc > li[aria-current] a,
.pv-input-search[data-dropdown],
.pv-card-select > label > :last-child,
.pv-card-select > label:hover,
.pv-data-text-visualization-2 { color: #073a46; }

.pv-input-search {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%234A4641' d='m18.032 16.618 3.675 3.675a1 1 0 0 1-1.414 1.414l-3.675-3.675A8.961 8.961 0 0 1 11 20a9 9 0 0 1-9-9 9 9 0 0 1 9-9 9 9 0 0 1 9 9 8.961 8.961 0 0 1-1.968 5.618ZM18 11a7 7 0 1 0-14 0 7 7 0 0 0 14 0Z'/%3E%3C/svg%3E") !important;
}

.pv-button-ghost.pv-button-inverse:not([disabled]):hover,
.pv-button-ghost.pv-button-inverse:not([disabled]):focus-visible,
[class*=pv-button-floating],
[class*=pv-button-floating]:hover:not(:disabled),
[class*=pv-button-floating]:focus-visible:not(:disabled),
.pv-switch input[type=checkbox]:checked,
[data-collapsed] .pv-nav-list-inverse [aria-current=page],
:where(ol.pv-tab-list) [data-active] > a:before,
:where(ol.pv-tab-list) [data-complete] > a:before,
.pv-action-bar,
.pv-data-surface-visualization-2,
[data-collapsed] .pv-alpha-button:active,
.pv-tag-turquoise-inverse,
.ag-filter-apply-panel-button,
.ag-checkbox-input-wrapper.ag-checked:focus-visible:not(:disabled) { background-color: #073a46; }

.ag-theme-pv .ag-header-cell-filter-button:hover,
.ag-theme-pv .ag-filter-active,
.ag-theme-pv .ag-ltr input[class^=ag-][type=text]:not(:disabled),
.ag-checkbox-input-wrapper:focus-visible:not(:disabled) { border-color: #073a46; }

.ag-checkbox-input-wrapper {
  border: 2px solid #E7E2D9;
}

/* ── #01262b — pressed (hardcoded #02363d) ─────────────────────────── */
[class*=pv-button-floating]:active:not(:disabled),
.pv-switch input[type=checkbox]:checked:not(:disabled):active,
button.pv-tag-primary:active,
.p-datepicker-calendar-container .p-datepicker-day-selected:active,
.pv-uploadcare .uploadcare--widget__button { background-color: #01262b; }

.pv-toc > li a:hover,
.pv-toc > li a:focus-visible,
.pv-toc > li a:active,
.pv-toc > li[aria-current] a { border-color: #01262b; }

.pv-toc > li a:active,
.select2-selection--single .select2-selection__rendered,
.hierarchicaldocument_page div[data-grid-area=sidebar] .pv-textarea:read-only { color: #01262b; }

.ag-cell-range-single-cell { border-color: #01262b; }

.sidebar-layout-primary {
  --nav-list-active-background-color: #073a46;
  --nav-list-pressed-background-color: #01262b;
  --layout-primary-sidebar-toggle-color: #6e6962;
}

/* ── #ece8e2 — card-hover (hardcoded #e8f2f4) ──────────────────────── */
.pv-button-icon:hover,
.pv-button-icon:focus-visible,
[class*=pv-segmented-control] button:focus-visible:not(:disabled),
.pv-button-floating-on-dark:hover:not(:disabled),
.pv-button-floating-on-dark:focus-visible:not(:disabled),
.pv-switch input[type=checkbox]:not(:disabled):focus-visible,
.pv-toc > li a:hover,
.pv-toc > li a:focus-visible,
[class*=pv-company]:empty,
button.pv-tag-secondary:hover,
button.pv-tag-secondary:focus-visible,
.pv-card-select > input:checked + label,
.select2-results__option--highlighted { background-color: #ece8e2; }

.tq-tag-icon.active { background: #ece8e2; }

/* ── #d8d2ca — card-pressed (hardcoded #c7d8db) ───────────────────── */
.pv-button-icon:active,
[class*=pv-segmented-control] button:active:not(:disabled),
.pv-switch input[type=checkbox]:not(:disabled):active,
.pv-toc > li a:active,
button.pv-tag-secondary:active,
.p-datepicker-calendar-container .p-datepicker-day:not(.p-datepicker-day-selected):active { background-color: #d8d2ca; }
[class*=pv-segmented-control] button:hover:not(:disabled), [class*=pv-segmented-control] button:focus-visible:not(:disabled) {
    background-color: #ECE8E2;
}

/* ── #fdfdfc — surface/bg (hardcoded #f7f8f8) ─────────────────────── */
.pv-input-file,
.pv-toast-info,
.pv-table-compressed th,
.pv-table-compressed :where(th),
.pv-table-matrix-compressed :where(thead th),
.pv-table-matrix-compressed :where(thead td),
.pv-cell-hover:focus-within,
[class*=pv-alert],
.pv-layout-primary > [data-grid-area=content] > [data-grid-area=header],
.pv-layout-primary[data-collapsed] > [data-grid-area=content] > [data-grid-area=header] {
  border-bottom: none;
}

.pv-layout-sidebar > [data-grid-area=main] > :nth-child(2) {
  border-bottom: none;
  background-color: #F9F8F6;
}

.pv-notification[data-border=accent] { --bg-color: #FDFDFC; }

/* ── #282522 — dark bg (hardcoded #242626) ─────────────────────────── */
.pv-toast-dark,
.pv-hover-card:focus > [role=tooltip],
.pv-tooltip-v2-content,
.pv-tooltip[data-style=dark] .pv-tooltip-v2-content,
.pv-action-bar-container > div,
.pv-action-bar-container > ::slotted(*) { background-color: #282522; }

.pv-tooltip-v2-content[data-variant=white] {
  background-color: #FDFDFC;
}

/* ── #393632 — dark secondary (hardcoded #353938) ──────────────────── */
.select2-container--pv-dark .select2-selection,
.select2-container--pv-dark .select2-search__field { background-color: #393632; }

/* ── #4a4641 — text-secondary (hardcoded #4b595c) ──────────────────── */
[data-list-incomplete],
[data-list-incomplete]::before,
.pv-button-primary-outline:disabled,
.pv-button-secondary-outline:disabled,
.pv-radio:disabled + span,
.pv-avatar-group[data-more]:after,
.pv-breadcrumbs li,
.pv-badge-tertiary,
.pv-badge-ghost,
.select2-selection .select2-selection__rendered,
.select2-container--default .select2-selection--multiple .select2-selection__choice__display,
.p-datepicker-input-icon-container { color: #4a4641; }

/* ── #6e6962 — text-tertiary (hardcoded #6e8081) ───────────────────── */
.pv-ghost-input:hover input::placeholder,
.pv-ghost-input:hover input::-webkit-input-placeholder,
.pv-breadcrumbs li:not(:last-child):after { color: #6e6962; }

/* ── #928c84 — text-quaternary (hardcoded #89989b) ─────────────────── */
.pv-ghost-input input::placeholder,
.pv-ghost-input input::-webkit-input-placeholder,
.select2-selection .select2-selection__placeholder,
.select2-container--default .select2-selection--multiple .select2-selection__placeholder,
.select2-container--default .select2-results__option[aria-disabled=true],
input.select2-search__field::placeholder { color: #928c84; }

/* ── #e7e7e7 — stroke-light (hardcoded #e3e7ea) ───────────────────── */
:where(blockquote):not(.pv-blockquote),
.pv-button-primary-outline:disabled,
.pv-button-secondary-outline:disabled { border-color: #e7e7e7; }

.pv-toc > li a { border-inline-start-color: #e7e7e7; }
.pv-table-compressed th,
.pv-table-compressed td { border-color: #e7e7e7; }
.pv-table-compressed tr:not(:last-child) > td { border-bottom-color: #e7e7e7; }
.pv-table-matrix-compressed th { background-color: #F9F8F6;}
.pv-table-matrix-compressed :where(thead td):not(:last-of-type),
.pv-table-matrix-compressed th:first-of-type,
.pv-table-matrix-compressed tbody td:not(:last-of-type) { border-right-color: #e7e7e7; }
.pv-table-matrix-compressed tr > * { border-bottom-color: #e7e7e7; }
.pv-table-vertical-borders th:not(:last-child) { border-inline-end-color: #e7e7e7; }
.pv-card-select > label > :first-child { border-bottom-color: #e7e7e7; }
pv-figure-details details { border-block-end-color: #e7e7e7; }
pv-figure-details details:first-of-type { border-block-start-color: #e7e7e7; }
.ag-theme-pv .data-grid-cell-top-border { border-top-color: #e7e7e7; }
.ag-theme-pv .data-grid-cell-bottom-border { border-bottom-color: #e7e7e7; }
.pv-layout-sidebar > [data-grid-area=sidebar] { border-left-color: #e7e7e7; }
.pv-layout-sidebar-left > :first-child { border-right-color: #e7e7e7; }
.pv-layout-two-sidebar [data-layout=left-sidebar] { border-right-color: #e7e7e7; }
.pv-layout-two-sidebar [data-layout=right-sidebar] { border-left-color: #e7e7e7; }
.tq-tag-icon,
.tq-tag-icon.active { border-color: #e7e7e7; }

/* ── #e7e2d9 — stroke-dark (hardcoded #d2d8dc) ─────────────────────── */
.pv-avatar-group[data-more]:after { outline-color: #e7e2d9; }

/* ── #FDFDFC — surface white ────────────────────────────────────────── */
.pv-surface {
  background-color: #FDFDFC !important;
}

/* Tables */
.pv-table,
.pv-table-compressed,
.pv-table-matrix tbody th,
.pv-table-matrix-compressed tbody th {
  background-color: #FDFDFC;
}

/* Cards */
.pv-card:is(button) {
  background-color: #FDFDFC;
}

/* Popover */
.pv-popover {
  background-color: #FDFDFC;
}

/* Badge */
.pv-badge-secondary {
  background-color: #FDFDFC;
}

/* Button */
.pv-button-icon-outline,
.pv-button-icon-outline:hover,
.pv-button-icon-outline:focus-visible,
.pv-alpha-button,
[data-collapsed] .pv-alpha-button {
  background-color: #FDFDFC;
}

/* Segmented control active button */
[class*=pv-segmented-control] button[data-active] {
  background-color: #FDFDFC;
}

[class*=pv-segmented-control] button:hover:not(:disabled), [class*=pv-segmented-control] button:focus-visible:not(:disabled) {
  background-color: #ECE8E2;
}

/* Select2 */
.select2-selection--multiple,
.select2-dropdown {
  background-color: #FDFDFC;
}

/* `.ag-theme-pv` = legacy CSS-theme grids (Django/pit-viper templates).
   `.ag-root-wrapper` = the grid root present in EVERY AG grid, including the
   v33 Theming-API grids like the Analyze Vue app (`themeQuartz.withParams(...)`).
   The Theming API sets `--ag-*` on the grid root via zero-specificity `:where()`
   rules, so a `:root` value never reaches `.ag-header` (it inherits from the
   nearer grid root, not `:root`). Setting the tokens on `.ag-root-wrapper`
   (specificity 0,1,0 + !important) wins and reaches all descendants. */
pv-data-grid.ag-theme-pv,
.ag-theme-pv,
.ag-root-wrapper {
  --ag-background-color: #FDFDFC !important;
  --ag-odd-row-background-color: #FDFDFC !important;
  --ag-header-background-color: #FDFDFC !important;
  --ag-header-cell-hover-background-color: #ece8e2 !important;
  --ag-menu-background-color: #FDFDFC;
  --ag-border-color: #E7E2D9 !important;
  --ag-row-hover-color: #F8F7F1 !important;
  --ag-background-color: #FDFDFC !important;
  --ag-odd-row-background-color: #FDFDFC !important;
  --ag-data-background-color: #FDFDFC !important;
  --ag-inherited-background-color: #FDFDFC !important;
  --ag-icon-font-color-filter: #4A4641 !important;
  --ag-selected-row-background-color: #F8F7F1 !important;

  /* Filter (funnel/menu) image icon — recolor the baked-in #176f6f fill to
     #4A4641. Same SVG markup as the pit-viper theme, only the URL-encoded fill
     changed (%23176f6f → %234A4641). */
  --ag-icon-image-filter: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%234A4641' d='M4.5 8c0-.4.4-.8.8-.8h13.3c.4 0 .8.4.8.8s-.4.8-.8.8H5.3c-.4 0-.8-.4-.8-.8zm2 4c0-.4.4-.8.8-.8h9.3c.4 0 .8.4.8.8s-.4.8-.8.8H7.3c-.4 0-.8-.4-.8-.8zm2 4c0-.4.4-.8.8-.8h5.3c.4 0 .8.4.8.8s-.4.8-.8.8H9.3c-.4 0-.8-.4-.8-.8z'/%3E%3C/svg%3E") !important;
}

/* Keep AG Grid's hover and selected-row overlays inside grouped-card gutters. */
.pv-data-table-grouped-card .ag-row.ag-row-group-contracted::before {
  inset: 5px 0;
}

.pv-data-table-grouped-card .ag-row.ag-row-group-expanded::before {
  inset: 5px 0 0;
}

.ag-checkbox-input-wrapper.ag-checked {
  background-color: #073A46;
  border-color: #073A46;
}

/* Table column-sort chevrons — recolor the baked-in #02363D fill to #4A4641.
   Same SVG markup as the pit-viper theme; only the URL-encoded fills change
   (%2302363D66 → %234A464166 faded, %2302363D → %234A4641 active). */
[class*=pv-table] [data-sort] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%234A464166'%3E%3Cpath d='M6.2 14.2c.5-.5 1.2-.5 1.7 0l4.2 4.2 4.2-4.2c.5-.5 1.2-.5 1.7 0s.5 1.2 0 1.7l-5 5c-.5.5-1.2.5-1.7 0l-5-5c-.6-.5-.6-1.3-.1-1.7z'/%3E%3Cpath d='M11.2 3.2c.5-.5 1.2-.5 1.7 0l5 5c.5.5.5 1.2 0 1.7s-1.2.5-1.7 0L12 5.7 7.8 9.8c-.5.5-1.2.5-1.7 0s-.5-1.2 0-1.7l5.1-4.9z'/%3E%3C/svg%3E");
}
[class*=pv-table] [data-sort=descending] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%234A464166'%3E%3Cpath d='M6.2 14.2c.5-.5 1.2-.5 1.7 0l4.2 4.2 4.2-4.2c.5-.5 1.2-.5 1.7 0s.5 1.2 0 1.7l-5 5c-.5.5-1.2.5-1.7 0l-5-5c-.6-.5-.6-1.3-.1-1.7z' fill='%234A4641'/%3E%3Cpath d='M11.2 3.2c.5-.5 1.2-.5 1.7 0l5 5c.5.5.5 1.2 0 1.7s-1.2.5-1.7 0L12 5.7 7.8 9.8c-.5.5-1.2.5-1.7 0s-.5-1.2 0-1.7l5.1-4.9z'/%3E%3C/svg%3E");
}
[class*=pv-table] [data-sort=ascending] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%234A464166'%3E%3Cpath d='M6.2 14.2c.5-.5 1.2-.5 1.7 0l4.2 4.2 4.2-4.2c.5-.5 1.2-.5 1.7 0s.5 1.2 0 1.7l-5 5c-.5.5-1.2.5-1.7 0l-5-5c-.6-.5-.6-1.3-.1-1.7z'/%3E%3Cpath d='M11.2 3.2c.5-.5 1.2-.5 1.7 0l5 5c.5.5.5 1.2 0 1.7s-1.2.5-1.7 0L12 5.7 7.8 9.8c-.5.5-1.2.5-1.7 0s-.5-1.2 0-1.7l5.1-4.9z' fill='%234A4641'/%3E%3C/svg%3E");
}

/* Same value as --color-background-accent, kept explicit so the grid header
   stays put if that token is ever retuned. */
.ag-theme-pv .ag-header-cell {
  background-color: #F9F8F6;
}

.ag-checkbox-input-wrapper {
  background-color: #FDFDFC;
}

/* Form controls */
.pv-radio,
.pv-checkbox {
  background-color: #FDFDFC;
}

/* Inputs — browser default white, pit-viper doesn't set this explicitly */
.pv-input-text,
.pv-input-search,
.pv-input-date,
.pv-textarea,
.pv-select,
.select2-selection,
.pv-select-multiple {
  background-color: #F9F8F6 !important;
}

/* Insights Feed convo bar sits on pv-surface white and so the textarea background needs to match */
.feed-convo .pv-textarea {
  background-color: #FDFDFC !important;
}

.pv-select-multiple[data-dropdown],
.pv-input-search[data-dropdown] {
  border-color: #ECE8E2;
  color: #121313;
}

/* Card select */
.pv-card-select > label {
  background-color: #FDFDFC;
}

/* Hover card tooltip */
.pv-hover-card:hover > [role=tooltip] {
  background-color: #FDFDFC;
}

/* Select2 search field */
.select2-search--dropdown .select2-search__field {
  background-color: #FDFDFC;
}

/* Autocomplete */
.autocomplete-suggestions {
  background-color: #FDFDFC;
}

/* Disabled credential input */
.credential .pv-input-text:disabled {
  background-color: #FDFDFC;
}

/* ── #d8d2ca additions — switch/avatar/rating (hardcoded #d9dede) ─── */
.pv-switch input[type=checkbox]:not(:disabled):hover, .pv-switch input[type=checkbox]:not(:disabled):focus-visible {
  background-color: #ECE8E2;
}
.pv-switch input[type=checkbox],
.pv-avatar-group[data-more]:after { background-color: #d8d2ca; }

.pv-rating,
.pv-rating[data-rating=bar],
.pv-rating[data-rating=dot] { --background-color: #d8d2ca; }

/* ── #ccc5bc — switch disabled knob (hardcoded #c9d1d0) ──────────── */
.pv-switch input[type=checkbox]:disabled:after,
.pv-switch input[type=checkbox]:checked:disabled:after { background-color: #ccc5bc; }

/* ── #e2ddd6 — badge-tertiary (hardcoded #e0e5e4) ───────────────── */
.pv-badge-tertiary { background-color: #e2ddd6; }

/* ── #ece8e2 additions — select2 tag (hardcoded #e8ebeb) ─────────── */
.select2-container--default .select2-selection--multiple .select2-selection__choice { background-color: #ece8e2; }

/* ── #f3f1eb — segmented control track (hardcoded #f0f2f2) ──────── */
[class*=pv-segmented-control] { background-color: #f3f1eb; }

/* ── #fdfdfc additions — remaining surface/bg (hardcoded #f7f8f8) ── */
[data-collapsed] .pv-nav-list-inverse summary:hover:not([aria-current=page]) { background-color: #fdfdfc; }

/* ── #ece8e2 additions — table button hover (hardcoded #f7f8f8) ──── */
[class*=pv-table]:has(td .pv-table-button) td:has(.pv-table-button) .pv-table-button:where(:hover, :focus-visible) { background-color: #ece8e2; }

.pv-table th, .pv-table-compressed th {
  background-color: #F9F8F6;
}

.pv-table tr:hover {
  background-color: #F8F7F1 !important;
}

[class*=pv-table] thead [data-sticky-col] {
  background-color: #F9F8F6;
}


[class*=pv-table] tbody [data-sticky-col] {
  background-color: #FDFDFC;
}

[class*=pv-modal] {
  background-color: #FDFDFC;
}

/* ── #0d5256 additions — brand hover/focus (hardcoded #176f6f) ───── */
.pv-alpha-button:hover,
.pv-alpha-button:focus-visible,
.pv-alpha-button:active,
[data-collapsed] .pv-alpha-button:hover,
[data-collapsed] .pv-alpha-button:focus-visible { background-color: #0d5256; }

.pv-rating[data-rating=bar] { --icon-color: #0d5256; }

.ag-button { background-color: #073a46; }

.ag-checkbox-input-wrapper:hover:not(:disabled) { border-color: #073a46; }

.ag-checkbox-input-wrapper.ag-checked:hover:not(:disabled) { background-color: #073a46; }

.pv-layout-ama { background-image: linear-gradient(109.07deg, #0d5256 0%, #01262b 100%); }

.pdf-viewer-container {
  background-color: #F9F8F6;
}

.compliancemrf_summary .pv-circle-meter:after {
  background-color: #F3F1EB;
}

.pv-input-small.pv-input-search {
  border-radius: 4px;
}

.pv-select-button-trigger-content [class*=pv-badge] {
  background-color: #E2DDD6;
  color: #6E8081;
}

.pv-query-builder-input-wrapper {
  background-color: #F9F8F6 !important;
  border: 1px solid #E7E7E7 !important;
}

.pv-drawer {
  background-color: #F9F8F6 !important;
}

.tag-list-cell:hover {
  background-color: #F8F7F1;
}

.pv-input-text:disabled, .pv-input-text[readonly], .pv-input-search:disabled, .pv-input-search[readonly], .pv-input-date:disabled, .pv-input-date[readonly], .pv-textarea:disabled, .pv-textarea[readonly], .pv-select:disabled, .pv-select[readonly], .pv-select-multiple:disabled, .pv-select-multiple[readonly] {
  color: #92908F !important;
  background-color: #EDEBE7 !important;
}

.pv-message-content-user {
  background-color: #ECE8E2 !important;
}