/* ============================================================
   BeePromp V2 — Gedeeld Design Systeem (global.css)
   Geladen op ELKE pagina via Addons/head.php.
   Alle pagina's definiëren eigen component-css (die wint als
   die later in het document staat); deze file vult de basis aan:
   tokens, typografie, scrollbars, focus, toegankelijkheid en
   consistente component-fallbacks.
   ============================================================ */

/* ---- Design tokens (fallback; pagina's mogen overschrijven) ---- */
:root {
    --black: #050505;
    --black-light: #0a0a0a;
    --panel: #0b0b10;
    --border: rgba(255, 255, 255, 0.08);
    --border-soft: rgba(255, 255, 255, 0.05);
    --text: #f3f4f6;
    --text-dim: rgba(255, 255, 255, 0.55);
    --text-faint: rgba(255, 255, 255, 0.32);
    --blue: #2563eb;
    --blue-bright: #3b82f6;
    --blue-soft: rgba(59, 130, 246, 0.12);
    --blue-dark: #1e3a8a;
    --gray-mid: #2a2a2a;
    --green: #22c55e;
    --orange: #f59e0b;
    --red: #ef4444;
    --radius: 12px;
    --radius-sm: 8px;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
    --nav-height: 84px;
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.55);
}

/* ---- Basis-gedrag ---- */
html { scroll-behavior: smooth; }
/* Ankerlinks onder de vaste navbar laten landen */
[id] { scroll-margin-top: 96px; }
body {
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
* { -webkit-tap-highlight-color: transparent; }
::selection { background: rgba(59, 130, 246, 0.35); color: #fff; }

/* Duidelijke focus-ring voor toetsenbordnavigatie */
:focus-visible {
    outline: 2px solid var(--blue-bright);
    outline-offset: 2px;
}

/* ---- Scrollbar (WebKit + Firefox) ---- */
html {
    scrollbar-width: thin;
    scrollbar-color: rgba(59, 130, 246, 0.45) rgba(10, 10, 12, 0.6);
}
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #0a0a0e; }
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #2563eb, #3b82f6);
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover { background: #3b82f6; }

/* ---- Typografie-hulpmiddelen ---- */
.font-mono { font-family: var(--font-mono); }
.text-dim { color: var(--text-dim); }
.text-faint { color: var(--text-faint); }
.text-accent { color: var(--blue-bright); }
.text-success { color: var(--green); }
.text-warning { color: var(--orange); }
.text-danger { color: var(--red); }

/* ---- Afbeeldingen responsief ---- */
img { max-width: 100%; height: auto; }
svg { vertical-align: middle; }

/* ---- Formulier basis (fallback) ---- */
button, input, select, textarea { font-family: inherit; }
textarea { resize: vertical; }
.form-group { margin-bottom: 18px; }
.form-group label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 9px;
}
.form-control {
    width: 100%;
    padding: 13px 15px;
    background: var(--black);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.92rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-control:focus {
    outline: none;
    border-color: var(--blue-bright);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.22);
}

/* ---- Alerts (fallback) ---- */
.alert {
    padding: 13px 16px;
    font-size: 0.88rem;
    margin-bottom: 22px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.5;
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--red);
}
.alert i { margin-top: 2px; flex-shrink: 0; }
.alert-error {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-left: 3px solid var(--red);
    color: #fca5a5;
}
.alert-success {
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-left: 3px solid var(--green);
    color: #86efac;
}
.alert-info {
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.22);
    border-left: 3px solid var(--blue-bright);
    color: #bfdbfe;
}

/* ---- Knoppen (fallback) ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 26px;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    text-decoration: none;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s, border-color 0.2s;
}
.btn-primary {
    background: linear-gradient(135deg, var(--blue), var(--blue-bright));
    color: #fff;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(37, 99, 235, 0.45); }
.btn-primary:active { transform: translateY(0); }
.btn-secondary {
    background: transparent;
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.18);
}
.btn-secondary:hover { background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.35); }
.btn-ghost { background: transparent; color: var(--text-dim); }
.btn-ghost:hover { color: #fff; }
.btn-block { width: 100%; }
.btn-sm { padding: 9px 16px; font-size: 0.78rem; }

/* ---- Badges & chips (fallback) ---- */
.chip, .badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: rgba(37, 99, 235, 0.12);
    border: 1px solid rgba(37, 99, 235, 0.3);
    color: var(--blue-bright);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
}
.badge { border-radius: 999px; padding: 3px 10px; }

/* ---- Secties & headers (fallback) ---- */
.section { padding: 100px 24px; max-width: 1200px; margin: 0 auto; width: 100%; }
.section-header, .page-header { text-align: center; margin-bottom: 56px; }
.section-tag, .page-tag {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--blue-bright);
    background: rgba(37, 99, 235, 0.08);
    border: 1px solid rgba(37, 99, 235, 0.3);
    padding: 7px 18px;
    margin-bottom: 20px;
}
.section-header h1, .section-header h2, .page-header h1, .page-header h2 {
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 14px;
}
.section-header p, .page-header p { color: var(--text-dim); max-width: 520px; margin: 0 auto; line-height: 1.7; }

/* ---- Kaarten (fallback) ---- */
.card {
    background: var(--black-light);
    border: 1px solid var(--border-soft);
    padding: 30px;
    border-radius: var(--radius);
}
.card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 12px; }
.card p { color: var(--text-dim); font-size: 0.9rem; line-height: 1.7; }

/* ---- Tabel (fallback) ---- */
.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--black-light);
    border: 1px solid var(--border);
}
.table th, .table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border-soft); font-size: 0.88rem; }
.table th { text-transform: uppercase; font-size: 0.72rem; letter-spacing: 1px; color: var(--text-dim); background: rgba(255, 255, 255, 0.03); }
.table tr:hover td { background: rgba(59, 130, 246, 0.05); }

/* ---- Container ---- */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ---- Toegankelijk verbergen ---- */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* ---- Beweging respecteren (vestibulair) ---- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

/* ---- Kleine schermen ---- */
@media (max-width: 480px) {
    .section { padding: 70px 16px; }
    .section-header, .page-header { margin-bottom: 40px; }
    .btn { padding: 13px 20px; }
    .table { display: block; overflow-x: auto; white-space: nowrap; }
}
