/* ==========================================================
   cms-base.css
   CMS Base / Reset / Global Defaults / Theme Tokens
   ========================================================== */

/* -------------------------
   Design Tokens (Default: Dark)
   Diese Tokens sind die EINZIGE Wahrheit für Farben/Spacing im CMS.
------------------------- */
:root {
    /* Base */
    --cms-bg: #0c0c0d;
    --cms-panel-bg: #141415;
    --cms-panel-bg-2: #111112;
    --cms-surface: #101011;
    --cms-main-gap: 1.5rem;

    --cms-text: #f4f4f5;
    --cms-text-muted: rgba(244, 244, 245, 0.62);

    /* Borders */
    --cms-border-subtle: rgba(255, 255, 255, 0.08);
    --cms-border-strong: rgba(255, 255, 255, 0.14);

    /* Inputs */
    --cms-input-bg: rgba(0, 0, 0, 0.38);
    --cms-input-border: rgba(255, 255, 255, 0.10);
    --cms-input-border-focus: rgba(255, 255, 255, 0.22);
    --cms-input-text: #f4f4f5;

    /* Buttons */
    --cms-btn-bg: rgba(255, 255, 255, 0.06);
    --cms-btn-bg-hover: rgba(255, 255, 255, 0.10);
    --cms-btn-bg-pressed: rgba(255, 255, 255, 0.14);
    --cms-btn-border: rgba(255, 255, 255, 0.10);

    --cms-primary-bg: #ffffff;
    --cms-primary-text: #0b0b0c;

    /* Focus ring */
    --cms-focus-ring: rgba(255, 255, 255, 0.22);

    /* Status */
    --cms-danger: #ff453a;
    --cms-warning: #ff9f0a;
    --cms-success: #32d74b;

    /* Radii */
    --cms-radius-sm: 0.5rem;
    --cms-radius-md: 0.75rem;
    --cms-radius-pill: 999px;

    /* Spacing */
    --cms-gap: 0.75rem;

    /* Font */
    --cms-font: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji",
        "Segoe UI Emoji", "Segoe UI Symbol";
}

/* Light Theme */
[data-theme="light"] {
    --cms-bg: #f6f6f7;
    --cms-panel-bg: #ffffff;
    --cms-panel-bg-2: #ffffff;
    --cms-surface: #ffffff;

    --cms-text: #111114;
    --cms-text-muted: rgba(17, 17, 20, 0.62);

    --cms-border-subtle: rgba(17, 17, 20, 0.10);
    --cms-border-strong: rgba(17, 17, 20, 0.14);

    --cms-input-bg: rgba(17, 17, 20, 0.03);
    --cms-input-border: rgba(17, 17, 20, 0.10);
    --cms-input-border-focus: rgba(17, 17, 20, 0.18);
    --cms-input-text: #111114;

    --cms-btn-bg: rgba(17, 17, 20, 0.05);
    --cms-btn-bg-hover: rgba(17, 17, 20, 0.08);
    --cms-btn-bg-pressed: rgba(17, 17, 20, 0.12);
    --cms-btn-border: rgba(17, 17, 20, 0.10);

    --cms-primary-bg: #111114;
    --cms-primary-text: #ffffff;

    --cms-focus-ring: rgba(17, 17, 20, 0.22);
}

/* -------------------------
   Global Reset-ish
------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    font-family: var(--cms-font);
    background: var(--cms-bg);
    color: var(--cms-text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Default text selection allowed */
body,
.cms-root {
    user-select: text;
}

/* Links */
a {
    color: inherit;
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

/* Headings */
h1, h2, h3, h4 {
    margin: 0 0 0.75rem 0;
    font-weight: 650;
    letter-spacing: 0.01em;
}

/* Code */
code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.92em;
    padding: 0.1em 0.35em;
    border-radius: 0.35rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--cms-border-subtle);
}

/* Media defaults */
img,
svg,
video,
canvas {
    max-width: 100%;
    height: auto;
}

/* Basic form reset */
button,
input,
select,
textarea {
    font: inherit;
}

/* Reduce motion preference */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition: none !important;
        animation: none !important;
    }
}
