/* Cookie Consent Banner --------------------------------------------------- */
.cookie-consent {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 12000;
  display: none;
  justify-content: center;
  padding: clamp(1rem, 3vw, 2rem);
  pointer-events: none;
}

.cookie-consent[data-open="true"] {
  display: flex;
}

.cookie-consent[hidden] {
  display: none !important;
}

html.no-js .cookie-consent {
  display: block;
  position: static;
  inset: auto;
  padding: clamp(1rem, 3vw, 2rem);
  pointer-events: auto;
}

html.no-js .cookie-consent::before {
  content: none;
}

html.no-js .cookie-consent__card {
  width: 100%;
  max-width: 60rem;
  margin: 0 auto;
  box-shadow: none;
}

html.no-js .cookie-consent__actions {
  display: none;
}

.cookie-consent::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(160deg, rgba(199, 58, 31, 0.18) 0%, rgba(46, 111, 78, 0.16) 100%),
    rgba(252, 247, 237, 0.86);
  backdrop-filter: blur(18px);
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition-base);
  z-index: 0;
}

.cookie-consent[data-open="true"]::before {
  opacity: 1;
}

.cookie-consent__card {
  pointer-events: auto;
  background: color-mix(in srgb, var(--color-surface) 88%, var(--color-white) 12%);
  border: 1px solid color-mix(in srgb, var(--color-border) 86%, var(--color-surface-contrast) 14%);
  border-radius: var(--radius-md);
  box-shadow: 0 18px 48px rgba(87, 68, 40, 0.28);
  width: min(960px, 100%);
  padding: clamp(1.4rem, 2vw + 1rem, 2.1rem);
  display: grid;
  gap: clamp(1rem, 2vw, 1.35rem);
  position: relative;
  z-index: 1;
}

.cookie-consent__header {
  display: grid;
  gap: 0.6rem;
}

.cookie-consent__title {
  margin: 0;
  font-size: clamp(1.35rem, 1.6vw, 1.65rem);
  font-weight: 800;
}

.cookie-consent__description {
  margin: 0;
  color: var(--color-text-muted);
  max-width: 70ch;
}

.cookie-consent__options {
  display: grid;
  gap: clamp(0.75rem, 1.2vw, 1rem);
}

.cookie-consent__group {
  margin: 0;
  padding: 0;
  border: none;
  display: grid;
  gap: 0.45rem;
}

.cookie-consent__group-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.cookie-consent__option {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.95rem;
  line-height: 1.4;
  color: var(--color-text-muted);
}

.cookie-consent__option input[type="checkbox"] {
  margin-top: 0.15rem;
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--color-secondary);
}

.cookie-consent__hint {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.cookie-consent__fallback {
  margin: 0;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.cookie-consent__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.cookie-consent__save {
  background: transparent;
  border: 1px solid rgba(46, 111, 78, 0.4);
  color: var(--color-secondary);
  padding: 0.75rem 1.4rem;
  border-radius: 999px;
}
.cookie-consent__save:hover {
  background: rgba(46, 111, 78, 0.08);
}
.cookie-consent__save:focus-visible {
  outline: 3px solid var(--color-secondary);
  outline-offset: 4px;
}

.cookie-consent__legal {
  margin: 0;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.cookie-consent__legal a {
  color: inherit;
  font-weight: 600;
}

.cookie-manage-link {
  background: none;
  border: none;
  color: var(--color-accent-teal);
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}
.cookie-manage-link:hover {
  text-decoration: none;
}
.cookie-manage-link:focus-visible {
  outline: 3px solid var(--color-accent-teal);
  outline-offset: 3px;
}

@media (max-width: 720px) {
  .cookie-consent {
    padding: clamp(0.75rem, 3vw, 1.25rem);
  }
  .cookie-consent__card {
    border-radius: var(--radius-sm);
    padding: clamp(1.1rem, 3.4vw, 1.6rem);
  }
  .cookie-consent__actions {
    flex-direction: column;
    align-items: stretch;
  }
  .cookie-consent__actions .btn,
  .cookie-consent__actions .cookie-consent__save {
    width: 100%;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cookie-consent,
  .cookie-consent * {
    transition: none !important;
  }
}
