/* ==========================================================================
   Just Design Loops — Review-Verzoek Generator Styling
   css/review-verzoek.css

   Ondersteunt:
   1. Tactiele invoer-werkbank (zaaknaam, reviewlink, toonkeuze)
   2. Realtime WhatsApp chatbubbel preview met één-klik acties
   3. Realtime E-mail preview met losse onderwerpregel & acties
   4. Live schaalbare vector QR-code preview met SVG/PNG download
   5. Tafelkaartje / Baliedisplay afdrukopmaak (@media print)
   6. 100% token-gedreven en conform JDL Design Engineering standaarden
   ========================================================================== */

/* ---------- Container & Layout ---------- */
.review-verzoek-omgeving {
  width: 100%;
  max-width: var(--max-breedte, 1440px);
  margin: 0 auto;
  padding: 0 var(--ruimte-s);
}

.review-verzoek-hero {
  margin-bottom: var(--ruimte-l);
  padding-top: var(--ruimte-m);
}

.review-verzoek-hero .sectie-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--ruimte-xs);
  font-family: var(--font-mono);
  font-size: var(--tekst-xs);
  color: var(--p-tik-500);
  background: color-mix(in srgb, var(--p-tik-500) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--p-tik-500) 30%, transparent);
  border-radius: var(--radius-s);
  padding: var(--ruimte-xxs) var(--ruimte-xs);
  margin-bottom: var(--ruimte-xs);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.review-verzoek-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--kleur-tekst);
  margin: 0 0 var(--ruimte-xs);
  letter-spacing: -0.02em;
}

.review-verzoek-hero p {
  font-size: var(--tekst-m);
  line-height: 1.55;
  color: var(--kleur-tekst-zacht);
  max-width: 72ch;
  margin: 0 0 var(--ruimte-s);
}

/* Privacy Zegel Banner */
.rv-privacy-zegel {
  display: inline-flex;
  align-items: center;
  gap: var(--ruimte-xs);
  background: color-mix(in srgb, var(--kleur-succes) 10%, var(--kleur-vlak));
  border: 1px solid color-mix(in srgb, var(--kleur-succes) 35%, transparent);
  border-radius: var(--radius-s);
  padding: var(--ruimte-xs) var(--ruimte-s);
  font-family: var(--font-mono);
  font-size: var(--tekst-xs);
  color: var(--kleur-succes);
  letter-spacing: 0.02em;
}

.rv-privacy-zegel svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ---------- Tweekoloms Werkruimte ---------- */
.rv-workspace {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--ruimte-l);
  align-items: start;
  margin-bottom: var(--ruimte-xl);
}

@media (min-width: 1080px) {
  .rv-workspace {
    grid-template-columns: 460px 1fr;
    gap: var(--ruimte-xl);
  }
}

/* ---------- 1. Invoer-Werkbank ---------- */
.rv-paneel-invoer {
  background: var(--kleur-vlak);
  border: 1px solid var(--kleur-rand);
  border-radius: var(--radius-l);
  padding: var(--ruimte-m);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.16);
  position: sticky;
  top: 90px;
}

.rv-invoer-kop {
  border-bottom: 1px solid var(--kleur-rand);
  padding-bottom: var(--ruimte-s);
  margin-bottom: var(--ruimte-m);
}

.rv-invoer-titel {
  font-family: var(--font-display);
  font-size: var(--tekst-m);
  font-weight: 700;
  color: var(--kleur-tekst);
  margin: 0 0 var(--ruimte-xxs);
}

.rv-invoer-sub {
  font-family: var(--font-mono);
  font-size: var(--tekst-xs);
  color: var(--kleur-tekst-zacht);
  margin: 0;
  letter-spacing: 0.02em;
}

.rv-veld-groep {
  margin-bottom: var(--ruimte-m);
}

.rv-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--font-display);
  font-size: var(--tekst-s);
  font-weight: 700;
  color: var(--kleur-tekst);
  margin-bottom: var(--ruimte-xs);
}

.rv-label-optie {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  color: var(--kleur-tekst-zacht);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.rv-input {
  width: 100%;
  padding: var(--ruimte-xs) var(--ruimte-s);
  background: var(--p-ink-900);
  border: 1px solid var(--kleur-rand);
  border-radius: var(--radius-s);
  font-family: var(--font-tekst);
  font-size: var(--tekst-s);
  color: var(--kleur-tekst);
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
  box-sizing: border-box;
}

.rv-input:focus {
  border-color: var(--p-tik-500);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--p-tik-500) 25%, transparent);
}

.rv-input::placeholder {
  color: var(--kleur-placeholder);
}

.rv-veld-hulp {
  display: block;
  font-family: var(--font-tekst);
  font-size: 12px;
  color: var(--kleur-tekst-zacht);
  margin-top: var(--ruimte-xxs);
  line-height: 1.4;
}

/* Validatie indicator */
.rv-validatie-status {
  display: flex;
  align-items: center;
  gap: var(--ruimte-xxs);
  font-family: var(--font-mono);
  font-size: 11px;
  margin-top: var(--ruimte-xxs);
  transition: color 0.15s ease;
}

.rv-validatie-status.geldig {
  color: var(--kleur-succes);
}

.rv-validatie-status.ongeldig {
  color: var(--p-tik-500);
}

/* Toon Schakelaar (Segmented Control) */
.rv-toon-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--ruimte-xxs);
  background: var(--p-ink-900);
  padding: 4px;
  border: 1px solid var(--kleur-rand);
  border-radius: var(--radius-m);
}

.rv-toon-knop {
  position: relative;
  background: transparent;
  border: none;
  border-radius: var(--radius-s);
  padding: var(--ruimte-xs) var(--ruimte-xxs);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--kleur-tekst-zacht);
  cursor: pointer;
  text-align: center;
  transition: background 0.18s ease, color 0.18s ease, transform 0.12s cubic-bezier(0.23, 1, 0.32, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.rv-toon-knop .rv-toon-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  opacity: 0.8;
  letter-spacing: 0.02em;
}

.rv-toon-knop:hover {
  color: var(--kleur-tekst);
  background: rgba(255, 255, 255, 0.04);
}

.rv-toon-knop:active {
  transform: scale(0.96);
}

.rv-toon-knop[aria-checked="true"] {
  background: var(--p-tik-500);
  color: #ffffff;
  box-shadow: 0 2px 8px color-mix(in srgb, var(--p-tik-500) 40%, transparent);
}

.rv-toon-knop[aria-checked="true"] .rv-toon-sub {
  color: rgba(255, 255, 255, 0.9);
}

/* Invoer Hulpknoppen */
.rv-invoer-acties {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--ruimte-xs);
  margin-top: var(--ruimte-m);
  padding-top: var(--ruimte-s);
  border-top: 1px solid var(--kleur-rand);
}

.rv-knop-hulp {
  background: transparent;
  border: 1px solid var(--kleur-rand);
  border-radius: var(--radius-s);
  padding: var(--ruimte-xxs) var(--ruimte-xs);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--kleur-tekst-zacht);
  cursor: pointer;
  transition: all 0.15s ease;
}

.rv-knop-hulp:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--kleur-tekst);
  border-color: var(--kleur-tekst-zacht);
}

/* Uitklapbare Google link tip */
.rv-tip-details {
  margin-top: var(--ruimte-m);
  background: var(--p-ink-900);
  border: 1px dashed var(--kleur-rand);
  border-radius: var(--radius-s);
  padding: var(--ruimte-xs) var(--ruimte-s);
  font-size: 12px;
}

.rv-tip-summary {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--kleur-tekst-zacht);
  cursor: pointer;
  user-select: none;
}

.rv-tip-summary:hover {
  color: var(--p-tik-500);
}

.rv-tip-inhoud {
  margin-top: var(--ruimte-xs);
  padding-left: var(--ruimte-s);
  color: var(--kleur-tekst-zacht);
  line-height: 1.5;
}

.rv-tip-inhoud ol {
  margin: 0;
  padding-left: 1.2rem;
}

.rv-tip-inhoud li {
  margin-bottom: 4px;
}

/* ---------- 2. Resultaten Kolom ---------- */
.rv-paneel-resultaten {
  display: flex;
  flex-direction: column;
  gap: var(--ruimte-l);
}

/* Resultaat Kaart */
.rv-kaart {
  background: var(--kleur-vlak);
  border: 1px solid var(--kleur-rand);
  border-radius: var(--radius-l);
  padding: var(--ruimte-m);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.rv-kaart:focus-within {
  border-color: color-mix(in srgb, var(--p-tik-500) 40%, var(--kleur-rand));
}

.rv-kaart-kop {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--kleur-rand);
  padding-bottom: var(--ruimte-xs);
  margin-bottom: var(--ruimte-m);
}

.rv-kaart-titel-groep {
  display: flex;
  align-items: center;
  gap: var(--ruimte-xs);
}

.rv-kaart-icoon {
  width: 22px;
  height: 22px;
  color: var(--p-tik-500);
  flex-shrink: 0;
}

.rv-kaart-titel-groep.whatsapp .rv-kaart-icoon {
  color: #25d366;
}

.rv-kaart-titel {
  font-family: var(--font-display);
  font-size: var(--tekst-m);
  font-weight: 700;
  color: var(--kleur-tekst);
  margin: 0;
}

.rv-kaart-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--kleur-tekst-zacht);
  background: var(--p-ink-900);
  border: 1px solid var(--kleur-rand);
  border-radius: var(--radius-xs);
  padding: 2px 8px;
}

/* ---------- WhatsApp Preview Bubbel ---------- */
.rv-whatsapp-container {
  background: radial-gradient(circle at 100% 0%, rgba(37, 211, 102, 0.08) 0%, transparent 60%),
              var(--p-ink-900);
  border: 1px solid var(--kleur-rand);
  border-radius: var(--radius-m);
  padding: var(--ruimte-m);
  margin-bottom: var(--ruimte-m);
}

.rv-whatsapp-bubble {
  background: #0d2818;
  border: 1px solid #1e4d30;
  border-radius: 14px 14px 14px 3px;
  padding: var(--ruimte-s) var(--ruimte-m);
  max-width: 580px;
  color: #e9edef;
  font-size: 14px;
  line-height: 1.55;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  position: relative;
}

[data-thema="dag"] .rv-whatsapp-bubble {
  background: #dcf8c6;
  border-color: #c7ecc0;
  color: #111b21;
}

.rv-whatsapp-afzender {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  color: #25d366;
  margin-bottom: 6px;
}

[data-thema="dag"] .rv-whatsapp-afzender {
  color: #075e54;
}

.rv-whatsapp-tekst {
  white-space: pre-wrap;
  word-break: break-word;
}

.rv-whatsapp-meta {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: #8696a0;
}

.rv-whatsapp-vinkjes {
  color: #53bdeb;
}

/* ---------- E-mail Preview ---------- */
.rv-email-container {
  background: var(--p-ink-900);
  border: 1px solid var(--kleur-rand);
  border-radius: var(--radius-m);
  overflow: hidden;
  margin-bottom: var(--ruimte-m);
}

.rv-email-rij {
  display: flex;
  align-items: center;
  gap: var(--ruimte-xs);
  padding: var(--ruimte-xs) var(--ruimte-s);
  border-bottom: 1px solid var(--kleur-rand);
}

.rv-email-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--kleur-tekst-zacht);
  text-transform: uppercase;
  width: 90px;
  flex-shrink: 0;
}

.rv-email-waarde {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--kleur-tekst);
  flex-grow: 1;
}

.rv-email-kopieer-veld-knop {
  background: transparent;
  border: none;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--p-tik-500);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-xs);
}

.rv-email-kopieer-veld-knop:hover {
  background: color-mix(in srgb, var(--p-tik-500) 15%, transparent);
}

.rv-email-body {
  padding: var(--ruimte-m);
  background: var(--kleur-vlak);
  color: var(--kleur-tekst);
  font-family: var(--font-tekst);
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ---------- QR-Code Weergave & Display ---------- */
.rv-qr-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--ruimte-m);
  align-items: center;
}

@media (min-width: 680px) {
  .rv-qr-grid {
    grid-template-columns: 240px 1fr;
    gap: var(--ruimte-l);
  }
}

.rv-qr-kaartje-preview {
  background: #ffffff;
  border: 1px solid #d9dde2;
  border-radius: var(--radius-m);
  padding: var(--ruimte-m);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  box-sizing: border-box;
}

.rv-qr-svg-wrapper {
  width: 190px;
  height: 190px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rv-qr-svg-wrapper svg {
  width: 100%;
  height: 100%;
  shape-rendering: crispEdges;
}

.rv-qr-onderschrift {
  margin-top: var(--ruimte-xs);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: #101820;
}

.rv-qr-subtekst {
  font-family: var(--font-mono);
  font-size: 10px;
  color: #555e6c;
  margin-top: 2px;
  letter-spacing: 0.02em;
}

.rv-qr-details {
  display: flex;
  flex-direction: column;
  gap: var(--ruimte-s);
}

.rv-qr-link-preview {
  background: var(--p-ink-900);
  border: 1px solid var(--kleur-rand);
  border-radius: var(--radius-s);
  padding: var(--ruimte-xs) var(--ruimte-s);
}

.rv-qr-link-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  color: var(--kleur-tekst-zacht);
  margin-bottom: 2px;
}

.rv-qr-link-url {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--p-tik-500);
  word-break: break-all;
}

/* Knoppenbalk in Resultaatkaarten */
.rv-kaart-acties {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--ruimte-xs);
  margin-top: var(--ruimte-m);
}

/* Tactiele Knoppen */
.knop-tactiel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--ruimte-xs);
  position: relative;
  border: 1px solid color-mix(in srgb, #ffffff 18%, var(--p-tik-500));
  background: var(--p-tik-500);
  color: #ffffff;
  font-family: var(--font-display);
  font-weight: 700;
  border-radius: var(--radius-s);
  padding: var(--ruimte-xs) var(--ruimte-m);
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 3px 0 var(--p-tik-900), 0 4px 10px rgba(0, 0, 0, 0.25);
  transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.15s ease;
  user-select: none;
}

.knop-tactiel:hover {
  background: var(--p-tik-300);
  color: #ffffff;
}

.knop-tactiel:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--p-tik-900), 0 2px 4px rgba(0, 0, 0, 0.2);
}

.knop-secundair {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--ruimte-xs);
  background: var(--p-ink-900);
  border: 1px solid var(--kleur-rand);
  color: var(--kleur-tekst);
  font-family: var(--font-display);
  font-weight: 700;
  border-radius: var(--radius-s);
  padding: var(--ruimte-xs) var(--ruimte-m);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
  user-select: none;
}

.knop-secundair:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--kleur-tekst-zacht);
  color: #ffffff;
}

.knop-secundair:active {
  transform: scale(0.98);
}

/* Toast / Feedback melding */
.rv-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--p-ink-900);
  border: 1px solid var(--kleur-succes);
  color: var(--kleur-succes);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  padding: var(--ruimte-xs) var(--ruimte-m);
  border-radius: var(--radius-s);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  gap: var(--ruimte-xs);
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity 0.2s cubic-bezier(0.23, 1, 0.32, 1), transform 0.2s cubic-bezier(0.23, 1, 0.32, 1);
  z-index: 1000;
}

.rv-toast.actief {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- 3. Print Tafelkaartje / Display (@media print) ---------- */
.rv-print-kaartje {
  display: none;
}

@media print {
  /* Verberg alle web-navigatie en invoerelementen */
  body {
    background: #ffffff !important;
    color: #101820 !important;
    font-family: var(--font-tekst) !important;
  }

  .kop,
  .voet,
  .overslaan,
  .review-verzoek-hero,
  .rv-paneel-invoer,
  #rv-sectie-whatsapp,
  #rv-sectie-email,
  .rv-kaart-kop,
  .rv-kaart-acties,
  .rv-qr-details,
  .rv-toast,
  .cursor {
    display: none !important;
  }

  .rv-workspace {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .rv-kaart {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    background: transparent !important;
  }

  /* Het geprinte tafelkaartje / baliedisplay */
  .rv-print-kaartje {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 140mm;
    margin: 20mm auto;
    padding: 15mm;
    border: 2px solid #101820;
    border-radius: 8mm;
    page-break-inside: avoid;
    box-sizing: border-box;
  }

  .rv-print-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 14pt;
    margin-bottom: 8mm;
  }

  .rv-print-zaak {
    font-family: var(--font-display);
    font-size: 22pt;
    font-weight: 700;
    color: #101820;
    margin: 0 0 4mm;
    line-height: 1.2;
  }

  .rv-print-vraag {
    font-size: 13pt;
    color: #333333;
    margin: 0 0 8mm;
    line-height: 1.4;
  }

  .rv-print-qr-kader {
    width: 65mm;
    height: 65mm;
    margin: 0 auto 6mm;
    padding: 4mm;
    border: 1px solid #cccccc;
    border-radius: 4mm;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .rv-print-qr-kader svg {
    width: 100%;
    height: 100%;
  }

  .rv-print-instructie {
    font-family: var(--font-mono);
    font-size: 10pt;
    color: #101820;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 2mm;
  }

  .rv-print-subinstructie {
    font-size: 9pt;
    color: #666666;
    margin: 0;
  }

  .rv-print-voet {
    margin-top: 10mm;
    padding-top: 4mm;
    border-top: 1px dashed #cccccc;
    font-family: var(--font-mono);
    font-size: 8pt;
    color: #888888;
  }
}

.rv-kennis-sectie {
  margin-top: var(--ruimte-xl);
  margin-bottom: var(--ruimte-xl);
}

