.cookie-banner[hidden] { display: none; }

.cookie-banner {
  position: fixed;
  z-index: 10000;
  right: clamp(.75rem, 2.5vw, 2rem);
  bottom: clamp(.75rem, 2.5vw, 2rem);
  left: clamp(.75rem, 2.5vw, 2rem);
  color: #2d235a;
}

.cookie-banner__content {
  position: relative;
  width: min(100%, 76rem);
  margin: 0 auto;
  padding: clamp(1.25rem, 2.8vw, 2rem);
  border: 1px solid rgba(45, 35, 90, .16);
  border-radius: clamp(1.25rem, 2.5vw, 2rem);
  background:
    radial-gradient(circle at 96% 10%, rgba(135, 0, 255, .14), transparent 33%),
    radial-gradient(circle at 5% 100%, rgba(0, 238, 190, .13), transparent 30%),
    #fff;
  box-shadow: 0 1.5rem 4.5rem rgba(29, 22, 64, .26);
}

.cookie-consent__eyebrow {
  margin: 0 3.5rem .45rem 0;
  color: #6d00d7;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.cookie-banner h2,
.cookie-preferences h2 {
  max-width: none;
  margin: 0 3.5rem .55rem 0;
  color: #2d235a;
  font-size: clamp(1.45rem, 2.5vw, 2rem);
  line-height: 1.12;
}

.cookie-banner p,
.cookie-preferences p { line-height: 1.55; }

.cookie-banner #cookie-banner-description {
  max-width: 70rem;
  margin: 0;
  font-size: clamp(.94rem, 1.4vw, 1.05rem);
}

.cookie-banner__links {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem .65rem;
  margin: .75rem 0 1rem;
  font-size: .9rem;
}

.cookie-banner a,
.cookie-preferences a,
.cookie-settings-link {
  color: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: .1em;
  text-underline-offset: .18em;
}

.cookie-banner__close,
.cookie-preferences__close {
  display: grid;
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  place-items: center;
  color: #fff;
  background: #2d235a;
  border: 2px solid #2d235a;
  border-radius: 50%;
  font: inherit;
  font-size: 1.55rem;
  line-height: 1;
  cursor: pointer;
}

.cookie-banner__actions,
.cookie-preferences__actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .7rem;
}

.cookie-consent__button {
  min-height: 3.25rem;
  padding: .75rem 1.1rem;
  border: 2px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-weight: 800;
  line-height: 1.2;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.cookie-consent__button:hover { transform: translateY(-2px); }
.cookie-consent__button--reject { color: #fff; background: #2d235a; border-color: #2d235a; }
.cookie-consent__button--customize { color: #2d235a; background: #fff; border-color: #2d235a; }
.cookie-consent__button--accept { color: #fff; background: #7900ec; border-color: #7900ec; }

.cookie-banner button:focus-visible,
.cookie-preferences button:focus-visible,
.cookie-preferences input:focus-visible + span,
.cookie-settings-link:focus-visible {
  outline: 3px solid #00eebe;
  outline-offset: 3px;
}

.cookie-preferences {
  width: min(calc(100% - 1.5rem), 58rem);
  max-height: min(90vh, 54rem);
  padding: 0;
  overflow: hidden;
  color: #2d235a;
  background: #fff;
  border: 0;
  border-radius: clamp(1.25rem, 3vw, 2rem);
  box-shadow: 0 2rem 6rem rgba(29, 22, 64, .38);
}

.cookie-preferences::backdrop { background: rgba(25, 18, 58, .68); backdrop-filter: blur(5px); }
.cookie-preferences__panel { max-height: min(90vh, 54rem); overflow-y: auto; }

.cookie-preferences__header {
  position: relative;
  padding: clamp(1.25rem, 3vw, 2rem);
  background: linear-gradient(135deg, rgba(0, 238, 190, .12), rgba(135, 0, 255, .12));
  border-bottom: 1px solid rgba(45, 35, 90, .13);
}

.cookie-preferences__header p { max-width: 46rem; margin: .55rem 3.5rem 0 0; }
.cookie-preferences__categories { display: grid; gap: .75rem; padding: clamp(1rem, 2.5vw, 1.5rem); }

.cookie-category {
  padding: 1rem;
  border: 1px solid rgba(45, 35, 90, .15);
  border-radius: 1rem;
  background: #fff;
}

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

.cookie-category h3 { margin: 0 0 .25rem; font-size: 1.1rem; }
.cookie-category p { margin: 0; font-size: .92rem; }
.cookie-category details { margin-top: .65rem; }
.cookie-category summary { width: fit-content; font-size: .88rem; font-weight: 800; cursor: pointer; }
.cookie-category details p { margin-top: .55rem; padding-top: .55rem; border-top: 1px solid rgba(45, 35, 90, .1); }

.cookie-category__required {
  flex: 0 0 auto;
  padding: .45rem .75rem;
  color: #174e44;
  background: rgba(0, 238, 190, .18);
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 800;
}

.cookie-switch { display: inline-flex; position: relative; flex: 0 0 auto; cursor: pointer; }
.cookie-switch input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.cookie-switch > span:last-child { width: 3.25rem; height: 1.8rem; background: #8c879f; border-radius: 999px; transition: background-color .2s ease; }
.cookie-switch > span:last-child::after { content: ""; display: block; width: 1.3rem; height: 1.3rem; margin: .25rem; background: #fff; border-radius: 50%; box-shadow: 0 .1rem .3rem rgba(0, 0, 0, .2); transition: transform .2s ease; }
.cookie-switch input:checked + span { background: #7900ec; }
.cookie-switch input:checked + span::after { transform: translateX(1.45rem); }

.cookie-preferences__legal { margin: 0; padding: 0 clamp(1rem, 2.5vw, 1.5rem) 1rem; font-size: .88rem; }
.cookie-preferences__actions { position: sticky; bottom: 0; padding: 1rem clamp(1rem, 2.5vw, 1.5rem); background: #f8f7fb; border-top: 1px solid rgba(45, 35, 90, .13); }

.cookie-settings-link {
  display: inline;
  padding: 0;
  color: inherit;
  background: none;
  border: 0;
  font: inherit;
  cursor: pointer;
}

@media (max-width: 700px) {
  .cookie-banner { right: .55rem; bottom: .55rem; left: .55rem; }
  .cookie-banner__content { max-height: calc(100vh - 1.1rem); overflow-y: auto; padding: 1.15rem; }
  .cookie-banner__actions,
  .cookie-preferences__actions { grid-template-columns: 1fr; }
  .cookie-category__heading { align-items: flex-start; }
  .cookie-preferences__actions { position: static; }
}

@media (prefers-reduced-motion: reduce) {
  .cookie-consent__button,
  .cookie-switch > span:last-child,
  .cookie-switch > span:last-child::after { transition: none; }
}
