/* Consent-balk en voorkeurenpaneel. Los bestand (niet via Astro gebundeld) zodat het ook op de
   checkout- en bedanktpagina werkt, die geen Basis.astro-layout gebruiken. Kleur #f37120 is het
   bestaande Jimani-oranje (zie de Calendly-knop in Basis.astro). */
:root {
  --jc-accent: #f37120;
  --jc-accent-ink: #ffffff;
  --jc-ink: #2b2a35;
  --jc-muted: #6b6b76;
  --jc-bg: #ffffff;
  --jc-border: #e3e3e8;
}

.jc-balk, .jc-overlay, .jc-paneel, .jc-balk * , .jc-overlay * {
  box-sizing: border-box;
  font-family: inherit;
}

.jc-balk {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 2147483000;
  background: var(--jc-bg); border-top: 1px solid var(--jc-border);
  box-shadow: 0 -4px 24px rgba(20, 20, 30, .12);
  padding: 16px max(16px, env(safe-area-inset-left, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-right, 0px));
}
.jc-balk-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between;
}
.jc-tekst { flex: 1 1 320px; min-width: 0; }
.jc-titel { font-weight: 700; margin: 0 0 4px; color: var(--jc-ink); font-size: 15px; }
.jc-tekst p { margin: 0 0 4px; color: var(--jc-muted); font-size: 13.5px; line-height: 1.5; }
.jc-tekst p:last-child { margin-bottom: 0; }

.jc-knoppen { display: flex; flex-wrap: wrap; gap: 8px; flex: 0 0 auto; }
.jc-btn {
  appearance: none; border: 1px solid transparent; border-radius: 8px; cursor: pointer;
  font-size: 13.5px; font-weight: 600; padding: 10px 16px; line-height: 1.2; white-space: nowrap;
}
.jc-btn:focus-visible { outline: 2px solid var(--jc-accent); outline-offset: 2px; }
.jc-btn-primary { background: var(--jc-accent); color: var(--jc-accent-ink); }
.jc-btn-primary:hover { background: #d9611a; }
.jc-btn-outline { background: transparent; color: var(--jc-ink); border-color: var(--jc-border); }
.jc-btn-outline:hover { border-color: var(--jc-ink); }
.jc-btn-ghost { background: transparent; color: var(--jc-muted); text-decoration: underline; padding-left: 4px; padding-right: 4px; }

.jc-overlay {
  position: fixed; inset: 0; z-index: 2147483001;
  background: rgba(20, 20, 30, .45);
  display: flex; align-items: flex-end; justify-content: center;
}
@media (min-width: 620px) {
  .jc-overlay { align-items: center; padding: 24px; }
}
.jc-paneel {
  background: var(--jc-bg); width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto;
  border-radius: 16px 16px 0 0; padding-bottom: env(safe-area-inset-bottom, 0px);
}
@media (min-width: 620px) {
  .jc-paneel { border-radius: 16px; }
}
.jc-paneel-kop {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 18px 20px; border-bottom: 1px solid var(--jc-border); position: sticky; top: 0; background: var(--jc-bg);
}
.jc-paneel-kop h2 { margin: 0; font-size: 17px; color: var(--jc-ink); }
.jc-sluit {
  appearance: none; border: none; background: transparent; font-size: 22px; line-height: 1;
  cursor: pointer; color: var(--jc-muted); padding: 4px 8px; border-radius: 6px;
}
.jc-sluit:hover { background: var(--jc-border); }
.jc-sluit:focus-visible { outline: 2px solid var(--jc-accent); outline-offset: 2px; }

.jc-paneel-body { padding: 4px 20px; }
.jc-rij {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  padding: 16px 0; border-bottom: 1px solid var(--jc-border);
}
.jc-rij:last-child { border-bottom: none; }
.jc-rij-tekst { flex: 1 1 auto; min-width: 0; }
.jc-rij-naam { margin: 0 0 4px; font-weight: 600; color: var(--jc-ink); font-size: 14px; }
.jc-rij-uitleg { margin: 0; color: var(--jc-muted); font-size: 13px; line-height: 1.5; }

.jc-toggle { position: relative; flex: 0 0 auto; display: inline-block; width: 44px; height: 26px; margin-top: 2px; }
.jc-toggle input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.jc-toggle-slider {
  position: absolute; inset: 0; background: #cfcfd6; border-radius: 999px; transition: background .15s;
  pointer-events: none;
}
.jc-toggle-slider::before {
  content: ''; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px; background: #fff;
  border-radius: 50%; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.25);
}
.jc-toggle input:checked + .jc-toggle-slider { background: var(--jc-accent); }
.jc-toggle input:checked + .jc-toggle-slider::before { transform: translateX(18px); }
.jc-toggle input:disabled + .jc-toggle-slider { background: #e3b088; opacity: .8; }
.jc-toggle input:focus-visible + .jc-toggle-slider { outline: 2px solid var(--jc-accent); outline-offset: 2px; }

.jc-paneel-voet { padding: 16px 20px 20px; position: sticky; bottom: 0; background: var(--jc-bg); border-top: 1px solid var(--jc-border); }
.jc-paneel-voet .jc-btn { width: 100%; }

.jc-wijzig-link {
  appearance: none; background: transparent; border: none; padding: 0; margin: 0;
  color: inherit; text-decoration: underline; cursor: pointer; font: inherit; font-size: 13px;
}
.checkout-footer .jc-wijzig-link { color: inherit; }
