/**
 * Backend theme primitives.
 *
 * Component SCSS consumes these custom properties exclusively. A theme can be
 * introduced by overriding this token set on the backend root without editing
 * component selectors.
 */

@use "variables" as *;

:root,
.tv-backend {
    // ── Inline SVG assets (unchanged — colour data encoded in the URI) ──
    --theme-asset-30b8f98a: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 4'%3e%3cpath stroke='%23fff' d='M0 2h4'/%3e%3c/svg%3e");
    --theme-asset-423b073e: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%237ED321' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
    --theme-asset-61ea8283: url("data:image/svg+xml,%3csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3e%3cpath stroke='rgba(255, 255, 255, 0.5)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    --theme-asset-627c2490: 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");
    --theme-asset-69131089: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' viewBox='0 0 8 8'%3e%3cpath d='M5.25 0l-4 4 4 4 1.5-1.5-2.5-2.5 2.5-2.5-1.5-1.5z'/%3e%3c/svg%3e");
    --theme-asset-9401000f: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3e%3cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e");
    --theme-asset-9ccbfc38: url("data:image/svg+xml,%3csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3e%3cpath stroke='rgba(0, 0, 0, 0.5)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    --theme-asset-c9961e94: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='none' stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/></svg>");
    --theme-asset-ec707472: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23fff' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z'/%3e%3c/svg%3e");
    --theme-asset-ee7c6aad: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' viewBox='0 0 8 8'%3e%3cpath d='M2.75 0l-1.5 1.5 2.5 2.5-2.5 2.5 1.5 1.5 4-4-4-4z'/%3e%3c/svg%3e");
    --theme-asset-f907e862: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/></svg>");
    --theme-asset-fa7be18f: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23FF1616' viewBox='-2 -2 7 7'%3e%3cpath stroke='%23FF1616' d='M0 0l3 3m0-3L0 3'/%3e%3ccircle r='.5'/%3e%3ccircle cx='3' r='.5'/%3e%3ccircle cy='3' r='.5'/%3e%3ccircle cx='3' cy='3' r='.5'/%3e%3c/svg%3E");

    // ── Channel tokens (RGB channel values for rgba()) ──
    --theme-channel-109f5c61: #{$clr-rgb};
    --theme-channel-13b49a72: 43,125,233;

    // ── Theme colour tokens (generated from SCSS map) ──
    @each $key, $value in $theme-color-light {
        --theme-color-#{$key}: #{$value};
    }

    // ── Dark‑mode reference tokens (consumed by _dark.scss) ──
    --theme-dark-primary: #{$dark-brand-primary};
    --theme-dark-primary-strong: #{$dark-brand-primary-dark};
    --theme-dark-accent: #{$dark-brand-accent};
    --theme-dark-surface: #{$dark-surface-card};
    --theme-dark-surface-raised: #{$dark-surface-raised};
    --theme-dark-text: #{$dark-text-primary};
    --theme-dark-muted: #{$dark-text-secondary};
    --theme-dark-border: #{$dark-border-default};
}

.tv-backend[data-theme="dark"] {
    color-scheme: dark;
}
