/* ===== Cookie Consent — DSGVO/TKG 2021 ===== */

.cookie-overlay {
  position: fixed; inset: 0; z-index: 9998;
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex; align-items: flex-end; justify-content: center;
  padding: 0;
  opacity: 0; transition: opacity .25s ease;
}
.cookie-overlay.is-visible { opacity: 1; }
.cookie-overlay[hidden] { display: none !important; }

.cookie-box {
  background: #fff;
  width: 100%; max-width: 780px;
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -8px 40px rgba(0,0,0,.18);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(20px);
  transition: transform .3s ease;
}
.cookie-overlay.is-visible .cookie-box { transform: translateY(0); }

.cookie-header { display: flex; align-items: center; gap: .75rem; margin-bottom: .75rem; }
.cookie-header svg { flex-shrink: 0; }
.cookie-header h2 { font-size: 1.1rem; font-weight: 700; margin: 0; color: #0a0a0a; }

.cookie-intro { font-size: .875rem; color: #444; line-height: 1.6; margin: 0 0 1.25rem; }
.cookie-intro a { color: #c8a24a; text-decoration: underline; }

/* Category list */
.cookie-cats { display: flex; flex-direction: column; gap: .75rem; margin-bottom: 1.5rem; }

.cookie-cat {
  border: 1px solid rgba(0,0,0,.1);
  border-radius: 12px;
  overflow: hidden;
}
.cookie-cat__head {
  display: flex; align-items: center; gap: .75rem;
  padding: .9rem 1rem;
  cursor: pointer;
  user-select: none;
  background: #f9f8f6;
  transition: background .15s;
}
.cookie-cat__head:hover { background: #f3f1ec; }
.cookie-cat__info { flex: 1; }
.cookie-cat__name { font-size: .9rem; font-weight: 600; color: #0a0a0a; display: block; }
.cookie-cat__desc { font-size: .78rem; color: #666; margin-top: .15rem; line-height: 1.5; }
.cookie-cat__body {
  padding: .75rem 1rem;
  font-size: .8rem; color: #555; line-height: 1.6;
  border-top: 1px solid rgba(0,0,0,.07);
  background: #fff;
  display: none;
}
.cookie-cat.is-open .cookie-cat__body { display: block; }
.cookie-cat__body ul { margin: .4rem 0 0 1rem; padding: 0; }
.cookie-cat__body li { margin-bottom: .2rem; }

.cookie-cat__chevron {
  transition: transform .2s;
  flex-shrink: 0;
  color: #888;
}
.cookie-cat.is-open .cookie-cat__chevron { transform: rotate(180deg); }

/* Toggle switch */
.cookie-toggle {
  position: relative;
  width: 44px; height: 26px;
  flex-shrink: 0;
}
.cookie-toggle input {
  opacity: 0; width: 0; height: 0; position: absolute;
}
.cookie-toggle__track {
  position: absolute; inset: 0;
  background: #d1d1d1;
  border-radius: 13px;
  transition: background .2s;
  cursor: pointer;
}
.cookie-toggle input:checked + .cookie-toggle__track { background: #c8a24a; }
.cookie-toggle input:disabled + .cookie-toggle__track { background: #c8a24a; cursor: not-allowed; opacity: .7; }
.cookie-toggle__track::after {
  content: '';
  position: absolute;
  left: 3px; top: 3px;
  width: 20px; height: 20px;
  background: #fff;
  border-radius: 50%;
  transition: transform .2s;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
}
.cookie-toggle input:checked + .cookie-toggle__track::after { transform: translateX(18px); }

/* Buttons */
.cookie-actions {
  display: flex; flex-wrap: wrap; gap: .625rem;
  justify-content: flex-end;
}
.cookie-btn {
  padding: .65rem 1.25rem;
  border-radius: 999px;
  font-size: .825rem; font-weight: 600;
  letter-spacing: .04em;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: background .15s, color .15s, border-color .15s;
  white-space: nowrap;
}
.cookie-btn--ghost {
  background: transparent;
  border-color: rgba(0,0,0,.2);
  color: #333;
}
.cookie-btn--ghost:hover { background: #f0ece4; border-color: rgba(0,0,0,.3); }
.cookie-btn--primary {
  background: #0a0a0a;
  color: #fff;
  border-color: #0a0a0a;
}
.cookie-btn--primary:hover { background: #2a2a2c; }
.cookie-btn--accent {
  background: #c8a24a;
  color: #fff;
  border-color: #c8a24a;
}
.cookie-btn--accent:hover { background: #b08c3c; }

/* Legal note */
.cookie-legal {
  margin-top: 1rem;
  font-size: .72rem; color: #999; text-align: center; line-height: 1.5;
}
.cookie-legal a { color: #c8a24a; }

/* Footer badge */
.cookie-settings-badge {
  display: inline-flex; align-items: center; gap: .3rem;
  font-size: .75rem; color: #888;
  cursor: pointer;
  background: none; border: none; padding: 0;
  text-decoration: underline; text-underline-offset: 2px;
  transition: color .15s;
}
.cookie-settings-badge:hover { color: #c8a24a; }

@media (max-width: 540px) {
  .cookie-actions { flex-direction: column; }
  .cookie-btn { text-align: center; }
}
