/* Rekenpagina's (src/seo/reken.js) en de oproep bovenaan de uitlegpagina's. Aanvulling op style.css. */

/* Rekenformulier */
.calc { margin: 6px 0 26px; padding: 22px 22px 20px; background: var(--ink); color: var(--on-ink); border-radius: var(--radius); box-shadow: var(--shadow); scroll-margin-top: 84px; }
.calc__fields { display: grid; gap: 16px 22px; }
@media (min-width: 640px) {
  .calc__fields { grid-template-columns: auto minmax(0, 1fr); align-items: start; }
  .calc__field:last-child { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 4px 20px; }
  .calc__field:last-child > label:not(.calc__check) { width: 100%; }
  .calc__field:last-child .calc__check { margin: 0 0 8px; }
  .calc__field:last-child .calc__error { width: 100%; }
}
.calc__field > label:not(.calc__check) { display: block; font-size: 0.72rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--on-ink-muted); margin-bottom: 4px; }
.calc__seg { display: flex; align-items: flex-end; gap: 8px; }
.calc__seg > span { color: var(--on-ink-muted); padding-bottom: 8px; }
.calc__input { width: 100%; background: transparent; border: 0; border-bottom: 1px solid rgba(247, 243, 234, 0.35); border-radius: 0; color: var(--on-ink); font-family: var(--sans); font-size: 1.15rem; padding: 7px 2px; outline: none; }
.calc__input::placeholder { color: rgba(247, 243, 234, 0.5); font-size: 0.9rem; }
.calc__input:focus { border-bottom-color: var(--gold); }
.calc__input.is-invalid { border-bottom-color: #f0a08f; }
.calc__input--2 { width: 3.4em; text-align: center; }
.calc__input--4 { width: 4.6em; text-align: center; }
.calc__ac { position: relative; }
.calc__list { list-style: none; position: absolute; z-index: 5; left: 0; right: 0; top: 100%; margin-top: 6px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line-ink); background: var(--ink-2); box-shadow: var(--shadow); }
.calc__list li { padding: 11px 14px; cursor: pointer; display: flex; justify-content: space-between; gap: 12px; font-size: 0.95rem; }
.calc__list li span { color: var(--on-ink-muted); font-size: 0.85rem; }
.calc__list li:hover, .calc__list li[aria-selected="true"] { background: var(--ink-3); }
.calc__check { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 0.82rem; color: var(--on-ink-muted); cursor: pointer; }
.calc__check input { flex: none; width: 16px; height: 16px; accent-color: var(--gold); }
.calc__error { display: none; color: #f0a08f; font-size: 0.82rem; margin-top: 6px; }
.calc__error.visible { display: block; }
.calc__submit { display: block; width: 100%; margin-top: 20px; border: 0; cursor: pointer; font-family: var(--sans); font-size: 1.02rem; text-align: center; }
.calc__note { margin: 12px 0 0; font-size: 0.8rem; line-height: 1.5; color: var(--on-ink-muted); text-align: center; }

/* Zo werkt het */
.calc-steps { margin: 0 0 8px; padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.calc-steps h2 { font-size: 1.15rem; margin: 0 0 12px; }
.calc-steps ol { list-style: none; counter-reset: stap; display: grid; gap: 12px; }
@media (min-width: 640px) { .calc-steps ol { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; } }
.calc-steps li { counter-increment: stap; font-size: 0.92rem; line-height: 1.5; color: var(--text-light); }
.calc-steps li strong { display: block; color: var(--text); font-weight: 500; margin-bottom: 2px; }
.calc-steps li strong::before { content: counter(stap) ". "; color: var(--gold-deep); }
.seo__related h3 { font-family: var(--sans); font-size: 0.78rem; font-weight: 500; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-light); margin: 16px 0 8px; }
.seo__more { margin-top: 14px; font-size: 0.92rem; }
.seo__related--calc .seo__links a { border-color: var(--gold); }

/* Uitlegpagina: de passende berekening boven de vouw */
.seo__calc { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: -8px 0 26px; }
.seo__calc-btn { display: inline-block; background: var(--gold); color: var(--ink); padding: 12px 20px; border-radius: var(--radius); font-weight: 500; font-size: 0.98rem; }
.seo__calc-btn:hover { background: #d1b47f; text-decoration: none; }
.seo__calc-note { font-size: 0.84rem; color: var(--text-light); }

@media (max-width: 639px) {
  .seo:has(.calc) { padding-top: 22px; }
  .seo:has(.calc) h1 { font-size: 2rem; margin: 6px 0 12px; }
  .calc { padding: 18px 16px 16px; }
  .calc__fields { gap: 14px; }
  .seo__calc-btn { width: 100%; text-align: center; }
}
.calc { width: 100%; max-width: none; }

/* Paarpagina (src/seo/paren.js): beide tekens naast elkaar, en het rekenformulier onder de tekst */
.seo__facts--pair dl { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .seo__facts--pair dl { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.seo__form { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); }
.seo__form h2 { font-size: 1.3rem; margin-bottom: 8px; }
.seo__form > p { font-size: 1.02rem; margin-bottom: 16px; }
.seo__form .calc { margin-bottom: 0; }
.seo__related--calc { margin-top: 10px; }
