/* GDPR Cookie Consent UI */
:root {
  --kioo-primary: #1a5f5f;
  --kioo-accent: #f39c4f;
  --kioo-bg: #ffffff;
  --kioo-text: #1f2937;
}

.cookie-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  z-index: 9998;
  opacity: 0;
  animation: cookieFadeIn 0.28s ease forwards;
}

.cookie-banner {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  width: min(760px, calc(100% - 24px));
  background: var(--kioo-bg);
  border: 1px solid #d1d5db;
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.18);
  padding: 20px;
  z-index: 9999;
  opacity: 0;
  animation: cookieSlideUp 0.34s ease forwards;
}

.cookie-title {
  margin: 0 0 8px;
  font-size: 1.1rem;
  color: var(--kioo-primary);
  font-weight: 700;
}

.cookie-text {
  margin: 0 0 14px;
  line-height: 1.6;
  color: var(--kioo-text);
  font-size: 0.97rem;
}

.cookie-link {
  color: var(--kioo-primary);
  text-decoration: underline;
  font-weight: 600;
}

.cookie-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.cookie-btn {
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.cookie-btn:hover {
  transform: translateY(-1px);
}

.cookie-btn-primary {
  background: var(--kioo-primary);
  color: #fff;
}

.cookie-btn-secondary {
  background: #e5e7eb;
  color: #111827;
}

.cookie-btn-accent {
  background: var(--kioo-accent);
  color: #fff;
}

.cookie-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(560px, calc(100% - 24px));
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.22);
  padding: 20px;
  z-index: 10000;
  opacity: 0;
  animation: cookieFadeIn 0.22s ease forwards;
}

.cookie-modal h2 {
  margin: 0 0 10px;
  color: var(--kioo-primary);
  font-size: 1.25rem;
}

.cookie-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #f3f4f6;
}

.cookie-option:last-child {
  border-bottom: 0;
}

.cookie-option-label {
  font-weight: 600;
  color: #111827;
}

.cookie-option-help {
  font-size: 0.86rem;
  color: #6b7280;
  margin-top: 3px;
}

.cookie-switch {
  width: 44px;
  height: 24px;
  appearance: none;
  border-radius: 999px;
  background: #d1d5db;
  position: relative;
  cursor: pointer;
  transition: background 0.2s ease;
}

.cookie-switch:checked {
  background: var(--kioo-primary);
}

.cookie-switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: white;
  transition: left 0.2s ease;
}

.cookie-switch:checked::after {
  left: 23px;
}

.cookie-switch:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.cookie-settings-link {
  color: #ffffff;
  text-decoration: underline;
  font-size: 0.9rem;
  font-weight: 600;
}

.cookie-settings-link.light {
  color: var(--kioo-primary);
}

.cookie-hidden {
  display: none !important;
}

@keyframes cookieFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes cookieSlideUp {
  from {
    opacity: 0;
    transform: translate(-50%, 14px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@media (max-width: 640px) {
  .cookie-banner,
  .cookie-modal {
    padding: 16px;
    border-radius: 14px;
  }

  .cookie-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}
