/* =========================================================================
   Cookie-Consent für Psychotherapie Hafen
   - Banner unten am Bildschirmrand
   - Modal für granulare Einstellungen
   - Stil passt zur Webseite (Sand/Blue-Steel-Palette)
   ========================================================================= */

/* ---------- Banner ---------- */
.consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: rgba(253, 250, 246, 0.98);
  backdrop-filter: blur(14px);
  border-top: 1px solid #d9cdb8;
  box-shadow: 0 -10px 40px rgba(46, 77, 99, 0.12);
  padding: .9rem 1.6rem 1rem;
  font-family: 'Jost', sans-serif;
  color: #172330;
  animation: consentSlideUp .5s ease both;
}

@keyframes consentSlideUp {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.consent-banner-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.consent-banner-text {
  flex: 1 1 380px;
  min-width: 0;
}

.consent-banner-msg {
  font-size: .86rem;
  line-height: 1.55;
  color: #4a5f6e;
  margin: 0;
}

.consent-banner-msg a {
  color: #4a6d85;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.consent-banner-msg a:hover { color: #b8924a; }

.consent-banner-actions {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  align-items: center;
  flex-shrink: 0;
}

.consent-btn {
  font-family: 'Jost', sans-serif;
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .05em;
  padding: .55rem 1.05rem;
  border-radius: 4px;
  cursor: pointer;
  border: 0;
  transition: all .25s ease;
  white-space: nowrap;
  line-height: 1;
}

.consent-btn--primary {
  background: linear-gradient(135deg, #2e4d63, #4a6d85);
  color: #fff;
  box-shadow: 0 6px 18px rgba(46, 77, 99, .22);
}
.consent-btn--primary:hover {
  background: linear-gradient(135deg, #b8924a, #d4aa6a);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(184, 146, 74, .3);
}

.consent-btn--ghost {
  background: transparent;
  color: #4a5f6e;
  border: 1.5px solid #d9cdb8;
}
.consent-btn--ghost:hover {
  border-color: #4a6d85;
  color: #4a6d85;
}

/* Neutraler Banner-Button: gleichberechtigte Wahl ohne Nudging
   (Akzeptieren / Ablehnen sehen identisch aus) */
.consent-btn--neutral {
  background: transparent;
  color: #2e4d63;
  border: 1.5px solid #4a6d85;
  min-width: 110px;
  text-align: center;
}
.consent-btn--neutral:hover {
  background: #4a6d85;
  color: #fff;
  border-color: #4a6d85;
}
.consent-btn--neutral:focus-visible {
  outline: 2px solid #b8924a;
  outline-offset: 2px;
}

.consent-btn--text {
  background: transparent;
  color: #4a5f6e;
  padding: .7rem .6rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.consent-btn--text:hover { color: #b8924a; }

@media (max-width: 760px) {
  .consent-banner { padding: .9rem .9rem 1rem; }
  .consent-banner-inner { gap: .8rem; }
  .consent-banner-actions { width: 100%; }
  .consent-btn { flex: 1 1 auto; min-width: 0; padding: .65rem .9rem; }
  .consent-btn--text { flex: 1 1 100%; padding: .35rem 0; }
}

/* ---------- Settings Modal ---------- */
.consent-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(23, 35, 48, 0.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: consentFadeIn .25s ease;
}

@keyframes consentFadeIn { from { opacity: 0; } to { opacity: 1; } }

.consent-modal {
  background: #fdfaf6;
  border-radius: 8px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 30px 60px rgba(23, 35, 48, .3);
  font-family: 'Jost', sans-serif;
  color: #172330;
  animation: consentScaleIn .3s ease both;
}

@keyframes consentScaleIn {
  from { opacity: 0; transform: scale(.95); }
  to { opacity: 1; transform: scale(1); }
}

.consent-modal-head {
  padding: 1.6rem 1.8rem 1rem;
  border-bottom: 1px solid #ede4d3;
}

.consent-modal-kicker {
  font-size: .72rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: #b8924a;
  font-weight: 500;
  margin-bottom: .4rem;
}

.consent-modal-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.7rem;
  font-weight: 500;
  color: #172330;
  margin: 0;
  line-height: 1.2;
}

.consent-modal-body {
  padding: 1.4rem 1.8rem;
}

.consent-modal-intro {
  font-size: .94rem;
  line-height: 1.75;
  color: #172330;
  margin-bottom: 1.4rem;
}
.consent-modal-intro a {
  color: #4a6d85;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.consent-modal-intro a:hover { color: #b8924a; }

.consent-category {
  border: 1px solid #ede4d3;
  border-radius: 6px;
  padding: 1.1rem 1.2rem;
  margin-bottom: .9rem;
  background: rgba(245, 240, 232, .35);
}

.consent-category-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .4rem;
}

.consent-category-title {
  font-size: 1rem;
  font-weight: 500;
  color: #172330;
  margin: 0;
}

.consent-category-desc {
  font-size: .87rem;
  line-height: 1.65;
  color: #4a5f6e;
  margin: 0;
}

.consent-category-locked {
  font-size: .75rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #b8924a;
  font-weight: 500;
}

/* Toggle Switch */
.consent-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}
.consent-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.consent-switch-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #d9cdb8;
  border-radius: 24px;
  transition: background .25s;
}
.consent-switch-slider::before {
  content: "";
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform .25s;
  box-shadow: 0 2px 4px rgba(0,0,0,.15);
}
.consent-switch input:checked + .consent-switch-slider {
  background: #4a6d85;
}
.consent-switch input:checked + .consent-switch-slider::before {
  transform: translateX(20px);
}
.consent-switch input:focus-visible + .consent-switch-slider {
  outline: 2px solid #b8924a;
  outline-offset: 2px;
}

.consent-modal-foot {
  padding: 1.2rem 1.8rem 1.6rem;
  border-top: 1px solid #ede4d3;
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

@media (max-width: 540px) {
  .consent-modal-head, .consent-modal-body, .consent-modal-foot { padding-left: 1.2rem; padding-right: 1.2rem; }
  .consent-modal-foot { flex-direction: column-reverse; }
  .consent-modal-foot .consent-btn { width: 100%; }
}

/* ---------- Footer-Link ---------- */
.consent-trigger {
  background: none;
  border: 0;
  padding: 0;
  font-family: 'Jost', sans-serif;
  font-size: .85rem;
  letter-spacing: .04em;
  color: #4a5f6e;
  cursor: pointer;
  text-decoration: none;
  transition: color .25s;
}
.consent-trigger:hover { color: #b8924a; }
