/* ═══════════════════════════════════════════════════════════════
   RUNORIUM HERAUT — Lokale stijlen
   Bouwt op het gedeelde runorium.css design system.
   Alle CSS variabelen gebruiken --runorium-* prefix.
   ═══════════════════════════════════════════════════════════════ */

/* ── Lokale aliassen (bronnen via runorium.css) ──────────────────────────────── */
:root {
    --bg:         var(--runorium-bg-dark);
    --bg-card:    var(--runorium-bg-card);
    --bg-medium:  var(--runorium-bg-medium);
    --goud:       var(--runorium-gold);
    --goud-licht: var(--runorium-gold-light);
    --tekst:      var(--runorium-text-primary);
    --tekst-zacht: var(--runorium-text-secondary);
    --tekst-gedempt: var(--runorium-text-muted);
    --rand:       rgba(212, 168, 85, 0.2);
    --rand-hover: rgba(212, 168, 85, 0.4);
    --radius:     var(--runorium-radius-md, 8px);
    --radius-lg:  var(--runorium-radius-lg, 12px);
    --schaduw:    var(--runorium-shadow-md, 0 4px 16px rgba(0,0,0,0.4));
}

body {
    background-color: var(--bg);
    color: var(--tekst);
    font-family: var(--runorium-font-body, 'Inter', sans-serif);
    min-height: 100vh;
    line-height: 1.6;
}

/* ── Site Header (identiek aan generator/slagorde) ───────────────────────────── */
.site-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    background: rgba(13, 11, 20, 0.95);
    border-bottom: 1px solid var(--rand);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(8px);
}

.site-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--goud);
    font-family: var(--runorium-font-heading, 'Space Grotesk', sans-serif);
    font-weight: 700;
    font-size: 1.1rem;
}

.site-brand:hover { color: var(--goud-licht); }
.brand-icon { width: 20px; height: 20px; }
.site-divider { color: var(--tekst-gedempt); }
.site-current { color: var(--tekst-zacht); font-size: 0.95rem; }

/* ── Gedeelde hulpklassen ────────────────────────────────────────────────────── */
.verplicht-ster { color: var(--runorium-crimson-light); margin-left: 2px; }
.optioneel      { color: var(--tekst-gedempt); font-size: 0.85em; font-weight: 400; }

.fout-melding {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    background: rgba(139, 41, 66, 0.15);
    border: 1px solid var(--runorium-crimson);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    color: #e07090;
}

.info-melding {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--tekst-zacht);
    padding: 2rem;
    text-align: center;
    justify-content: center;
}

/* ── Invoer-elementen ────────────────────────────────────────────────────────── */
input[type="text"],
input[type="number"],
input[type="date"],
input[type="email"],
textarea,
select {
    width: 100%;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--rand);
    border-radius: var(--radius);
    color: var(--tekst);
    padding: 0.6rem 0.9rem;
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--goud);
    background: rgba(255,255,255,0.08);
}

input.invoer-fout {
    border-color: var(--runorium-crimson);
}

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

select option {
    background: var(--bg-medium);
    color: var(--tekst);
}

/* ── Knoppen ─────────────────────────────────────────────────────────────────── */
.runorium-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--goud);
    color: #0d0b14;
    border: none;
    border-radius: var(--radius);
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    text-decoration: none;
}

.runorium-btn-primary:hover  { background: var(--goud-licht); }
.runorium-btn-primary:active { transform: scale(0.98); }
.runorium-btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.runorium-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    color: var(--goud);
    border: 1px solid var(--rand);
    border-radius: var(--radius);
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    text-decoration: none;
}

.runorium-btn-secondary:hover {
    border-color: var(--goud);
    background: rgba(212, 168, 85, 0.1);
}

/* ── Kaart ───────────────────────────────────────────────────────────────────── */
.runorium-card {
    background: var(--bg-card);
    border: 1px solid var(--rand);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

/* ── Laadspinner ─────────────────────────────────────────────────────────────── */
.laad-status {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 4rem 2rem;
    color: var(--tekst-zacht);
}

.laad-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--rand);
    border-top-color: var(--goud);
    border-radius: 50%;
    animation: draaien 0.8s linear infinite;
}

@keyframes draaien { to { transform: rotate(360deg); } }

/* ═══════════════════════════════════════════════════════════════
   BUILDER — index.html
   ═══════════════════════════════════════════════════════════════ */

.heraut-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.pagina-header {
    margin-bottom: 1.5rem;
}

.pagina-header h1 {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--runorium-font-heading, 'Space Grotesk', sans-serif);
    font-size: 1.8rem;
    color: var(--goud);
    margin-bottom: 0.4rem;
}

.pagina-subtitel {
    color: var(--tekst-zacht);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* Metadata sectie */
.meta-sectie {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.meta-rij { display: flex; flex-direction: column; gap: 0.4rem; }
.meta-rij label { font-size: 0.9rem; font-weight: 500; color: var(--tekst-zacht); }

/* Builder layout */
.builder-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: start;
}

@media (max-width: 900px) {
    .builder-layout { grid-template-columns: 1fr; }
}

/* Builder paneel */
.builder-paneel {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.builder-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.builder-toolbar h2 {
    font-family: var(--runorium-font-heading, 'Space Grotesk', sans-serif);
    font-size: 1.1rem;
    color: var(--tekst-zacht);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* Dropdown menu */
.veld-toevoegen-wrapper { position: relative; }

.veld-toevoegen-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    background: var(--bg-medium);
    border: 1px solid var(--rand);
    border-radius: var(--radius-lg);
    padding: 0.5rem;
    min-width: 220px;
    z-index: 50;
    box-shadow: var(--schaduw);
}

.veld-toevoegen-menu button {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    background: none;
    border: none;
    color: var(--tekst);
    padding: 0.55rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-family: inherit;
    text-align: left;
    transition: background 0.15s;
}

.veld-toevoegen-menu button:hover { background: rgba(212,168,85,0.1); color: var(--goud); }
.veld-toevoegen-menu hr { border: none; border-top: 1px solid var(--rand); margin: 0.4rem 0; }

/* Lege melding */
.lege-melding {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--tekst-gedempt);
    padding: 2rem;
    border: 2px dashed var(--rand);
    border-radius: var(--radius-lg);
    justify-content: center;
}

/* Veld-kaart */
.veld-kaart {
    background: var(--bg-card);
    border: 1px solid var(--rand);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.veld-kaart.drag-over {
    border-color: var(--goud);
    box-shadow: 0 0 0 2px rgba(212,168,85,0.3);
}

.veld-kaart.wordt-gesleept {
    opacity: 0.4;
}

.veld-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(255,255,255,0.03);
    border-bottom: 1px solid var(--rand);
}

.drag-handle {
    color: var(--tekst-gedempt);
    cursor: grab;
    display: flex;
    align-items: center;
}

.drag-handle:active { cursor: grabbing; }

.veld-type-badge {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: var(--tekst-zacht);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    flex: 1;
}

.veld-acties {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
}

.verplicht-toggle {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    color: var(--tekst-zacht);
    cursor: pointer;
}

.verplicht-toggle input[type="checkbox"] {
    width: auto;
    accent-color: var(--goud);
}

.veld-verwijder-btn {
    background: none;
    border: none;
    color: var(--tekst-gedempt);
    cursor: pointer;
    display: flex;
    padding: 4px;
    border-radius: 4px;
    transition: color 0.2s, background 0.2s;
}

.veld-verwijder-btn:hover { color: #e07090; background: rgba(139,41,66,0.15); }

.veld-body {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.veld-rij { display: flex; flex-direction: column; gap: 0.35rem; }
.veld-rij label { font-size: 0.82rem; color: var(--tekst-zacht); }

.veld-rij-split {
    flex-direction: row;
    gap: 1rem;
}

.veld-rij-split > div { flex: 1; display: flex; flex-direction: column; gap: 0.35rem; }

/* Opties lijst */
.opties-lijst { display: flex; flex-direction: column; gap: 0.4rem; }

.optie-rij {
    display: flex;
    gap: 0.4rem;
    align-items: center;
}

.optie-rij input { flex: 1; }

.optie-verwijder-btn {
    background: none;
    border: none;
    color: var(--tekst-gedempt);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    transition: color 0.2s;
}

.optie-verwijder-btn:hover { color: #e07090; }

.optie-toevoegen-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: none;
    border: 1px dashed var(--rand);
    color: var(--tekst-zacht);
    border-radius: 6px;
    padding: 0.4rem 0.75rem;
    cursor: pointer;
    font-size: 0.85rem;
    font-family: inherit;
    transition: border-color 0.2s, color 0.2s;
}

.optie-toevoegen-btn:hover { border-color: var(--goud); color: var(--goud); }

/* Publiceren sectie */
.publiceren-sectie {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-top: 0.5rem;
}

.publiceren-btn {
    width: 100%;
    justify-content: center;
    padding: 1rem;
    font-size: 1rem;
}

.publiceren-info {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.82rem;
    color: var(--tekst-gedempt);
}

/* Preview paneel */
.preview-paneel {
    position: sticky;
    top: 80px;
}

.preview-label-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    color: var(--tekst-gedempt);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.75rem;
}

.form-preview {
    min-height: 200px;
}

.preview-header { margin-bottom: 1.25rem; }

.preview-titel {
    font-family: var(--runorium-font-heading, 'Space Grotesk', sans-serif);
    font-size: 1.3rem;
    color: var(--goud);
    margin-bottom: 0.4rem;
}

.preview-beschrijving { color: var(--tekst-zacht); font-size: 0.9rem; }

.preview-leeg {
    color: var(--tekst-gedempt);
    text-align: center;
    padding: 2rem;
}

.preview-veld { margin-bottom: 1.25rem; }
.preview-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.4rem;
}

.preview-invoer input,
.preview-invoer textarea,
.preview-invoer select {
    opacity: 0.6;
    cursor: not-allowed;
}

.preview-sectie {
    border-top: 1px solid var(--rand);
    margin: 1.5rem 0 1rem;
    padding-top: 0.75rem;
}

.preview-sectie h3 {
    font-family: var(--runorium-font-heading, 'Space Grotesk', sans-serif);
    font-size: 1rem;
    color: var(--goud);
}

.keuze-optie {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    margin-bottom: 0.35rem;
    cursor: pointer;
}

.rating-preview { display: flex; gap: 4px; font-size: 1.5rem; color: var(--goud); }

.preview-submit { margin-top: 1.5rem; }

/* ── Success Modal ───────────────────────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 1.5rem;
}

.modal {
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header h2 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--runorium-font-heading, 'Space Grotesk', sans-serif);
    color: var(--goud);
    margin-bottom: 1.25rem;
}

.modal-waarschuwing {
    display: flex;
    gap: 0.75rem;
    background: rgba(139, 41, 66, 0.2);
    border: 1px solid var(--runorium-crimson);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: #e07090;
    align-items: flex-start;
}

.url-sectie {
    margin-bottom: 1.25rem;
}

.url-sectie label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: var(--tekst-zacht);
    margin-bottom: 0.5rem;
}

.url-rij {
    display: flex;
    gap: 0.5rem;
}

.url-rij input {
    font-family: monospace;
    font-size: 0.8rem;
    background: rgba(0,0,0,0.3);
}

.url-display-tekst {
    font-size: 0.78rem;
    color: var(--tekst-gedempt);
    word-break: break-all;
    margin-top: 0.35rem;
}

.modal-acties {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

/* ═══════════════════════════════════════════════════════════════
   FORMULIER — formulier.html
   ═══════════════════════════════════════════════════════════════ */

.formulier-container {
    max-width: 720px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.formulier-header {
    margin-bottom: 2rem;
}

.formulier-header h1 {
    font-family: var(--runorium-font-heading, 'Space Grotesk', sans-serif);
    font-size: 1.8rem;
    color: var(--goud);
    margin-bottom: 0.5rem;
}

.formulier-beschrijving {
    color: var(--tekst-zacht);
    margin-bottom: 1rem;
}

.privacy-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(74, 59, 107, 0.2);
    border: 1px solid rgba(107, 90, 142, 0.3);
    border-radius: 20px;
    padding: 0.35rem 0.85rem;
    font-size: 0.82rem;
    color: #a090c8;
}

/* Formuliervelden */
.formulier-veld {
    margin-bottom: 1.5rem;
}

.formulier-veld label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.4rem;
    font-size: 0.95rem;
}

.invoer-wrapper { position: relative; }

.formulier-sectie {
    border-top: 1px solid var(--rand);
    padding-top: 0.75rem;
    margin: 2rem 0 1.5rem;
}

.formulier-sectie h3 {
    font-family: var(--runorium-font-heading, 'Space Grotesk', sans-serif);
    font-size: 1.1rem;
    color: var(--goud);
}

.sectie-beschrijving { color: var(--tekst-zacht); font-size: 0.9rem; margin-top: 0.25rem; }

/* Keuze-opties (radio/checkbox) */
.radio-groep,
.checkbox-groep,
.multiselect-groep {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.radio-optie,
.checkbox-optie {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    transition: background 0.15s;
}

.radio-optie:hover,
.checkbox-optie:hover { background: rgba(255,255,255,0.04); }

.radio-optie input[type="radio"],
.checkbox-optie input[type="checkbox"] {
    width: auto;
    accent-color: var(--goud);
}

/* Rating sterrenbeoordeling */
.rating-invoer {
    display: flex;
    gap: 4px;
}

.ster-optie {
    cursor: pointer;
    position: relative;
}

.ster-optie input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.ster-icoon {
    font-size: 2rem;
    color: var(--tekst-gedempt);
    transition: color 0.15s, transform 0.1s;
    display: block;
}

.ster-optie:hover .ster-icoon,
.ster-optie:hover ~ .ster-optie .ster-icoon { color: var(--goud); }
.ster-optie input:checked ~ .ster-icoon { color: var(--goud); transform: scale(1.1); }

/* Formulier submit */
.formulier-submit {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.verzend-btn {
    width: 100%;
    justify-content: center;
    padding: 1rem;
    font-size: 1rem;
}

.verzend-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    color: var(--tekst-gedempt);
    justify-content: center;
}

/* Bevestigingspagina */
.bevestiging {
    display: flex;
    justify-content: center;
    padding: 2rem 0;
}

.bevestiging-kaart {
    max-width: 500px;
    text-align: center;
}

.bevestiging-icoon {
    font-size: 4rem;
    color: #4ade80;
    margin-bottom: 1rem;
}

.bevestiging-kaart h2 {
    font-family: var(--runorium-font-heading, 'Space Grotesk', sans-serif);
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.bevestiging-kaart p { color: var(--tekst-zacht); margin-bottom: 0.75rem; }

.bevestiging-privacy {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #a090c8;
    margin-top: 1.25rem;
    text-align: left;
}

/* ═══════════════════════════════════════════════════════════════
   VIEWER — resultaten.html
   ═══════════════════════════════════════════════════════════════ */

.viewer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.viewer-header {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.viewer-header-links { padding-top: 0.25rem; }

.terug-link {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--tekst-zacht);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.terug-link:hover { color: var(--goud); }

.viewer-header-info { flex: 1; }

.viewer-header-info h1 {
    font-family: var(--runorium-font-heading, 'Space Grotesk', sans-serif);
    font-size: 1.6rem;
    color: var(--goud);
    margin-bottom: 0.25rem;
}

.viewer-meta { font-size: 0.85rem; color: var(--tekst-gedempt); }

/* Privacy info banner */
.privacy-info {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: #a090c8;
    border-color: rgba(107, 90, 142, 0.3);
}

/* Statistieken */
.stats-balk {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.25rem;
    padding: 1.25rem 1.5rem;
}

.stat { text-align: center; }

.stat-getal {
    display: block;
    font-family: var(--runorium-font-heading, 'Space Grotesk', sans-serif);
    font-size: 2rem;
    font-weight: 700;
    color: var(--tekst);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-gelukt .stat-getal { color: #4ade80; }
.stat-mislukt .stat-getal { color: #e07090; }

.stat-label { font-size: 0.82rem; color: var(--tekst-zacht); }

/* Mislukt waarschuwing */
.mislukt-waarschuwing {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(139, 41, 66, 0.15);
    border: 1px solid var(--runorium-crimson);
    border-radius: var(--radius);
    padding: 0.85rem 1.25rem;
    color: #e07090;
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
}

/* Ontsleutel voortgang */
.ontsleutel-voortgang {
    font-size: 0.85rem;
    color: var(--tekst-gedempt);
}

/* Resultaten tabel */
.tabel-wrapper {
    overflow-x: auto;
    border: 1px solid var(--rand);
    border-radius: var(--radius-lg);
}

.resultaten-tabel {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.resultaten-tabel th {
    background: rgba(255,255,255,0.04);
    border-bottom: 1px solid var(--rand);
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--tekst-zacht);
    white-space: nowrap;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.resultaten-tabel td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    vertical-align: top;
    max-width: 300px;
    word-break: break-word;
}

.resultaten-tabel tr:last-child td { border-bottom: none; }
.resultaten-tabel tr:hover td { background: rgba(255,255,255,0.02); }

.datum-cel {
    white-space: nowrap;
    color: var(--tekst-gedempt);
    font-size: 0.82rem;
}

.rij-fout td { opacity: 0.6; }
.fout-cel { color: #e07090; font-style: italic; }
.leeg { color: var(--tekst-gedempt); }

/* Screen reader only */
.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;
}
