/* ==========================================================================
   ESTATESUITE — Consent Manager (CMP)
   DSGVO/TTDSG-konform · Banner + Einstellungen-Modal
   ========================================================================== */
:root {
  --cc-bg: #ffffff;
  --cc-ink: #0e1322;
  --cc-muted: #59617a;
  --cc-line: rgba(14, 19, 34, 0.12);
  --cc-line-soft: rgba(14, 19, 34, 0.07);
  --cc-blue: #2e6bff;
  --cc-blue-ink: #1f4fd0;
  --cc-soft: #eaf0ff;
}

.es-cc, .es-cc * { box-sizing: border-box; }
.es-cc, .es-cc-modal {
  font-family: 'Switzer', 'Helvetica Neue', system-ui, sans-serif;
}

/* ---------- Banner ---------- */
.es-cc {
  position: fixed;
  left: 50%;
  bottom: clamp(12px, 2vw, 24px);
  transform: translateX(-50%) translateY(16px);
  width: min(720px, calc(100vw - 24px));
  z-index: 300;
  background: var(--cc-bg);
  border: 1px solid var(--cc-line);
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(14, 19, 34, 0.05), 0 24px 60px -22px rgba(14, 19, 34, 0.32);
  padding: clamp(18px, 2.4vw, 24px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s cubic-bezier(0.65,0.05,0,1), transform 0.45s cubic-bezier(0.65,0.05,0,1), visibility 0.45s;
}
.es-cc.is-open { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.es-cc__title { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 700; font-size: 16px; color: var(--cc-ink); margin: 0 0 6px; }
.es-cc__text { font-size: 13.5px; line-height: 1.55; color: var(--cc-muted); margin: 0 0 16px; }
.es-cc__text a { color: var(--cc-blue-ink); text-decoration: underline; }
.es-cc__actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.es-cc__spacer { flex: 1 1 auto; }

.es-cc__btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 99px;
  padding: 11px 20px;
  font-family: inherit;
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
  transition: background-color 0.25s, border-color 0.25s, color 0.25s, transform 0.25s;
  white-space: nowrap;
}
.es-cc__btn:hover { transform: translateY(-1px); }
.es-cc__btn--primary { background: var(--cc-blue); color: #fff; box-shadow: 0 8px 22px -10px rgba(46,107,255,0.6); }
.es-cc__btn--ghost { background: #fff; border-color: var(--cc-line); color: var(--cc-ink); }
.es-cc__btn--ghost:hover { border-color: var(--cc-blue); }
.es-cc__btn--link { background: transparent; color: var(--cc-muted); padding: 11px 8px; }
.es-cc__btn--link:hover { color: var(--cc-ink); transform: none; }

/* ---------- Modal ---------- */
.es-cc-modal {
  position: fixed;
  inset: 0;
  z-index: 320;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(14, 19, 34, 0.5);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s, visibility 0.35s;
}
.es-cc-modal.is-open { opacity: 1; visibility: visible; }
.es-cc-modal__card {
  width: min(560px, 100%);
  max-height: min(86vh, 720px);
  display: flex;
  flex-direction: column;
  background: var(--cc-bg);
  border-radius: 20px;
  box-shadow: 0 40px 90px -30px rgba(14, 19, 34, 0.5);
  transform: translateY(14px) scale(0.985);
  transition: transform 0.4s cubic-bezier(0.65,0.05,0,1);
  overflow: hidden;
}
.es-cc-modal.is-open .es-cc-modal__card { transform: none; }
.es-cc-modal__head {
  padding: 24px 26px 16px;
  border-bottom: 1px solid var(--cc-line-soft);
}
.es-cc-modal__title { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 700; font-size: 20px; color: var(--cc-ink); margin: 0 0 6px; }
.es-cc-modal__sub { font-size: 13.5px; line-height: 1.55; color: var(--cc-muted); margin: 0; }
.es-cc-modal__sub a { color: var(--cc-blue-ink); text-decoration: underline; }
.es-cc-modal__body { padding: 8px 26px; overflow-y: auto; }

.es-cc-cat {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 16px;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid var(--cc-line-soft);
}
.es-cc-cat__name { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 600; font-size: 15px; color: var(--cc-ink); }
.es-cc-cat__desc { grid-column: 1 / 2; font-size: 12.5px; line-height: 1.5; color: var(--cc-muted); margin: 0; }

/* Toggle switch */
.es-cc-switch { position: relative; width: 44px; height: 26px; flex-shrink: 0; }
.es-cc-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.es-cc-switch__track {
  position: absolute; inset: 0;
  background: #d4d8e2;
  border-radius: 99px;
  transition: background-color 0.25s;
  pointer-events: none;
}
.es-cc-switch__track::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 20px; height: 20px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  transition: transform 0.25s cubic-bezier(0.65,0.05,0,1);
}
.es-cc-switch input:checked + .es-cc-switch__track { background: var(--cc-blue); }
.es-cc-switch input:checked + .es-cc-switch__track::after { transform: translateX(18px); }
.es-cc-switch input:disabled + .es-cc-switch__track { background: #9fb6ef; cursor: not-allowed; }
.es-cc-switch input:focus-visible + .es-cc-switch__track { outline: 2px solid var(--cc-blue); outline-offset: 2px; }

.es-cc-modal__foot {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 18px 26px 22px;
  border-top: 1px solid var(--cc-line-soft);
}

@media (max-width: 560px) {
  .es-cc__actions { flex-direction: column; align-items: stretch; }
  .es-cc__btn { width: 100%; text-align: center; }
  .es-cc__spacer { display: none; }
  .es-cc-modal__foot { flex-direction: column; align-items: stretch; }
  .es-cc-modal__foot .es-cc__btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .es-cc, .es-cc-modal, .es-cc-modal__card { transition-duration: 0.001s; }
}
