/* Cookie consent — Roko */

.footer-cookie-btn {
  appearance: none;
  border: 0;
  background: none;
  padding: 0;
  margin: 0;
  font: inherit;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.82);
  cursor: pointer;
  text-align: left;
  transition: color 0.2s ease, transform 0.2s ease;
}
.footer-cookie-btn:hover {
  color: white;
  transform: translateX(3px);
}

.cookie-banner {
  position: fixed;
  inset: auto 1rem 1rem;
  z-index: 1200;
  max-width: 42rem;
  margin-inline: auto;
  pointer-events: none;
}
html.has-cookie-consent .cookie-banner {
  display: none !important;
}
.cookie-banner[hidden],
.cookie-overlay[hidden],
.cookie-modal[hidden] {
  display: none !important;
}

.cookie-banner-inner {
  pointer-events: auto;
  display: grid;
  gap: 1.15rem;
  padding: 1.25rem 1.3rem 1.35rem;
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.98), rgba(240, 243, 255, 0.96)),
    var(--white);
  border: 1px solid color-mix(in srgb, var(--border) 80%, white);
  border-radius: 24px;
  box-shadow:
    0 24px 60px rgba(7, 16, 42, 0.18),
    0 2px 0 rgba(255, 255, 255, 0.7) inset;
  animation: cookieIn 0.42s cubic-bezier(0.34, 1.25, 0.64, 1) both;
}

.cookie-kicker {
  margin: 0 0 0.35rem;
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--flag-red);
}

.cookie-banner-copy h2,
.cookie-modal-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.55rem, 4vw, 1.9rem);
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--navy);
}

.cookie-banner-copy p:not(.cookie-kicker),
.cookie-modal-lede {
  margin: 0.55rem 0 0;
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--text-secondary);
}

.cookie-banner-copy a {
  color: var(--navy);
  text-decoration: underline;
  text-underline-offset: 0.15em;
  font-weight: 800;
}

.cookie-banner-actions,
.cookie-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.cookie-banner-actions .btn,
.cookie-modal-actions .btn {
  flex: 1 1 auto;
  min-width: min(100%, 9.5rem);
}

.cookie-overlay {
  position: fixed;
  inset: 0;
  z-index: 1210;
  background: rgba(15, 19, 72, 0.48);
  backdrop-filter: blur(4px);
  animation: cookieFade 0.28s ease both;
}

.cookie-modal {
  position: fixed;
  inset: 0;
  z-index: 1220;
  display: grid;
  place-items: end center;
  padding: 1rem;
  pointer-events: none;
}

.cookie-modal-panel {
  pointer-events: auto;
  width: min(520px, 100%);
  max-height: min(88vh, 720px);
  overflow: auto;
  padding: 1.35rem 1.35rem 1.45rem;
  background: linear-gradient(180deg, #ffffff 0%, var(--canvas) 100%);
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: 0 30px 80px rgba(7, 16, 42, 0.28);
  animation: cookieIn 0.4s cubic-bezier(0.34, 1.25, 0.64, 1) both;
}

.cookie-modal-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
}

.cookie-close {
  flex: none;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  border-radius: 12px;
  background: color-mix(in srgb, var(--sky) 45%, white);
  display: grid;
  place-content: center;
  cursor: pointer;
  position: relative;
}
.cookie-close span {
  position: absolute;
  width: 14px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
}
.cookie-close span:first-child {
  transform: rotate(45deg);
}
.cookie-close span:last-child {
  transform: rotate(-45deg);
}
.cookie-close:hover {
  background: color-mix(in srgb, var(--sky) 70%, white);
}

.cookie-cats {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.7rem;
}

.cookie-cat {
  padding: 1rem 1.05rem;
  border-radius: 18px;
  background: white;
  border: 1px solid var(--border);
}

.cookie-cat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.cookie-cat h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--navy);
}

.cookie-cat p {
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-secondary);
}

.cookie-lock {
  flex: none;
  min-width: 2.6rem;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--mint) 55%, white);
  color: color-mix(in srgb, var(--navy) 75%, #1a7a4a);
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
}

.cookie-switch {
  position: relative;
  display: inline-flex;
  flex: none;
  cursor: pointer;
}
.cookie-switch input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}
.cookie-switch-ui {
  width: 3.1rem;
  height: 1.85rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--border) 70%, #c5cce0);
  border: 2px solid transparent;
  display: block;
  position: relative;
  transition: background 0.2s ease;
}
.cookie-switch-ui::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 1.3rem;
  height: 1.3rem;
  border-radius: 50%;
  background: white;
  box-shadow: 0 2px 8px rgba(7, 16, 42, 0.18);
  transition: transform 0.2s ease;
}
.cookie-switch input:checked + .cookie-switch-ui {
  background: var(--flag-red);
}
.cookie-switch input:checked + .cookie-switch-ui::after {
  transform: translateX(1.2rem);
}
.cookie-switch input:focus-visible + .cookie-switch-ui {
  outline: 3px solid color-mix(in srgb, var(--flag-red) 35%, white);
  outline-offset: 2px;
}

.cookie-modal-actions {
  margin-top: 1.35rem;
}

@keyframes cookieIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes cookieFade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (min-width: 720px) {
  .cookie-banner {
    inset: auto 1.5rem 1.5rem auto;
    margin-inline: 0;
    width: min(420px, calc(100% - 3rem));
  }
  .cookie-modal {
    place-items: center;
  }
  .cookie-modal-panel {
    padding: 1.6rem 1.6rem 1.7rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cookie-banner-inner,
  .cookie-modal-panel,
  .cookie-overlay {
    animation: none;
  }
}
