/* ============================================================
   Efimow Consent Manager — TTDSG (§ 25) / DSGVO-konformer
   Cookie-Consent. Optik an styles.css gekoppelt (Fallbacks
   inline, falls separat eingebunden).
   ============================================================ */

.ec-root, .ec-root * { box-sizing: border-box; }
.ec-hidden { display: none !important; }

/* ---------- Banner (erste Einwilligungsebene) ---------- */
.ec-banner {
  position: fixed; z-index: 9999;
  left: 50%; bottom: 18px; transform: translateX(-50%);
  width: min(700px, calc(100% - 28px));
  padding: 22px 24px;
  background: var(--surface, #0c111c);
  border: 1px solid var(--line-strong, rgba(120, 150, 220, 0.25));
  border-radius: 18px;
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.85);
  color: var(--text, #eef2f9);
  font-family: var(--font-body, "Outfit", sans-serif);
  animation: ec-rise 0.4s var(--ease, cubic-bezier(0.22, 1, 0.36, 1));
}
@keyframes ec-rise {
  from { opacity: 0; transform: translate(-50%, 16px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

.ec-title {
  margin: 0 0 8px;
  font-family: var(--font-display, "Unbounded", sans-serif);
  font-weight: 700; font-size: 0.95rem;
  text-transform: uppercase; letter-spacing: -0.01em;
}
.ec-text {
  margin: 0 0 18px;
  font-size: 0.9rem; line-height: 1.55;
  color: var(--muted, #98a1b3);
}
.ec-text a {
  color: var(--blue-bright, #4d8cff);
  border-bottom: 1px dotted rgba(77, 140, 255, 0.4);
}
.ec-text a:hover { color: #fff; }

/* ---------- Buttons ---------- */
.ec-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ec-actions__primary { display: flex; gap: 10px; margin-left: auto; }

.ec-btn {
  font-family: var(--font-body, "Outfit", sans-serif);
  font-weight: 500; font-size: 0.9rem;
  padding: 11px 20px; border-radius: 11px;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: transform 0.2s, background 0.2s, border-color 0.2s, color 0.2s;
}
.ec-btn:focus-visible { outline: 2px solid var(--blue-bright, #4d8cff); outline-offset: 2px; }

/* "Ablehnen" und "Akzeptieren" sind bewusst gleich prominent (TTDSG/DSGVO). */
.ec-btn--accept {
  background: var(--blue, #2e6fe0); color: #fff;
  box-shadow: 0 8px 28px -8px rgba(46, 111, 224, 0.55);
}
.ec-btn--accept:hover { background: var(--blue-bright, #4d8cff); transform: translateY(-2px); }

.ec-btn--reject {
  background: var(--surface-2, #101726); color: var(--text, #eef2f9);
  border-color: var(--line-strong, rgba(120, 150, 220, 0.25));
}
.ec-btn--reject:hover { border-color: rgba(120, 150, 220, 0.45); transform: translateY(-2px); }

.ec-btn--ghost { background: transparent; color: var(--muted, #98a1b3); padding: 11px 14px; }
.ec-btn--ghost:hover { color: var(--text, #eef2f9); }

.ec-btn--save {
  background: var(--blue, #2e6fe0); color: #fff; margin-left: auto;
  box-shadow: 0 8px 28px -8px rgba(46, 111, 224, 0.55);
}
.ec-btn--save:hover { background: var(--blue-bright, #4d8cff); transform: translateY(-2px); }

/* ---------- Einstellungen (zweite Ebene, Dialog) ---------- */
.ec-modal {
  position: fixed; inset: 0; z-index: 10000;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  background: rgba(2, 4, 8, 0.7);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  animation: ec-fade 0.25s ease;
}
@keyframes ec-fade { from { opacity: 0; } to { opacity: 1; } }

.ec-dialog {
  width: min(560px, 100%); max-height: min(86vh, 760px); overflow: auto;
  padding: 28px;
  background: var(--bg-elev, #090d15);
  border: 1px solid var(--line-strong, rgba(120, 150, 220, 0.25));
  border-radius: 20px;
  box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.9);
  font-family: var(--font-body, "Outfit", sans-serif);
  color: var(--text, #eef2f9);
}
.ec-dialog__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.ec-dialog__head .ec-title { font-size: 1.05rem; }
.ec-dialog__lead { margin: 6px 0 6px; font-size: 0.88rem; line-height: 1.55; color: var(--muted, #98a1b3); }
.ec-dialog__lead a { color: var(--blue-bright, #4d8cff); border-bottom: 1px dotted rgba(77, 140, 255, 0.4); }

.ec-close {
  flex: 0 0 auto; background: none; border: none; cursor: pointer;
  color: var(--faint, #5d6678); font-size: 1.6rem; line-height: 1; padding: 2px 6px;
}
.ec-close:hover { color: var(--text, #eef2f9); }
.ec-close:focus-visible { outline: 2px solid var(--blue-bright, #4d8cff); outline-offset: 2px; border-radius: 6px; }

.ec-cat {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 18px;
  padding: 18px 0; border-top: 1px solid var(--line, rgba(120, 150, 220, 0.13));
}
.ec-cat:first-of-type { margin-top: 8px; }
.ec-cat__name { margin: 0 0 5px; font-weight: 600; font-size: 0.95rem; }
.ec-cat__desc { margin: 0; font-size: 0.83rem; line-height: 1.5; color: var(--muted, #98a1b3); }
.ec-cat__tag { font-family: var(--font-mono, monospace); font-size: 0.66rem; letter-spacing: 0.08em; color: var(--faint, #5d6678); text-transform: uppercase; }

/* ---------- Toggle-Switch ---------- */
.ec-switch { position: relative; flex: 0 0 auto; width: 46px; height: 26px; }
.ec-switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.ec-switch__track {
  position: absolute; inset: 0; border-radius: 99px;
  background: var(--surface-2, #101726);
  border: 1px solid var(--line-strong, rgba(120, 150, 220, 0.25));
  transition: background 0.2s, border-color 0.2s;
}
.ec-switch__track::after {
  content: ""; position: absolute; top: 50%; left: 3px; transform: translateY(-50%);
  width: 18px; height: 18px; border-radius: 50%; background: var(--faint, #5d6678);
  transition: transform 0.2s, background 0.2s;
}
.ec-switch input:checked + .ec-switch__track { background: rgba(46, 111, 224, 0.25); border-color: var(--blue, #2e6fe0); }
.ec-switch input:checked + .ec-switch__track::after { transform: translate(20px, -50%); background: var(--blue-bright, #4d8cff); }
.ec-switch input:disabled { cursor: not-allowed; }
.ec-switch input:disabled + .ec-switch__track { opacity: 0.55; }
.ec-switch input:focus-visible + .ec-switch__track { outline: 2px solid var(--blue-bright, #4d8cff); outline-offset: 2px; }

.ec-dialog__foot { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; padding-top: 4px; }

/* ---------- "Cookie-Einstellungen"-Button im Footer ---------- */
button[data-cookie-settings] {
  background: none; border: none; padding: 0; margin: 0;
  font: inherit; color: inherit; letter-spacing: inherit; cursor: pointer;
}
button[data-cookie-settings]:hover { color: var(--text, #eef2f9); }
/* Footer-Grid-Variante (index.html): an die übrigen Footer-Links angleichen */
.footer-grid ul button[data-cookie-settings] { color: var(--muted, #98a1b3); font-size: 0.93rem; }
.footer-grid ul button[data-cookie-settings]:hover { color: var(--text, #eef2f9); }

/* ---------- Responsive ---------- */
@media (max-width: 560px) {
  .ec-actions { flex-direction: column; align-items: stretch; }
  .ec-actions__primary { margin-left: 0; flex-direction: column; }
  .ec-btn { width: 100%; text-align: center; }
  .ec-btn--ghost { order: 3; }
  .ec-dialog__foot .ec-btn { width: 100%; text-align: center; }
  .ec-btn--save { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .ec-banner, .ec-modal { animation: none; }
  .ec-btn:hover, .ec-btn--save:hover { transform: none; }
}
