/* Cookie consent banner + preferences (partials/cookie-consent.njk). */

.cookie-consent {
  position: fixed;
  z-index: 2000;
  left: 50%;
  bottom: 16px;
  box-sizing: border-box;
  width: min(675px, calc(100% - 32px));
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 23px;
  background-color: #2b2a2f;
  border: 1px solid #36353a;
  border-radius: 20px;
  box-shadow: 0 10px 40px #0009;
  color: #fff;
  font-family: "Exo 2", sans-serif;
  font-size: 16px;
  line-height: normal;
  transform: translateX(-50%);
  animation: cookie-consent-in .35s ease-out;
}

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

.cookie-consent.is-closing {
  animation: cookie-consent-out .25s ease-in forwards;
}

.cookie-consent.is-resizing {
  overflow: hidden;
  transition: height .45s cubic-bezier(.4, 0, .2, 1);
}

.cookie-consent.is-resizing .cookie-consent__view {
  animation: cookie-consent-fade .45s ease-out;
}

@keyframes cookie-consent-in {
  from { opacity: 0; transform: translate(-50%, 24px); }
}

@keyframes cookie-consent-out {
  to { opacity: 0; transform: translate(-50%, 24px); }
}

@keyframes cookie-consent-fade {
  from { opacity: 0; }
}

.cookie-consent__view {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

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

.cookie-consent__title {
  margin: 0;
  color: #bdfc0f;
  font-family: "Exo 2", sans-serif;
  font-size: 24px;
  font-weight: 500;
  line-height: 30px;
  letter-spacing: -.15px;
  outline: none;
}

.cookie-consent p {
  margin: 0;
}

.cookie-consent__text,
.cookie-consent__item-text {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cookie-consent__list {
  border-top: 1px solid #4e4d52;
}

.cookie-consent__item {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid #4e4d52;
}

.cookie-consent__item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.cookie-consent__item-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  cursor: default;
}

label.cookie-consent__item-title {
  cursor: pointer;
}

.cookie-consent__item-status {
  color: #bdfc0f;
  font-size: 13px;
}

.cookie-consent__item-text {
  font-size: 13px;
}

/* Toggle: 38×20 track, 16px knob (Figma "toggle", off / on). */
.cookie-consent__toggle {
  position: relative;
  flex: none;
  width: 38px;
  height: 20px;
  margin: 0;
  border-radius: 10px;
  background-color: #616265;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: background-color .2s ease;
}

.cookie-consent__toggle::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: #9da0a6;
  transition: transform .2s ease, background-color .2s ease;
}

.cookie-consent__toggle:checked {
  background-color: #566921;
}

.cookie-consent__toggle:checked::before {
  background-color: #bdfc0f;
  transform: translateX(18px);
}

.cookie-consent__toggle:focus-visible {
  outline: 2px solid #bdfc0f;
  outline-offset: 2px;
}

.cookie-consent__buttons {
  display: flex;
  gap: 24px;
}

.cookie-consent__btn {
  flex: 1 1 0;
  box-sizing: border-box;
  min-height: 48px;
  padding: 11px 24px;
  border: 1px solid #a8a2a4;
  border-radius: 12px;
  background-color: transparent;
  color: #a8a2a4;
  font-family: "Exo 2", sans-serif;
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
  white-space: nowrap;
  cursor: pointer;
  transition: color .2s ease, border-color .2s ease, background-color .2s ease;
}

.cookie-consent__btn:hover {
  border-color: #fff;
  color: #fff;
}

.cookie-consent__btn:focus-visible {
  outline: 2px solid #bdfc0f;
  outline-offset: 2px;
}

.cookie-consent__btn--primary {
  padding: 9px 22px;
  border: 3px solid #95d400;
  background-color: #bdfc0f;
  box-shadow: 0 5px 14px #bdfc0f4d;
  color: #17181c;
}

.cookie-consent__btn--primary:hover {
  border-color: #95d400;
  background-color: #95d400;
  color: #17181c;
}

.cookie-consent__btn--primary:focus-visible {
  outline-color: #fff;
}

.cookie-consent .cookie-consent__note {
  margin-top: 8px;
}

.cookie-consent__note a {
  color: #bdfc0f;
  text-decoration: none;
}

.cookie-consent__note a:hover {
  text-decoration: underline;
}

.cookie-consent-toast {
  position: fixed;
  z-index: 2000;
  left: 50%;
  bottom: 16px;
  box-sizing: border-box;
  width: max-content;
  max-width: min(675px, calc(100% - 32px));
  padding: 16px 23px;
  background-color: #2b2a2f;
  border: 1px solid #36353a;
  border-radius: 20px;
  box-shadow: 0 10px 40px #0009;
  color: #fff;
  font-family: "Exo 2", sans-serif;
  font-size: 16px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, 24px);
  transition: opacity .3s ease, transform .3s ease, visibility 0s .3s;
}

.cookie-consent-toast.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%);
  transition: opacity .3s ease, transform .3s ease;
}

@media screen and (max-width: 767px) {
  .cookie-consent {
    bottom: 12px;
    width: calc(100% - 24px);
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
    padding: 19px 15px;
    border-radius: 16px;
    font-size: 14px;
  }

  .cookie-consent__view {
    gap: 16px;
  }

  .cookie-consent__title {
    font-size: 20px;
    line-height: 26px;
  }

  .cookie-consent__buttons {
    flex-direction: column;
    gap: 12px;
  }

  .cookie-consent__btn {
    flex: none;
    width: 100%;
  }

  .cookie-consent-toast {
    bottom: 12px;
    max-width: calc(100% - 24px);
    padding: 14px 15px;
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cookie-consent,
  .cookie-consent.is-closing,
  .cookie-consent.is-resizing .cookie-consent__view {
    animation: none;
  }

  .cookie-consent__toggle,
  .cookie-consent__toggle::before,
  .cookie-consent-toast {
    transition: none;
  }
}
