/* =====================================================================
   ReviewFlow — app-specifieke aanvullingen op het Editorial Luxe design.
   reviewflow.css blijft ONGEWIJZIGD (design system). Hier alleen kleine
   app-bits die het design system niet dekt: flash-toasts, nette defaults
   voor native form-velden, en een paar utilities.
   ===================================================================== */

/* ---- Flash toasts ---- */
.toast {
  padding: 13px 18px; border-radius: var(--rf-r-md);
  box-shadow: var(--rf-shadow-pop); font-size: var(--rf-fs-sm);
  font-weight: 600; background: #fff; border: 1px solid var(--rf-line);
  color: var(--rf-ink); max-width: 380px;
}
.toast-success { background: var(--rf-success-bg); color: var(--rf-success-ink); border-color: #CDE9D6; }
.toast-error, .toast-danger { background: #FBEDEB; color: #B23B2E; border-color: #EBCFC9; }
.toast-warning { background: var(--rf-terra-50); color: var(--rf-terra-700); border-color: #F0DCC4; }
.toast-info { background: var(--rf-info-bg); color: var(--rf-info-ink); border-color: #D5E0EE; }

/* ---- Extra badge tints not in the base design system ---- */
.badge--warn   { background: #FBF0DC; color: #8A5A00; }
.badge--danger { background: #FBEDEB; color: #B23B2E; }

/* ---- Native form controls: match the .control look so pages with plain
        inputs/selects/textareas (settings, editor) stay on-brand ---- */
.input,
.form-input,
input[type="text"], input[type="email"], input[type="password"],
input[type="number"], input[type="date"], input[type="time"],
input[type="search"], input[type="url"], input[type="tel"],
select, textarea {
  font-family: var(--rf-sans); font-size: var(--rf-fs-body); color: var(--rf-ink);
  border: 1px solid var(--rf-line); border-radius: var(--rf-r-md);
  background: var(--rf-surface-2); padding: 11px 14px; outline: none;
  width: 100%; transition: border-color .15s, box-shadow .15s, background .15s;
}
input.mono, textarea.mono, .control--mono input { font-family: var(--rf-mono); }
input:focus, select:focus, textarea:focus,
.input:focus, .form-input:focus {
  border-color: var(--rf-terra);
  box-shadow: 0 0 0 3px var(--rf-terra-tint);
  background: #fff;
}
textarea { min-height: 130px; resize: vertical; line-height: 1.55; }
select { cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23938A7E' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6 6-6'/></svg>");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 38px;
}
label { font-size: var(--rf-fs-sm); font-weight: 700; color: var(--rf-ink); }

/* checkbox / radio accent */
input[type="checkbox"], input[type="radio"] { accent-color: var(--rf-terra); width: auto; }

/* ---- Toggle switch (automation settings) ---- */
.switch { position: relative; display: inline-block; width: 46px; height: 26px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .track { position: absolute; inset: 0; background: #DCD3C7; border-radius: 999px; transition: background .15s; }
.switch .track::before { content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .15s; }
.switch input:checked + .track { background: var(--rf-terra); }
.switch input:checked + .track::before { transform: translateX(20px); }

/* ---- small helpers used across converted pages ---- */
.muted { color: var(--rf-muted); }
.mono { font-family: var(--rf-mono); }
.hidden { display: none !important; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-20 { margin-top: 20px; }
.mb-0 { margin-bottom: 0; }
.w-full { width: 100%; }
.flex { display: flex; } .items-center { align-items: center; } .justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.empty-state { text-align: center; color: var(--rf-muted); font-size: var(--rf-fs-sm); padding: 40px 20px; }

/* ---- Legacy form/alert classes still referenced by some templates + JS ---- */
.form-group { margin-bottom: 18px; }
.form-group:last-child { margin-bottom: 0; }
.form-label { display: block; font-size: var(--rf-fs-sm); font-weight: 700; color: var(--rf-ink); margin-bottom: 7px; }
.form-hint { font-size: var(--rf-fs-hint); color: var(--rf-muted); line-height: 1.45; }

.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border-radius: var(--rf-r-lg); font-size: var(--rf-fs-sm); line-height: 1.5; }
.alert .ic, .alert .ico { flex: none; margin-top: 1px; }
.alert-info { background: var(--rf-info-bg); color: var(--rf-info-ink); }
.alert-warning { background: var(--rf-terra-50); color: var(--rf-terra-700); }
.alert-error, .alert-danger { background: #FBEDEB; color: #B23B2E; }
.alert-success { background: var(--rf-success-bg); color: var(--rf-success-ink); }
.alert code { font-family: var(--rf-mono); background: rgba(0,0,0,.05); padding: 1px 6px; border-radius: 5px; }

/* ---- Template editor tabs (JS toggles .active) ---- */
.editor-tabs { display: flex; gap: 4px; padding: 8px 12px 0; border-bottom: 1px solid var(--rf-line); flex-wrap: wrap; }
.editor-tab { display: inline-flex; align-items: center; gap: 7px; padding: 11px 16px; font-size: var(--rf-fs-sm); font-weight: 700; color: var(--rf-muted); cursor: pointer; border-radius: var(--rf-r-md) var(--rf-r-md) 0 0; border: 1px solid transparent; border-bottom: none; }
.editor-tab:hover { color: var(--rf-ink); }
.editor-tab.active { color: var(--rf-terra-700); background: var(--rf-surface); border-color: var(--rf-line); position: relative; top: 1px; }
.editor-pane { display: none; }
.editor-pane.active { display: block; }

/* ---- Manuele verwerking: result summary + counts + collapsible log ---- */
.result-summary { font-size: 15.5px; line-height: 1.5; color: var(--rf-ink); margin: 0 0 18px; }
.result-summary b { font-weight: 800; }

.runcounts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.runcount { display: flex; align-items: baseline; gap: 8px; background: var(--rf-surface-2); border: 1px solid var(--rf-line); border-radius: var(--rf-r-lg); padding: 16px 18px; }
.runcount__n { font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1; color: var(--rf-ink); }
.runcount__l { font-size: 13px; color: var(--rf-muted); font-weight: 600; }
@media (max-width: 820px) { .runcounts { grid-template-columns: repeat(2, 1fr); } }

details.logbox { margin-top: 4px; }
details.logbox > summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--rf-ink); padding: 9px 14px; border: 1px solid var(--rf-line); border-radius: var(--rf-r-md); background: var(--rf-surface); }
details.logbox > summary::-webkit-details-marker { display: none; }
details.logbox > summary:hover { border-color: #DCD3C7; background: #FCFBF9; }
details.logbox[open] > summary { margin-bottom: 12px; }
details.logbox > summary .chev { color: var(--rf-muted); transition: transform .15s; }
details.logbox[open] > summary .chev { transform: rotate(180deg); }
.runlog { font-family: var(--rf-mono); font-size: 12.5px; line-height: 1.7; background: var(--rf-surface-2); border: 1px solid var(--rf-line); border-radius: var(--rf-r-md); padding: 16px 18px; max-height: 420px; overflow: auto; white-space: pre-wrap; color: var(--rf-ink-2); margin: 0; }

/* ---- Google Reviews ---- */
.rating-summary { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }
.rating-big { font-size: 54px; font-weight: 800; letter-spacing: -.03em; line-height: 1; color: var(--rf-ink); }
.stars { color: #E8A93A; font-size: 22px; letter-spacing: 2px; }
.stars .empty { color: #E6DED3; }
.rating-count { color: var(--rf-muted); font-size: var(--rf-fs-sm); margin-top: 4px; }
.review-item { display: flex; gap: 16px; padding: 20px 26px; border-top: 1px solid var(--rf-line); }
.review-av { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; flex: none; }
.review-author { font-weight: 700; color: var(--rf-ink); }
.review-text { margin-top: 8px; color: var(--rf-ink-2); line-height: 1.55; }
.review-time { color: var(--rf-muted); font-size: var(--rf-fs-hint); margin-left: 8px; }

/* =====================================================================
   LEGACY COMPAT LAYER
   Maps the pre-redesign class vocabulary onto Editorial Luxe tokens so
   pages that keep their original markup (Instellingen, login, invite,
   admin, unsubscribe, …) render on-brand without a risky rewrite of
   security-sensitive forms/JS. New pages use the design-system classes
   directly; this layer only fills the gaps.
   ===================================================================== */
.ptitle { font-size: var(--rf-fs-h1); font-weight: 800; letter-spacing: -.025em; margin: 46px 0 0; }
.ptitle-sub { color: var(--rf-muted); font-size: var(--rf-fs-lead); margin: 10px 0 30px; max-width: 720px; line-height: 1.5; }

.section { background: var(--rf-surface); border: 1px solid var(--rf-line); border-radius: var(--rf-r-xl); box-shadow: var(--rf-shadow-card); overflow: hidden; margin-bottom: 24px; }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--rf-line); font-size: var(--rf-fs-panel); font-weight: 800; letter-spacing: -.01em; }
.sec-head .ic, .sec-head .ico { color: var(--rf-terra-700); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
@media (max-width: 1100px) { .grid-2 { grid-template-columns: 1fr; } }

/* legacy button color/size variants (base .btn comes from reviewflow.css) */
.btn-primary { background: linear-gradient(160deg, var(--rf-terra), var(--rf-terra-700)); color: #fff; box-shadow: var(--rf-shadow-btn); }
.btn-primary:hover { box-shadow: 0 12px 26px -8px rgba(168,79,21,.6); }
.btn-ghost, .btn-secondary, .btn-quiet { background: var(--rf-surface); border-color: var(--rf-line); color: var(--rf-ink); font-weight: 600; }
.btn-ghost:hover, .btn-secondary:hover, .btn-quiet:hover { border-color: #DCD3C7; background: #FCFBF9; }
.btn-danger { background: var(--rf-surface); border-color: var(--rf-line); color: #B23B2E; font-weight: 600; }
.btn-sm { padding: 8px 14px; font-size: var(--rf-fs-sm); }
.btn-lg { padding: 13px 22px; font-size: var(--rf-fs-lead); }

/* legacy badges */
.badge.b-green, .b-green.badge { background: var(--rf-success-bg); color: var(--rf-success-ink); }
.badge.b-orange, .b-orange.badge { background: #FBF0DC; color: #8A5A00; }
.badge.b-red, .b-red.badge { background: #FBEDEB; color: #B23B2E; }
.badge.b-dim, .b-dim.badge { background: var(--rf-neutral-bg); color: var(--rf-neutral-ink); }
.badge.b-new, .b-new.badge { background: var(--rf-terra-50); color: var(--rf-terra-700); }

/* legacy text/util classes */
.text-dim { color: var(--rf-muted); }
.text-ok { color: var(--rf-success-ink); }
.fw-600 { font-weight: 700; color: var(--rf-ink); }
.mb-24 { margin-bottom: 24px; } .mb-16 { margin-bottom: 16px; } .mb-12 { margin-bottom: 12px; }
.mt-12 { margin-top: 12px; } .mt-24 { margin-top: 24px; }
.align-center { align-items: center; } .gap-8 { gap: 8px; }
.empty { text-align: center; color: var(--rf-muted); font-size: var(--rf-fs-sm); padding: 30px 20px; }
hr { border: none; border-top: 1px solid var(--rf-line); }

/* legacy toggle switch (settings/automation) */
.toggle { position: relative; display: inline-block; width: 46px; height: 26px; flex: none; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle .slider { position: absolute; inset: 0; background: #DCD3C7; border-radius: 999px; transition: background .15s; cursor: pointer; }
.toggle .slider::before { content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .15s; }
.toggle input:checked + .slider { background: var(--rf-terra); }
.toggle input:checked + .slider::before { transform: translateX(20px); }

/* legacy dashboard stat blocks + info banner (used by some pages) */
.banner-info { display: flex; gap: 12px; align-items: flex-start; padding: 16px 20px; border-radius: var(--rf-r-lg); background: var(--rf-info-bg); color: var(--rf-info-ink); margin-bottom: 24px; line-height: 1.5; }
.banner-info .ic, .banner-info .ico { flex: none; margin-top: 1px; }

/* details/summary (collapsed "Verzendregels", technical details) */
details.rf-collapse { border: 1px solid var(--rf-line); border-radius: var(--rf-r-xl); background: var(--rf-surface); box-shadow: var(--rf-shadow-card); overflow: hidden; }
details.rf-collapse > summary { cursor: pointer; list-style: none; padding: 20px 26px; font-weight: 800; font-size: var(--rf-fs-panel); letter-spacing: -.01em; display: flex; align-items: center; gap: 12px; }
details.rf-collapse > summary::-webkit-details-marker { display: none; }
details.rf-collapse > summary .chev { margin-left: auto; color: var(--rf-muted); transition: transform .15s; }
details.rf-collapse[open] > summary .chev { transform: rotate(180deg); }
details.rf-collapse > .rf-collapse__body { padding: 0 26px 26px; }
