/* =========================================================
   COOKIE DESIGN TOKENS – PROJEKTKONFORM
========================================================= */

:root {
  --cookie-bg: linear-gradient(180deg, var(--surface), var(--surface-muted));

  --cookie-text: var(--text);
  --cookie-muted: var(--muted);

  --cookie-border: var(--border);
  --cookie-soft: color-mix(in srgb, var(--brand) 8%, transparent);

  --cookie-accent: var(--brand);
  --cookie-accent-soft: color-mix(in srgb, var(--brand) 28%, transparent);

  --cookie-radius: 18px;
  --cookie-shadow: var(--shadow);
}

/* =========================================================
   OVERLAY
========================================================= */

.cookie-banner {
  position: fixed;
  inset: 0;

  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);

  display: flex;
  align-items: center;
  justify-content: center;

  z-index: 9999;
}

/* =========================================================
   CARD
========================================================= */

.cookie-card {
  background: var(--cookie-bg);
  color: var(--cookie-text);
  border: 1px solid var(--cookie-border);

  width: min(92vw, 460px);
  padding: 2rem 2.1rem;

  border-radius: var(--cookie-radius);
  box-shadow: var(--cookie-shadow);

  animation: cookieFadeIn 0.25s ease;
}

@keyframes cookieFadeIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* =========================================================
   BRAND
========================================================= */

.cookie-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.cookie-brand__logo {
  height: 34px;
  width: auto;
}

.cookie-brand__name {
  font-size: 0.95rem;
  font-weight: 700;
}

/* =========================================================
   TYPOGRAPHY
========================================================= */

.cookie-card h2 {
  margin: 0 0 0.6rem;
  font-size: 1.3rem;
  font-weight: 600;
}

.cookie-card p {
  margin: 0 0 1.3rem;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--cookie-muted);
}

/* =========================================================
   OPTIONS (CHECKBOXES)
========================================================= */

.cookie-option {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  margin-bottom: 0.85rem;
  font-size: 0.95rem;
}

.cookie-option__hint {
  display: block;
  font-size: 0.75rem;
  color: var(--cookie-muted);
  margin-top: 0.2rem;
}

/* Checkbox */
.cookie-option input[type="checkbox"] {
  appearance: none;

  width: 22px;
  height: 22px;
  min-width: 22px;

  border-radius: 7px;
  border: 2px solid var(--cookie-accent);
  background: var(--surface);

  cursor: pointer;
  position: relative;

  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

/* Checked */
.cookie-option input[type="checkbox"]:checked {
  background: var(--cookie-accent);
  border-color: var(--cookie-accent);
  box-shadow: 0 0 0 3px var(--cookie-accent-soft);
}

.cookie-option input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 13l4 4L19 7' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 16px 16px;
}

/* Disabled */
.cookie-option input[type="checkbox"]:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* =========================================================
   ACTIONS (BUTTONS)
========================================================= */

.cookie-actions {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1.4rem;
}

.cookie-actions .btn {
  min-height: 40px;
  padding: 0 1.25rem;

  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;

  border-radius: 999px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;
  transition:
    background 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.15s ease;
}

/* Secondary */
.cookie-actions .btn.secondary {
  background: transparent;
  color: var(--cookie-text);
  border: 1px solid var(--cookie-border);
}

.cookie-actions .btn.secondary:hover {
  background: var(--cookie-soft);
}

/* Primary */
.cookie-actions .btn.primary {
  background: var(--cookie-accent);
  color: #fff;
  border: none;
  box-shadow: var(--shadow);
}

.cookie-actions .btn.primary:hover {
  transform: translateY(-1px);
  box-shadow:
    var(--shadow),
    0 0 0 3px var(--cookie-accent-soft);
}

/* =========================================================
   FOOTER
========================================================= */

.cookie-footer-links {
  margin-top: 0.8rem;
  font-size: 0.78rem;
  text-align: center;
}

.cookie-footer-links a {
  color: var(--brand);
  text-decoration: underline;
}

.cookie-footer {
  margin-top: 0.9rem;
  font-size: 0.75rem;
  text-align: center;
  color: var(--cookie-muted);
}

/* =========================================================
   FLOATING COOKIE FAB
========================================================= */

.cookie-fab {
  position: fixed;
  bottom: 1.25rem;
  left: 1.25rem;

  width: 44px;
  height: 44px;
  border-radius: 50%;

  background: var(--brand);
  color: #fff;
  border: none;

  box-shadow: var(--shadow);

  cursor: pointer;
  z-index: 9998;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.cookie-fab:hover {
  transform: translateY(-2px);
  box-shadow:
    var(--shadow),
    0 0 0 3px var(--cookie-accent-soft);
}

/* =========================================================
   UTILITIES
========================================================= */

.hidden {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

@media (max-width: 480px) {
  .cookie-card {
    padding: 1.5rem 1.25rem;
  }

  .cookie-actions {
    flex-direction: column-reverse;
  }

  .cookie-actions .btn {
    width: 100%;
  }
}
