/* ============================================================
   COLLIBARI – Cookie-Banner
   Einbinden in index.html und alle öffentlichen Seiten:
   <link rel="stylesheet" href="css/cookie.css" />
   <script src="js/cookie.js" defer></script>
   ============================================================ */

#cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 9999;
  background: rgba(26, 16, 51, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 20px 24px;
  display: none; /* via JS eingeblendet */
  animation: slideUp 0.35s ease forwards;
}

@keyframes slideUp {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.cookie-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.cookie-text {
  flex: 1;
  min-width: 260px;
}

.cookie-text strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.cookie-text p {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.55;
  margin: 0;
}

.cookie-text a {
  color: #A78BFA;
  font-weight: 600;
}

.cookie-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.cookie-btn {
  padding: 9px 20px;
  border-radius: 10px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  white-space: nowrap;
}

.cookie-btn--accept {
  background: linear-gradient(135deg, #7C3AED, #2DD4BF);
  color: #fff;
  box-shadow: 0 4px 14px rgba(124,58,237,0.35);
}
.cookie-btn--accept:hover { opacity: 0.9; transform: translateY(-1px); }

.cookie-btn--essential {
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.75);
  border: 1px solid rgba(255,255,255,0.12);
}
.cookie-btn--essential:hover { background: rgba(255,255,255,0.13); }

.cookie-btn--settings {
  background: transparent;
  color: rgba(255,255,255,0.45);
  font-size: 0.78rem;
  padding: 9px 12px;
}
.cookie-btn--settings:hover { color: rgba(255,255,255,0.7); }

/* Cookie-Detail-Modal */
#cookie-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.cookie-modal-box {
  background: #fff;
  border-radius: 20px;
  padding: 36px;
  max-width: 520px;
  width: 100%;
  box-shadow: 0 32px 80px rgba(0,0,0,0.25);
  position: relative;
}
.cookie-modal-box h2 { font-size: 1.15rem; font-weight: 800; margin-bottom: 20px; }
.cookie-modal-close {
  position: absolute; top:14px; right:14px;
  background: #F3F4F6; border: none; border-radius: 8px;
  width: 30px; height: 30px; cursor: pointer; font-size: 0.9rem; color: #6B7280;
}
.cookie-cat { margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid #E5E7EB; }
.cookie-cat:last-of-type { border-bottom: none; }
.cookie-cat__header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.cookie-cat__title { font-size: 0.9rem; font-weight: 700; }
.cookie-cat p { font-size: 0.82rem; color: #6B7280; line-height: 1.55; }
.cookie-toggle { position: relative; width: 40px; height: 22px; }
.cookie-toggle input { opacity: 0; width: 0; height: 0; }
.cookie-toggle-slider {
  position: absolute; inset: 0; background: #D1D5DB; border-radius: 100px;
  cursor: pointer; transition: background 0.2s;
}
.cookie-toggle-slider::before {
  content: ''; position: absolute; width: 16px; height: 16px;
  background: #fff; border-radius: 50%; top: 3px; left: 3px;
  transition: transform 0.2s; box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.cookie-toggle input:checked + .cookie-toggle-slider { background: #7C3AED; }
.cookie-toggle input:checked + .cookie-toggle-slider::before { transform: translateX(18px); }
.cookie-toggle input:disabled + .cookie-toggle-slider { opacity: 0.6; cursor: not-allowed; }
.cookie-modal-actions { display: flex; gap: 10px; margin-top: 24px; }
.cookie-modal-actions button { flex: 1; padding: 11px; border-radius: 10px; font-family: inherit; font-weight: 700; font-size: 0.88rem; cursor: pointer; border: none; }
.btn-save-pref { background: linear-gradient(135deg,#7C3AED,#2DD4BF); color:#fff; }
.btn-accept-all-modal { background: #F3F4F6; color: #1A1033; }

@media (max-width: 640px) {
  .cookie-inner { gap: 16px; }
  .cookie-actions { width: 100%; justify-content: flex-end; }
}
