/* ============================================================
   MEINRENTENKOMPASS — cookies.css
   Cookie-Banner + Einstellungs-Panel (DSGVO)
============================================================ */

/* ══════════════════════════════════════════
   BANNER (unten zentriert)
══════════════════════════════════════════ */
.cookie-banner {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(140px);
  z-index: 9999;
  width: min(800px, calc(100vw - 2rem));
  background: #0f1c2e;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(15,28,46,0.5), 0 0 0 1px rgba(255,255,255,0.07);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.45s cubic-bezier(0.34,1.56,0.64,1),
              opacity 0.35s ease,
              visibility 0.35s;
}
.cookie-banner.visible {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.cookie-banner-inner {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 1.2rem 1.4rem;
  flex-wrap: wrap;
}
.cookie-banner-icon {
  flex-shrink: 0;
  width: 46px; height: 46px;
  background: rgba(184,136,42,0.15);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  color: #b8882a;
}
.cookie-banner-text { flex: 1; min-width: 220px; }
.cookie-banner-title {
  font-family: var(--font-title, sans-serif);
  font-size: 0.88rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 0.2rem;
}
.cookie-banner-desc {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.5);
  line-height: 1.6;
  margin: 0;
}
.cookie-banner-desc a {
  color: #d4a942;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.cookie-banner-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  flex-wrap: wrap;
}

/* ══════════════════════════════════════════
   BUTTONS
══════════════════════════════════════════ */
.cookie-btn {
  font-family: var(--font-title, sans-serif);
  font-size: 0.8rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  border-radius: 8px;
  padding: 0.6rem 1.2rem;
  transition: all 0.22s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  line-height: 1;
}
.cookie-btn-settings {
  background: rgba(255,255,255,0.09);
  color: rgba(255,255,255,0.75);
  border: 1px solid rgba(255,255,255,0.14);
}
.cookie-btn-settings:hover {
  background: rgba(255,255,255,0.15);
  color: #fff;
}
.cookie-btn-reject {
  background: rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.6);
  border: 1px solid rgba(255,255,255,0.12);
}
.cookie-btn-reject:hover {
  background: rgba(255,255,255,0.13);
  color: #fff;
}
.cookie-btn-accept {
  background: var(--gold, #b8882a);
  color: #fff;
  border: 1px solid transparent;
}
.cookie-btn-accept:hover {
  background: #d4a942;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(184,136,42,0.4);
}

/* ══════════════════════════════════════════
   OVERLAY
══════════════════════════════════════════ */
.cookie-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15,28,46,0.55);
  z-index: 9997;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.cookie-overlay.open { display: block; }

/* ══════════════════════════════════════════
   PANEL (Schiebeleiste von rechts)
══════════════════════════════════════════ */
.cookie-panel {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(420px, 100vw);
  background: #ffffff;
  z-index: 9998;
  transform: translateX(110%);
  transition: transform 0.38s cubic-bezier(0.4,0,0.2,1);
  display: flex;
  flex-direction: column;
  box-shadow: -16px 0 60px rgba(15,28,46,0.2);
}
.cookie-panel.open {
  transform: translateX(0);
}

/* Panel Header */
.cookie-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem 1.5rem;
  border-bottom: 1px solid #ede8ec;
  flex-shrink: 0;
  background: #fff;
}
.cookie-panel-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.cookie-panel-icon {
  width: 36px; height: 36px;
  background: #f9eef2;
  border: 1px solid #e8d0d8;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  color: var(--gold, #b8882a);
  flex-shrink: 0;
}
.cookie-panel-title {
  font-family: var(--font-title, sans-serif);
  font-size: 1rem;
  font-weight: 700;
  color: #1a0a10;
  margin: 0;
}
.cookie-panel-close {
  width: 34px; height: 34px;
  background: #f5f0f2;
  border: none;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: #6b5a62;
  transition: all 0.2s;
  flex-shrink: 0;
}
.cookie-panel-close:hover {
  background: #ede8ec;
  color: #1a0a10;
}

/* Panel Body */
.cookie-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.cookie-panel-intro {
  font-size: 0.83rem;
  color: #8a7880;
  line-height: 1.75;
  margin: 0 0 1.5rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid #ede8ec;
}

/* Kategorien */
.cookie-category {
  border-bottom: 1px solid #ede8ec;
  padding: 1.2rem 0;
}
.cookie-category:last-child { border-bottom: none; }
.cookie-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.cookie-category-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.cookie-category-name {
  font-family: var(--font-title, sans-serif);
  font-size: 0.9rem;
  font-weight: 700;
  color: #1a0a10;
}
.cookie-category-desc {
  font-size: 0.78rem;
  color: #8a7880;
  line-height: 1.6;
}

/* "Immer aktiv" Badge */
.cookie-toggle-label {
  font-family: var(--font-title, sans-serif);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--gold, #b8882a);
  background: #f9eef2;
  border: 1px solid #e8d0d8;
  border-radius: 100px;
  padding: 0.25rem 0.75rem;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Toggle Switch */
.cookie-toggle-switch {
  flex-shrink: 0;
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}
.cookie-checkbox {
  position: absolute;
  opacity: 0;
  width: 0; height: 0;
  pointer-events: none;
}
.cookie-slider {
  display: block;
  width: 48px; height: 28px;
  background: #ddd6da;
  border-radius: 100px;
  border: 2px solid #ccc4c8;
  transition: background 0.25s ease, border-color 0.25s ease;
  position: relative;
}
.cookie-slider::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 18px; height: 18px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(15,28,46,0.25);
  transition: transform 0.25s cubic-bezier(0.34,1.56,0.64,1);
}
.cookie-checkbox:checked + .cookie-slider {
  background: var(--gold, #b8882a);
  border-color: var(--gold, #b8882a);
}
.cookie-checkbox:checked + .cookie-slider::after {
  transform: translateX(20px);
}
.cookie-checkbox:focus-visible + .cookie-slider {
  outline: 2px solid var(--gold, #b8882a);
  outline-offset: 2px;
}

/* Panel Footer */
.cookie-panel-footer {
  padding: 1.2rem 1.5rem;
  border-top: 1px solid #ede8ec;
  display: flex;
  gap: 0.7rem;
  flex-shrink: 0;
  background: #fff;
}
.cookie-panel-footer .cookie-btn {
  flex: 1;
}
.cookie-panel-footer .cookie-btn-reject {
  background: #f5f0f2;
  color: #6b5a62;
  border: 1.5px solid #ede8ec;
}
.cookie-panel-footer .cookie-btn-reject:hover {
  background: #ede8ec;
  color: #1a0a10;
  border-color: #ccc4c8;
}

/* ══════════════════════════════════════════
   SCHWEBENDER BUTTON
══════════════════════════════════════════ */
.cookie-float-btn {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  z-index: 9990;
  width: 44px; height: 44px;
  background: #0f1c2e;
  color: #d4a942;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(15,28,46,0.35);
  transition: all 0.25s ease;
  opacity: 0.8;
}
.cookie-float-btn:hover {
  opacity: 1;
  transform: scale(1.1);
  box-shadow: 0 8px 28px rgba(15,28,46,0.45);
}

/* ══════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════ */
@media (max-width: 640px) {
  .cookie-banner {
    bottom: 0; left: 0; right: 0;
    width: 100%;
    border-radius: 16px 16px 0 0;
    transform: translateY(140px);
  }
  .cookie-banner.visible {
    transform: translateY(0);
  }
  .cookie-banner-inner { flex-direction: column; gap: 1rem; padding: 1.2rem; }
  .cookie-banner-icon  { display: none; }
  .cookie-banner-actions { width: 100%; justify-content: stretch; }
  .cookie-banner-actions .cookie-btn { flex: 1; justify-content: center; }
  .cookie-panel { width: 100vw; }
  .cookie-float-btn { bottom: 1rem; left: 1rem; }
}
