/* De werkplaats voor reactievergelijkingen (templates/reacties/werkplaats.html).
 *
 * `.rv` is een opgemaakte vergelijking (sub, sup, cursieve toestand) — in het
 * voorbeeld, de suggesties en de zijbalk. De PNG-export tekent zelf op een
 * canvas en gebruikt deze stijl niet.
 */

.rv { font-family: var(--lettertype); white-space: nowrap; }
.rv sub, .rv sup { font-size: 0.72em; line-height: 0; }
.rv__toestand { font-style: italic; font-size: 0.85em; }
.rv--klein { font-size: var(--tekst-s); }

.rv-werkplaats { display: flex; flex-direction: column; gap: var(--ruimte-4); }
.rv-formulier { display: flex; flex-direction: column; gap: var(--ruimte-3); }

.rv-invoerveld { position: relative; }
.rv-invoerveld kbd {
    padding: 0.05rem 0.3rem; border: 1px solid var(--kleur-rand);
    border-bottom-width: 2px; border-radius: var(--rond-klein);
    background: var(--kleur-oppervlak); font-family: inherit; font-size: 0.95em;
}
.rv-invoer { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; font-size: var(--tekst-l); }

.rv-suggesties {
    position: absolute; left: 0; right: 0; top: 100%; z-index: 5;
    margin: 0; padding: var(--ruimte-1) 0; list-style: none;
    background: var(--kleur-oppervlak); border: 1px solid var(--kleur-rand); border-radius: var(--rond);
    box-shadow: var(--schaduw-2); max-height: 20rem; overflow: auto;
}
.rv-suggesties li {
    display: flex; align-items: baseline; gap: var(--ruimte-3);
    padding: var(--ruimte-2) var(--ruimte-3); cursor: pointer;
}
.rv-suggesties li:hover, .rv-suggesties li[aria-selected="true"] { background: var(--kleur-primair-zacht); }
.rv-suggesties__naam { margin-left: auto; font-size: var(--tekst-s); color: var(--kleur-tekst-zacht); white-space: nowrap; }

/* De regel "Bedoelde je": het voorstel om de hoofdletters te herstellen. */
.rv-suggesties__herstel { border-bottom: 1px solid var(--kleur-oppervlak-hoog); }
.rv-suggesties__vlag {
    flex: none; padding: 0.05rem 0.4rem; border-radius: var(--rond-klein);
    background: var(--kleur-primair-zacht); color: var(--kleur-op-primair-zacht);
    font-size: var(--tekst-xs); font-weight: 600;
}
/* Hoeveel er buiten de lijst vielen; geen keuze, dus geen hover. */
.rv-suggesties__meer {
    padding: var(--ruimte-1) var(--ruimte-3) var(--ruimte-2);
    font-size: var(--tekst-xs); color: var(--kleur-tekst-dof); cursor: default;
}
.rv-suggesties__meer:hover { background: none; }

.rv-voorbeeld {
    display: flex; align-items: center; min-height: 4.5rem; overflow-x: auto;
    padding: var(--ruimte-3) var(--ruimte-4); font-size: 1.75rem;
    background: var(--kleur-oppervlak-laag); border: 1px solid var(--kleur-rand); border-radius: var(--rond);
}
.rv-voorbeeld__leeg { font-size: var(--tekst-m); color: var(--kleur-tekst-dof); }

.rv-fout { margin: 0; font-size: var(--tekst-s); color: var(--kleur-fout); }

.rv-balans { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ruimte-3) var(--ruimte-5); font-size: var(--tekst-s); }
.rv-balans table { border-collapse: collapse; }
.rv-balans th, .rv-balans td { padding: 0.1rem 0.5rem; text-align: center; }
.rv-balans th { font-weight: 600; color: var(--kleur-tekst-zacht); }
.rv-balans__ok { font-weight: 600; color: var(--kleur-goed); }
.rv-balans__mis { font-weight: 600; color: var(--kleur-fout); }
.rv-balans__hint { color: var(--kleur-tekst-zacht); }

.rv-knoppen { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ruimte-1); }
.rv-knoppen__kop { margin-right: var(--ruimte-1); font-size: var(--tekst-s); color: var(--kleur-tekst-zacht); }
.rv-knoppen__scheiding { width: 1px; height: 1.5rem; margin: 0 var(--ruimte-1); background: var(--kleur-rand); }
.rv-knoppen .btn--gelukt { border-color: var(--kleur-goed); color: var(--kleur-goed); }
.rv-knoppen .btn--mislukt { border-color: var(--kleur-fout); color: var(--kleur-fout); }

.rv-meta summary { cursor: pointer; font-size: var(--tekst-s); color: var(--kleur-tekst-zacht); }
.rv-meta__rij { display: grid; grid-template-columns: 2fr 1fr; gap: var(--ruimte-3); margin-top: var(--ruimte-2); }
@media (max-width: 40rem) { .rv-meta__rij { grid-template-columns: 1fr; } }

.rv-geopend { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--ruimte-3); }
.rv-geopend__regel { margin: 0; font-size: var(--tekst-s); color: var(--kleur-tekst-zacht); }

.rv-zijbalk__kop {
    margin: var(--ruimte-4) 0 var(--ruimte-2); font-size: var(--tekst-s);
    font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
    color: var(--kleur-tekst-zacht);
}
.rv-zijbalk__kop:first-child { margin-top: 0; }

.rv-groep { border-top: 1px solid var(--kleur-oppervlak-hoog); }
.rv-groep__kop {
    display: flex; align-items: center; gap: var(--ruimte-2);
    padding: var(--ruimte-2) 0; cursor: pointer; font-size: var(--tekst-s); font-weight: 600;
}
.rv-groep__aantal { margin-left: auto; font-weight: 400; color: var(--kleur-tekst-dof); }
.rv-groep[open] .rv-groep__kop { color: var(--kleur-primair); }
.rv-groep .rv-recent { padding-bottom: var(--ruimte-2); }

.rv-recent { display: flex; flex-direction: column; gap: var(--ruimte-1); margin: 0; padding: 0; list-style: none; }
.rv-recent__link { display: block; padding: var(--ruimte-2); border-radius: var(--rond-klein); color: inherit; text-decoration: none; overflow-x: auto; }
.rv-recent__link:hover { background: var(--kleur-oppervlak-laag); text-decoration: none; }
.rv-recent__item--actief .rv-recent__link { background: var(--kleur-primair-zacht); }
.rv-recent__naam { display: block; font-size: var(--tekst-xs); color: var(--kleur-tekst-zacht); }
