/* Media Control — dark theme contrast 1.1 (panel 2026-11-30.1; 1.1 = „Рекламодатели“ and the advertisers' pages)
 * Loaded last; every rule applies ONLY to the dark theme (the light theme is untouched).
 * Measured in the panel with a WCAG scan: text at least 4.5:1 against what is behind it (large text 3:1),
 * placeholders 3:1; boxes made for the light theme (white fields, light segments) get dark surfaces.
 * Every rule starts with :not(#mc-x) — an id-level weight — so it outranks the older theme rules. */

/* light fallbacks that are never defined: the uninstall command box used to be light grey with light text */
:root[data-resolved-theme="dark"]{--soft:#0f1013;--line:#2b2c33;--panel:rgba(255,255,255,.02)}

/* ---------- red buttons and the avatar: white on #ff3b3f was 3.5:1 → a deeper red, 5.2:1 ---------- */
:root[data-resolved-theme="dark"]:not(#mc-x) .btn.primary{background:#d61a2c!important;border-color:#d61a2c!important;color:#fff!important}
:root[data-resolved-theme="dark"]:not(#mc-x) .btn.primary:not(:disabled):hover{background:#b71424!important;border-color:#b71424!important;color:#fff!important}
:root[data-resolved-theme="dark"]:not(#mc-x) .btn.primary:disabled{opacity:1!important;background:#26272c!important;border-color:#33343b!important;color:#b3b6bf!important;box-shadow:none!important}
:root[data-resolved-theme="dark"]:not(#mc-x) .mc-me-av{background:#d61a2c!important;color:#fff!important}
/* white cards' own dark button ("Редакция" in the catalogues) keeps its look; its hover goes to the deeper red */
:root[data-resolved-theme="dark"]:not(#mc-x) :is(.playlist-catalog-card,.layout-gallery-card) .btn.primary{background:var(--mc-text,#f2f2f4)!important;border-color:var(--mc-text,#f2f2f4)!important;color:#141519!important}
:root[data-resolved-theme="dark"]:not(#mc-x) :is(.playlist-catalog-card,.layout-gallery-card) .btn.primary:not(:disabled):hover{background:#d61a2c!important;border-color:#d61a2c!important;color:#fff!important}

/* ---------- side menu captions (Управление / Поддръжка): 3.4:1 → 5.6:1 ---------- */
:root[data-resolved-theme="dark"]:not(#mc-x) .nav-caption{color:#878a95!important}

/* ---------- Начало ---------- */
:root[data-resolved-theme="dark"]:not(#mc-x) .step-num{color:#ff6b72!important}
:root[data-resolved-theme="dark"]:not(#mc-x) .workflow-ok{color:#34c38f!important}
:root[data-resolved-theme="dark"]:not(#mc-x) .workflow-alert{background:#2a2110!important;color:#f5c66b!important;border-color:#5c4718!important}
:root[data-resolved-theme="dark"]:not(#mc-x) :is(.sb-thumb-placeholder,.sb-file-type-icon){color:#a3a6b0!important}

/* ---------- file and folder icons (light pink squares) ---------- */
:root[data-resolved-theme="dark"]:not(#mc-x) .media-thumb{background:rgba(255,59,63,.14)!important;color:#ff8a8d!important}

/* ---------- Инсталиране ---------- */
/* steps that are not available yet stay recognisable, but readable (0.55 made the notes 3:1) */
:root[data-resolved-theme="dark"]:not(#mc-x) :is(.sbx-preview,.sbx-disabled){opacity:.8!important}
:root[data-resolved-theme="dark"]:not(#mc-x) .sbx-num{background:rgba(255,59,63,.16)!important;color:#ff8a8d!important}
:root[data-resolved-theme="dark"]:not(#mc-x) .sbx-seg{background:#1b1c21!important;border:1px solid #2b2c33}
:root[data-resolved-theme="dark"]:not(#mc-x) .sbx-seg button{color:#b9bbc4!important}
:root[data-resolved-theme="dark"]:not(#mc-x) .sbx-seg button:not(:disabled):hover{color:#fff!important;background:rgba(255,255,255,.05)!important}
:root[data-resolved-theme="dark"]:not(#mc-x) .sbx-seg button.on{background:#2b1416!important;color:#ff9a9d!important;box-shadow:inset 0 0 0 1px rgba(255,59,63,.5)!important}
:root[data-resolved-theme="dark"]:not(#mc-x) :is(.sbx-notes,.sbx-muted,.sbx-step-head p,.sbx-step p:not(.sbx-warn)){color:#a3a6b0!important}
:root[data-resolved-theme="dark"]:not(#mc-x) .sbx-warn{color:#f0a04b!important}
:root[data-resolved-theme="dark"]:not(#mc-x) .sbx-cmd{background:#0b0c0f!important;color:#e3e6ee!important;border:1px solid #2b2c33}
:root[data-resolved-theme="dark"]:not(#mc-x) .sbx-code-box{background:rgba(255,59,63,.07)!important;border-color:rgba(255,59,63,.45)!important;color:#f2f2f4!important}
:root[data-resolved-theme="dark"]:not(#mc-x) .sbx-live{background:#22190d!important;color:#f2f2f4!important}
:root[data-resolved-theme="dark"]:not(#mc-x) .sbx-live.ok{background:#0f2219!important}
:root[data-resolved-theme="dark"]:not(#mc-x) .sbx-grow:hover{background:#1b1c21!important}
:root[data-resolved-theme="dark"]:not(#mc-x) :is(.sbx-select,input[data-sbx-auto]){background:#1b1c21!important;color:#f2f2f4!important;border-color:#33343b!important}

/* ---------- fields that were white inside dark pages and windows ---------- */
:root[data-resolved-theme="dark"]:not(#mc-x) :is(.sbda-sys-row input[type=text],#sbc-archive input,#sbc-archive select,.sbu-cmd){
  background:#0f1013!important;color:#f2f2f4!important;border-color:#33343b!important}
:root[data-resolved-theme="dark"]:not(#mc-x) :is(.sbda-sys-row input,#sbc-archive input,#sbsh input)::placeholder{color:#8b8e98!important;opacity:1}
:root[data-resolved-theme="dark"]:not(#mc-x) .sbda-pill{background:#1b1c21!important;color:#e3e6ee!important}
:root[data-resolved-theme="dark"]:not(#mc-x) .sbda-pill.own{background:rgba(255,59,63,.12)!important}

/* ---------- Изпълнени графици: state badges 3.1:1 → 7:1 ---------- */
:root[data-resolved-theme="dark"]:not(#mc-x) #sbc-archive .sbq-badge.is-run{color:#4ade80!important}
:root[data-resolved-theme="dark"]:not(#mc-x) #sbc-archive .sbq-badge.is-act{color:#f5a524!important}
:root[data-resolved-theme="dark"]:not(#mc-x) #sbc-archive .sbq-badge.is-end{color:#a1a5b0!important}
:root[data-resolved-theme="dark"]:not(#mc-x) #sbc-archive .sbq-badge.is-del{color:#ff7a7e!important}

/* ---------- „Деинсталирай“: which system is chosen (the dark button rule hid it) ---------- */
:root[data-resolved-theme="dark"]:not(#mc-x) #sbu .sbu-tabs .btn[aria-pressed="true"]{background:#d61a2c!important;border-color:#d61a2c!important;color:#fff!important}

/* ---------- the bell: the chosen filter was a light-blue button ---------- */
:root[data-resolved-theme="dark"]:not(#mc-x) #mci .mci-filter .btn[aria-pressed=true]{background:rgba(255,59,63,.16)!important;color:#ff9a9d!important;border-color:rgba(255,59,63,.5)!important}

/* ---------- Съдържание: „само преглед“ note of a shared folder ---------- */
:root[data-resolved-theme="dark"]:not(#mc-x) .sbsh-note{background:rgba(245,165,36,.14)!important;color:#f5c66b!important}

/* ---------- Рекламодатели (#/advadmin) and the advertisers' pages (#/adv, #/advbuy, #/advorders) ---------- */
/* tabs: were white with light text (1.1:1); the chosen one white on #ff3b3f (3.5:1) → 5.2:1 */
:root[data-resolved-theme="dark"]:not(#mc-x) #mcadv .mcadv-tab{background:#1b1c21!important;border-color:#33343b!important;color:#e3e6ee!important}
:root[data-resolved-theme="dark"]:not(#mc-x) #mcadv .mcadv-tab:not(.on):hover{background:#24252b!important;border-color:#4a4c55!important;color:#fff!important}
:root[data-resolved-theme="dark"]:not(#mc-x) #mcadv .mcadv-tab.on{background:#d61a2c!important;border-color:#d61a2c!important;color:#fff!important}
/* surfaces that were white (sticky screen column and day row of „Заетост“, the buy bar, the statistics bar) */
:root[data-resolved-theme="dark"]:not(#mc-x) #mcadv :is(.mcadv-ghead th,.mcadv-gs,.mcadv-buybar,.mcadv-bar-sticky){background:var(--mc-card,#151518)!important}
:root[data-resolved-theme="dark"]:not(#mc-x) #mcadv .mcadv-buybar{box-shadow:0 -4px 18px rgba(0,0,0,.45)!important}
/* small grey captions made with opacity (day names, order fields, chart labels): 3.1:1 → 7:1 */
:root[data-resolved-theme="dark"]:not(#mc-x) #mcadv :is(.mcadv-gd span,.mcadv-ogrid span,.mcadv-bar span){opacity:1!important;color:#a3a6b0!important}
/* free / partly taken / full places: the light theme's dark green, amber and red were 3.4, 4.1 and 2.9:1 */
:root[data-resolved-theme="dark"]:not(#mc-x) #mcadv .mcadv-c.free{color:#4ade80!important}
:root[data-resolved-theme="dark"]:not(#mc-x) #mcadv .mcadv-c.part{color:#f5a524!important}
:root[data-resolved-theme="dark"]:not(#mc-x) #mcadv .mcadv-c.full{color:#ff7a7e!important;background:rgba(255,59,63,.12)!important}
:root[data-resolved-theme="dark"]:not(#mc-x) #mcadv :is(.mcadv-c.past,.mcadv-c.off){opacity:.6!important}
:root[data-resolved-theme="dark"]:not(#mc-x) #mcadv .mcadv-grid tr.on td{background:#2a181b!important}
:root[data-resolved-theme="dark"]:not(#mc-x) #mcadv .mcadv-reject{color:#ff7a7e!important}
:root[data-resolved-theme="dark"]:not(#mc-x) #mcadv .mcadv-due{background:rgba(115,173,255,.12)!important;color:#f2f2f4!important}
/* date pickers and checkboxes drawn by the browser in its dark look (the calendar icon was black on black) */
:root[data-resolved-theme="dark"]:not(#mc-x) :is(#mcadv,.mcadv-drawer) :is(input,select,textarea){color-scheme:dark}
