/* Groeniek - cookie-consent banner + voorkeuren-modal.
   Niets laadt vóórdat de bezoeker een keuze maakt. Gebruikt door assets/consent.js. */

.cb-overlay {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  padding: 16px;
  padding-left: calc(16px + env(safe-area-inset-left, 0px));
  padding-right: calc(16px + env(safe-area-inset-right, 0px));
  padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  pointer-events: none;
}

.cb-banner {
  pointer-events: auto;
  max-width: 760px;
  margin: 0 auto;
  background: #fff;
  color: hsl(220 30% 15%);
  border: 1px solid hsl(45 15% 85%);
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
  padding: 22px 24px;
  display: grid;
  gap: 14px;
  font-family: 'Inter', system-ui, sans-serif;
}

.cb-banner h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  color: hsl(220 70% 18%);
}

.cb-banner p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: hsl(220 20% 30%);
}

.cb-banner a {
  color: hsl(220 70% 18%);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cb-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 4px;
}

.cb-btn {
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
}

.cb-btn-primary {
  background: hsl(42 100% 55%);
  color: hsl(220 70% 18%);
  border-color: hsl(42 100% 55%);
}
.cb-btn-primary:hover { background: hsl(38 95% 50%); border-color: hsl(38 95% 50%); }

.cb-btn-secondary {
  background: #fff;
  color: hsl(220 30% 20%);
  border-color: hsl(220 15% 75%);
}
.cb-btn-secondary:hover { border-color: hsl(220 70% 18%); color: hsl(220 70% 18%); }

.cb-btn-link {
  background: none;
  border: none;
  color: hsl(220 30% 35%);
  text-decoration: underline;
  cursor: pointer;
  padding: 8px 4px;
  min-height: 44px;
  font-size: 14px;
  font-family: inherit;
}
.cb-btn-link:hover { color: hsl(220 70% 18%); }

/* Modal voor voorkeuren */
.cb-overlay-modal {
  background: rgba(10, 18, 35, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  pointer-events: auto;
}

.cb-modal {
  background: #fff;
  max-width: 540px;
  width: 100%;
  border-radius: 10px;
  padding: 28px 28px 24px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  font-family: 'Inter', system-ui, sans-serif;
  color: hsl(220 30% 15%);
}

.cb-modal h2 {
  margin: 0 0 8px;
  font-size: 20px;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  color: hsl(220 70% 18%);
}

.cb-modal > p {
  margin: 0 0 18px;
  font-size: 14px;
  line-height: 1.55;
  color: hsl(220 20% 35%);
}

.cb-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 16px 0;
  border-top: 1px solid hsl(45 15% 88%);
}
.cb-row:last-of-type { border-bottom: 1px solid hsl(45 15% 88%); }

.cb-row-text {
  flex: 1;
  min-width: 0;
}
.cb-row-text strong {
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
  color: hsl(220 70% 18%);
}
.cb-row-text span {
  font-size: 13px;
  color: hsl(220 20% 38%);
  line-height: 1.45;
}

.cb-toggle-locked {
  font-size: 12px;
  font-weight: 600;
  color: hsl(220 20% 45%);
  padding: 6px 12px;
  background: hsl(45 15% 92%);
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}

.cb-switch {
  position: relative;
  flex-shrink: 0;
  width: 48px;
  height: 28px;
  display: inline-block;
}
.cb-switch input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
  z-index: 2;
}
.cb-switch .cb-track {
  position: absolute;
  inset: 0;
  background: hsl(220 15% 80%);
  border-radius: 999px;
  transition: background 0.15s ease;
}
.cb-switch .cb-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform 0.15s ease;
}
.cb-switch input:checked + .cb-track { background: hsl(155 70% 32%); }
.cb-switch input:checked + .cb-track + .cb-thumb { transform: translateX(20px); }
.cb-switch input:focus-visible + .cb-track { outline: 2px solid hsl(220 70% 35%); outline-offset: 2px; }

.cb-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.cb-close {
  position: absolute;
  top: 8px;
  right: 10px;
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: hsl(220 15% 50%);
  line-height: 1;
  min-height: 44px;
  min-width: 44px;
  border-radius: 6px;
}
.cb-close:hover { color: hsl(220 70% 18%); background: hsl(45 15% 94%); }

/* Hide sticky-cta + WhatsApp-fab terwijl banner/modal open is, voorkomt overlap. */
body.cb-active .sticky-cta,
body.cb-active .wa-fab {
  display: none !important;
}

/* Mobiel: knoppen full-width, banner ietsje compacter */
@media (max-width: 560px) {
  .cb-overlay { padding: 12px; padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
  .cb-banner { padding: 18px; gap: 12px; }
  .cb-banner h2 { font-size: 16px; }
  .cb-banner p { font-size: 13px; }
  .cb-actions { flex-direction: column; align-items: stretch; }
  .cb-actions .cb-btn,
  .cb-actions .cb-btn-link { width: 100%; }
  .cb-modal { padding: 22px 18px 18px; }
  .cb-modal h2 { font-size: 18px; }
  .cb-modal-actions { flex-direction: column; }
  .cb-modal-actions .cb-btn { width: 100%; }
}
