/* Cookie Consent Banner & Preferences Panel */

/* ── Banner (fixed bottom bar) ── */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: cookie-slide-up 0.4s ease-out;
}

@keyframes cookie-slide-up {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.cookie-banner-inner {
  max-width: 960px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: rgba(140, 70, 45, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 120, 70, 0.35);
  border-radius: 16px;
  padding: 20px 28px;
}

.cookie-banner-text {
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  line-height: 1.5;
  flex: 1;
}

.cookie-banner-text a {
  color: #f59e0b;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-banner-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.cookie-btn-accept {
  background: #f59e0b;
  color: #000;
  font-weight: 700;
  font-size: 14px;
  padding: 10px 24px;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}

.cookie-btn-accept:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.4);
}

.cookie-btn-settings {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  cursor: pointer;
  padding: 10px 4px;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.cookie-btn-settings:hover {
  color: #fff;
}

/* ── Preferences Panel (modal overlay) ── */
.cookie-prefs-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: cookie-fade-in 0.2s ease-out;
}

@keyframes cookie-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.cookie-prefs-card {
  position: relative;
  width: 100%;
  max-width: 460px;
  background: rgba(20, 20, 25, 0.95);
  backdrop-filter: saturate(140%) brightness(110%) contrast(105%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 40px 32px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
}

.cookie-prefs-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.6);
  font-size: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cookie-prefs-close:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.cookie-prefs-title {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 24px 0;
}

/* ── Category rows ── */
.cookie-category {
  padding: 16px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.cookie-category:last-of-type {
  border-bottom: none;
}

.cookie-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cookie-category-name {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
}

.cookie-category-desc {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 6px;
  line-height: 1.4;
}

/* ── Toggle switch ── */
.cookie-toggle {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.cookie-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.cookie-toggle-track {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.cookie-toggle input:checked + .cookie-toggle-track {
  background: #f59e0b;
}

.cookie-toggle-track::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  top: 3px;
  left: 3px;
  transition: transform 0.2s ease;
}

.cookie-toggle input:checked + .cookie-toggle-track::after {
  transform: translateX(20px);
}

/* Disabled toggle (essential — always on) */
.cookie-toggle.disabled .cookie-toggle-track {
  background: rgba(245, 158, 11, 0.5);
  cursor: not-allowed;
  opacity: 0.6;
}

.cookie-toggle.disabled input:checked + .cookie-toggle-track {
  background: rgba(245, 158, 11, 0.5);
}

.cookie-required-badge {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
  font-style: italic;
  margin-left: 8px;
}

/* ── Save button ── */
.cookie-btn-save {
  display: block;
  width: 100%;
  margin-top: 24px;
  background: #f59e0b;
  color: #000;
  font-weight: 700;
  font-size: 14px;
  padding: 12px 24px;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cookie-btn-save:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.4);
}

/* ── Google SSO consent notice ── */
.google-consent-notice {
  text-align: center;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.google-consent-notice p {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
  margin: 0 0 8px 0;
  line-height: 1.4;
}

.google-consent-notice a {
  color: #f59e0b;
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  background: none;
  border: none;
  padding: 0;
}

/* ── Mobile responsive ── */
@media (max-width: 640px) {
  .cookie-banner {
    padding: 12px;
  }

  .cookie-banner-inner {
    flex-direction: column;
    text-align: center;
    gap: 14px;
    padding: 18px 20px;
  }

  .cookie-banner-actions {
    width: 100%;
    justify-content: center;
  }

  .cookie-prefs-card {
    padding: 28px 20px;
  }
}
