/* Zelfgehoste cookiebanner: werkt in het moderne én het klassieke ontwerp. */
:root { --cookie-bar-h: 0px; }
body.has-cookie-bar { padding-bottom: var(--cookie-bar-h); }
body.has-cookie-bar .popup,
body.has-cookie-bar .sgpb-wrap {
  padding-bottom: calc(var(--cookie-bar-h) + 1rem);
  align-items: flex-start;
  overflow-y: auto;
}
body.has-cookie-bar .popup-box,
body.has-cookie-bar .sgpb-content {
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.cookie-bar[hidden],
.cookie-dialog-wrap[hidden],
.consent-placeholder[hidden],
.booking-embed iframe[hidden] { display: none !important; }

.cookie-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 10050;
  background: #f7f4ee;
  color: #17324a;
  border-top: 3px solid #0f7c78;
  box-shadow: 0 -8px 28px rgba(23, 50, 74, .18);
  font-size: 1rem;
  line-height: 1.45;
}
.cookie-bar-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: .85rem 1.1rem calc(.85rem + env(safe-area-inset-bottom, 0px));
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}
.cookie-bar-text { margin: 0; flex: 1 1 auto; }
.cookie-bar-text a { color: #0b5e5a; text-decoration: underline; }
.cookie-bar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  flex: 0 0 auto;
  justify-content: flex-end;
}
.cookie-form { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; }

.cookie-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: .55rem 1rem;
  border-radius: 8px;
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  border: 2px solid #17324a;
  background: #fff;
  color: #17324a;
}
.cookie-btn:hover { filter: brightness(1.05); }
.cookie-btn:focus-visible {
  outline: 3px solid #0f7c78;
  outline-offset: 2px;
}
.cookie-btn-accept,
.cookie-btn-reject {
  min-width: 10.5rem;
}
.cookie-btn-accept {
  background: #0f7c78;
  border-color: #0b5e5a;
  color: #fff;
}
.cookie-btn-reject {
  background: #fff;
  border-color: #17324a;
  color: #17324a;
}
.cookie-btn-settings,
.cookie-btn-cancel,
.cookie-btn-save { background: #fff; }
.cookie-btn-allow {
  background: #0f7c78;
  border-color: #0b5e5a;
  color: #fff;
  margin-top: .4rem;
}

.cookie-dialog-wrap {
  position: fixed;
  inset: 0;
  z-index: 10060;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0.75rem 0.75rem calc(0.75rem + env(safe-area-inset-bottom, 0px));
}
.cookie-dialog-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(23, 50, 74, .45);
}
.cookie-dialog {
  position: relative;
  z-index: 1;
  width: min(40rem, 100%);
  max-height: min(90vh, 40rem);
  overflow: auto;
  background: #fff;
  color: #17324a;
  border-radius: 16px 16px 8px 8px;
  padding: 1.25rem 1.2rem 1.1rem;
  box-shadow: 0 16px 48px rgba(23, 50, 74, .28);
}
.cookie-dialog h2 { margin: 0 0 .6rem; font-size: 1.35rem; }
.cookie-dialog p { margin: 0 0 1rem; }
.cookie-dialog a { color: #0b5e5a; }
.cookie-cats { list-style: none; margin: 0 0 1rem; padding: 0; }
.cookie-cat {
  display: flex;
  gap: .7rem;
  align-items: flex-start;
  padding: .75rem .8rem;
  border: 1px solid #d5dde3;
  border-radius: 10px;
  margin: 0 0 .6rem;
}
.cookie-cat input { margin-top: .25rem; width: 1.15rem; height: 1.15rem; flex: none; accent-color: #0f7c78; }
.cookie-dialog-actions { display: flex; flex-wrap: wrap; gap: .5rem; }

.consent-placeholder {
  background: #f3f7f8;
  color: #17324a;
  border: 1px dashed #7aa3a1;
  border-radius: 16px;
  padding: 1.2rem 1.3rem;
  text-align: left;
}
.consent-placeholder p { margin: 0 0 .5rem; }
.booking-fallback {
  margin: .85rem 0 0;
  font-size: .95rem;
  line-height: 1.45;
}
.booking-embed iframe[hidden],
.booking-embed .consent-placeholder[hidden] { display: none !important; }

.cookie-legal { margin: .5rem 0 0; }
.cookie-legal a,
.cookie-legal-btn {
  color: inherit;
  font: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
}
.cookie-legal-btn:focus-visible,
.cookie-legal a:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 2px;
}
.cookie-legal-sep { margin: 0 .35rem; }

/* Cookiebeleid-pagina */
.cookie-policy-page { padding: 2rem 0 3rem; }
.cookie-policy-page .wrap,
.cookie-policy-classic { max-width: 46rem; margin: 0 auto; padding: 1.5rem 1.1rem 3rem; }
.cookie-policy-page .policy-card { padding: 2rem 1.4rem; }
.cookie-policy-page h1,
.cookie-policy-classic h1 { margin: 0 0 1rem; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

@media (max-width: 799.98px) {
  .cookie-bar-inner { flex-direction: column; align-items: stretch; gap: .7rem; }
  .cookie-bar-actions, .cookie-form { width: 100%; }
  .cookie-btn-accept, .cookie-btn-reject { flex: 1 1 calc(50% - .5rem); min-width: 0; }
  .cookie-btn-settings { flex: 1 1 100%; }
}
@media (min-width: 800px) {
  .cookie-dialog-wrap { align-items: center; }
  .cookie-dialog { border-radius: 16px; }
}

body.has-cookie-bar #afspraak,
body.has-cookie-bar .booking-embed,
body.has-cookie-bar .cookie-btn-allow {
  scroll-margin-bottom: calc(var(--cookie-bar-h, 8rem) + 16px);
}
body.has-cookie-bar .booking-embed { padding-bottom: .25rem; }
