/* =============================================================================
   RSC Icons — design tokens
   Hand-written. Override any token from your own stylesheet to re-theme icons
   globally. Icons use currentColor by default and resolve semantic colors through
   the --rs-color-* tokens, so they stay in sync with the host theme.
   ============================================================================= */

:root {
    /* Sizes (map to RsIconSize presets) */
    --rs-icon-size-xs: 1rem;      /* 16px */
    --rs-icon-size-sm: 1.25rem;   /* 20px */
    --rs-icon-size-md: 1.5rem;    /* 24px — the Tabler design size */
    --rs-icon-size-lg: 2rem;      /* 32px */
    --rs-icon-size-xl: 2.5rem;    /* 40px */

    /* Semantic colors (map to RsIconColor presets) */
    --rs-color-primary: #6366f1;
    --rs-color-secondary: #64748b;
    --rs-color-success: #16a34a;
    --rs-color-warning: #b45309;
    --rs-color-danger: #dc2626;
    --rs-color-info: #0284c7;
    --rs-color-muted: #94a3b8;

    /* Behavior */
    --rs-icon-opacity-disabled: 0.45;
    --rs-icon-animation-duration-spin: 1s;
    --rs-icon-animation-duration-pulse: 1.4s;
    --rs-icon-button-radius: 6px;
}

/* Explicit dark theme (library convention: data-theme on the page/app root) */
:root[data-theme="dark"],
[data-theme="dark"] {
    --rs-color-primary: #818cf8;
    --rs-color-secondary: #94a3b8;
    --rs-color-success: #4ade80;
    --rs-color-warning: #fbbf24;
    --rs-color-danger: #f87171;
    --rs-color-info: #38bdf8;
    --rs-color-muted: #64748b;
}

/* Follow the operating system when no explicit theme is set */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --rs-color-primary: #818cf8;
        --rs-color-secondary: #94a3b8;
        --rs-color-success: #4ade80;
        --rs-color-warning: #fbbf24;
        --rs-color-danger: #f87171;
        --rs-color-info: #38bdf8;
        --rs-color-muted: #64748b;
    }
}
