/* Luc & Roel — Componenten
   Herbruikbare UI-elementen in TWBA-stijl.
   Gebruikt design-tokens.css als basis.
   Vervangt de component-definities uit base.css. */


/* === RESET === */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font);
    font-size: var(--font-size);
    line-height: var(--line-height);
    letter-spacing: var(--letter-spacing);
    color: var(--tekst);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}


/* === TYPOGRAFIE === */

h1 {
    font-size: 1.6rem;
    font-weight: var(--font-weight-bold);
    line-height: 1.2;
    letter-spacing: -0.01em;
}

h2 {
    font-size: 1.15rem;
    font-weight: var(--font-weight-medium);
    line-height: 1.3;
}

h3 {
    font-size: 1rem;
    font-weight: var(--font-weight-medium);
    line-height: 1.4;
}

p {
    margin-bottom: 0.5rem;
}

a {
    color: var(--tekst);
    text-decoration-color: var(--border-sterk);
    text-underline-offset: 2px;
    transition: color var(--transitie);
}

a:hover {
    color: var(--accent);
}


/* === KNOPPEN === */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 10px 20px;
    font-family: var(--font);
    font-size: 0.9rem;
    font-weight: var(--font-weight-medium);
    line-height: 1;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transitie);
    text-decoration: none;
}

.btn-primary {
    background: var(--accent);
    color: var(--tekst-invert);
}
.btn-primary:hover {
    background: var(--accent-hover);
}
.btn-primary:disabled {
    background: var(--border);
    color: var(--tekst-tertiair);
    cursor: not-allowed;
}

.btn-secondary {
    background: transparent;
    color: var(--tekst);
    border: 1px solid var(--border);
}
.btn-secondary:hover {
    border-color: var(--border-sterk);
    background: var(--bg-hover);
}

.btn-ghost {
    background: transparent;
    color: var(--tekst-secundair);
    padding: 10px 12px;
}
.btn-ghost:hover {
    color: var(--tekst);
}

.btn-danger {
    background: var(--rood);
    color: white;
}
.btn-danger:hover {
    background: #8B3A34;
}

.btn-success {
    background: var(--groen);
    color: white;
}
.btn-success:hover {
    background: #3D6A4A;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.8rem;
}


/* === KAARTEN === */

.card {
    background: var(--bg-kaart);
    border: 1px solid var(--border-licht);
    border-radius: var(--radius);
    padding: var(--space-lg);
}


/* === TABELLEN === */

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-licht);
}

.table th {
    font-weight: var(--font-weight-medium);
    font-size: 0.8rem;
    color: var(--tekst-tertiair);
    letter-spacing: 0.04em;
}

.table tr:last-child td {
    border-bottom: none;
}

.table tr:hover td {
    background: var(--bg-hover);
}


/* === FORMULIER ELEMENTEN === */

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="search"],
textarea,
select {
    font-family: var(--font);
    font-size: 0.9rem;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    outline: none;
    background: var(--bg-kaart);
    color: var(--tekst);
    transition: border-color var(--transitie);
    width: 100%;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--accent);
}

input::placeholder,
textarea::placeholder {
    color: var(--tekst-tertiair);
}

textarea {
    resize: vertical;
    min-height: 80px;
}

label {
    display: block;
    font-size: 0.85rem;
    font-weight: var(--font-weight-medium);
    color: var(--tekst-secundair);
    margin-bottom: var(--space-xs);
}


/* === BADGES === */

.badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 0.75rem;
    font-weight: var(--font-weight-medium);
    border-radius: var(--radius-sm);
    line-height: 1.5;
}

.badge-groen  { background: var(--groen-bg);  color: var(--groen); }
.badge-oranje { background: var(--oranje-bg); color: var(--oranje); }
.badge-rood   { background: var(--rood-bg);   color: var(--rood); }
.badge-blauw  { background: var(--blauw-bg);  color: var(--blauw); }
.badge-grijs  { background: var(--bg-hover);   color: var(--tekst-secundair); }


/* === LEGE STATES === */

.leeg-state {
    text-align: center;
    padding: var(--space-2xl) var(--space-lg);
    color: var(--tekst-tertiair);
    font-size: 0.9rem;
}


/* === LOADING === */

.laden {
    color: var(--tekst-tertiair);
    padding: var(--space-xl);
    font-size: 0.9rem;
    animation: pulse 1.5s ease infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.4s ease forwards;
}


/* === FOCUS STATES === */

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

button:focus-visible,
.btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}


/* === SCROLLBAR === */

::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-sterk);
    border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--tekst-tertiair);
}


/* === UTILITIES === */

.hidden       { display: none !important; }
.text-center  { text-align: center; }
.text-muted   { color: var(--tekst-secundair); }
.text-small   { font-size: 0.85rem; }
.mt-1 { margin-top: var(--space-sm); }
.mt-2 { margin-top: var(--space-md); }
.mt-3 { margin-top: var(--space-lg); }
.mb-1 { margin-bottom: var(--space-sm); }
.mb-2 { margin-bottom: var(--space-md); }
.gap-1 { gap: var(--space-sm); }
.gap-2 { gap: var(--space-md); }
