/* ============================================================================
   zz_studio_chrome.css — DS selection idiom for the builder chrome (plan
   stage C-1b, decision C5).

   The token retune lives in assets/new_content.css (values only). This file
   carries the one rule the tokens cannot express by themselves: the design
   system keeps TWO selection idioms (docs/design_system.md §1.3) —
   orange = navigation / filters / CTA ("where I go / what I launch") and
   lime = the selected SETTING VALUE ("what is chosen"). The R3 bands painted
   every active state with the single --bc-accent; here the value-carrying
   controls (segmented controls, picked dropdown options) move to --bc-select
   (lime), while tabs, buttons, sliders, switches and the play control stay on
   the orange accent (DS §4: toggle ON track = accent, tabs = navigation).

   Scope: :is(#new-content-shell, #editor-workspace-root) (+ body-level portaled dropdowns, same as the
   R3 band they override). Loads after zz_new_content.css ("zz_s" > "zz_n"), so
   equal-specificity ties go to these rules; !important mirrors the band-2
   rules they replace. No selectors are deleted anywhere.
   ========================================================================== */

/* Segmented controls = inline value segments (DS §4 "chip volby, inline
   segment": lime border + text, lime tint background). Track stays sunken. */
:is(#new-content-shell, #editor-workspace-root) .mantine-SegmentedControl-indicator {
  background: var(--bc-select-soft) !important;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bc-select) 55%, transparent) !important;
}

:is(#new-content-shell, #editor-workspace-root) .mantine-SegmentedControl-control[data-active] .mantine-SegmentedControl-label,
:is(#new-content-shell, #editor-workspace-root) .mantine-SegmentedControl-label[data-active] {
  color: var(--bc-select) !important;
}

/* The export FPS segments are a value picker too — re-expressed on the
   selection token (they carried their own accent paint from R3). The data
   drawer's source/mode segments (Stats visual / Question card, Saved stats /
   Manual rows / Upload file) are intake NAVIGATION and keep the accent. */
:is(#new-content-shell, #editor-workspace-root) :is(#save-card, #editor-save-card) .sp-export-fps-control .mantine-SegmentedControl-indicator {
  background: var(--bc-select-soft) !important;
  border-color: color-mix(in srgb, var(--bc-select) 55%, transparent) !important;
}

:is(#new-content-shell, #editor-workspace-root) .sp-workspace-data-drawer .mantine-SegmentedControl-indicator {
  background: var(--bc-accent-soft) !important;
  box-shadow: inset 0 -2px 0 var(--bc-accent) !important;
}

:is(#new-content-shell, #editor-workspace-root) .sp-workspace-data-drawer .mantine-SegmentedControl-control[data-active] .mantine-SegmentedControl-label,
:is(#new-content-shell, #editor-workspace-root) .sp-workspace-data-drawer .mantine-SegmentedControl-label[data-active] {
  color: var(--bc-text) !important;
}

:is(#new-content-shell, #editor-workspace-root) :is(#save-card, #editor-save-card) .sp-export-fps-control .mantine-SegmentedControl-control[data-active="true"] .mantine-SegmentedControl-label,
:is(#new-content-shell, #editor-workspace-root) :is(#save-card, #editor-save-card) .sp-export-fps-control [data-segmented-control-control][data-active="true"] .mantine-SegmentedControl-label {
  color: var(--bc-select) !important;
}

/* NOT lime — view switchers are navigation (DS §7, orange): the preview
   Full/Compact segments (:is(#preview-controls, #editor-preview-controls), untouched until C-2) keep their
   R3 accent paint, and the chart-kind picker (Line / Scatter / Bar — the v6
   "view switcher chips", studio_control_map.md A3) is re-asserted on the
   accent so the generic lime rule above does not reach it. */
:is(#new-content-shell, #editor-workspace-root) :is(#cfg-chart-kind, #editor-cfg-chart-kind) .mantine-SegmentedControl-indicator {
  background: var(--bc-accent-soft) !important;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bc-accent) 45%, transparent) !important;
}

:is(#new-content-shell, #editor-workspace-root) :is(#cfg-chart-kind, #editor-cfg-chart-kind) .mantine-SegmentedControl-control[data-active] .mantine-SegmentedControl-label,
:is(#new-content-shell, #editor-workspace-root) :is(#cfg-chart-kind, #editor-cfg-chart-kind) .mantine-SegmentedControl-label[data-active] {
  color: var(--bc-accent) !important;
}

/* Picked option in a select / combobox dropdown (portaled to <body>). Hover
   keeps the neutral raised tint so the picked row reads as the value. */
body:where([data-sp-has~="studio-or-editor"]):not(#sp-s) .mantine-Combobox-option[data-combobox-selected],
body:where([data-sp-has~="studio-or-editor"]):not(#sp-s) .mantine-Select-option[data-combobox-selected] {
  background: var(--bc-select-soft) !important;
  color: var(--bc-select) !important;
}

body:where([data-sp-has~="studio-or-editor"]):not(#sp-s) .mantine-Combobox-option[data-combobox-selected] .mantine-CheckIcon-root {
  color: var(--bc-select) !important;
}

body:where([data-sp-has~="studio-or-editor"]):not(#sp-s) .mantine-Combobox-option:hover:not([data-combobox-selected]),
body:where([data-sp-has~="studio-or-editor"]):not(#sp-s) .mantine-Select-option:hover:not([data-combobox-selected]) {
  background: var(--bc-raised) !important;
  color: var(--bc-text) !important;
}

/* Accent hover (DS §1.3 "akcent hover") for the filled CTAs — brightness()
   on the R3 band lightened the amber; the DS names the hover value. */
:is(#new-content-shell, #editor-workspace-root) .mantine-Button-root[data-variant="filled"]:hover,
:is(#new-content-shell, #editor-workspace-root) .mantine-Button-root[data-variant="gradient"]:hover {
  background: var(--bc-accent-hover) !important;
  border-color: var(--bc-accent-hover) !important;
  filter: none;
}
