.cookie-consent,
.cookie-preferences {
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

.cookie-consent {
  position: fixed;
  z-index: 200;
  inset: auto 0 0;
  pointer-events: none;
}

.cookie-consent__panel {
  position: relative;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  padding: 15px clamp(52px, 5vw, 88px) 15px clamp(22px, 5vw, 88px);
  border-top: 1px solid rgba(165, 178, 180, .2);
  background: #0a0d0e;
  color: #879396;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, .22);
  pointer-events: auto;
}

.cookie-consent__copy p {
  max-width: 840px;
  margin: 0;
  color: #879396;
  font-size: .76rem;
  line-height: 1.5;
}

.cookie-consent a,
.cookie-preferences a {
  color: #a5b2b4;
  text-underline-offset: 3px;
}

.cookie-consent__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 17px;
}

.cookie-consent__link {
  border: 0;
  padding: 7px 0;
  background: transparent;
  color: #879396;
  font: inherit;
  font-size: .7rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  transition-property: color, transform;
  transition-duration: 160ms;
}

.cookie-consent__link:hover { color: #f4efe6; }

.cookie-consent__close {
  position: absolute;
  inset: 50% 18px auto auto;
  width: 30px;
  height: 30px;
  border: 0;
  background: transparent;
  color: #879396;
  font: 300 1.45rem/1 Inter, sans-serif;
  cursor: pointer;
  transform: translateY(-50%);
  transition-property: color, transform;
  transition-duration: 160ms;
}

.cookie-consent__close:hover { color: #f4efe6; }

.cookie-button {
  min-height: 42px;
  border: 1px solid rgba(244, 239, 230, .26);
  border-radius: 999px;
  padding: 9px 16px;
  background: transparent;
  color: #f4efe6;
  font: inherit;
  font-size: .76rem;
  font-weight: 750;
  cursor: pointer;
  transition-property: background-color, border-color, color, transform;
  transition-duration: 160ms;
}

.cookie-button:hover {
  border-color: rgba(244, 239, 230, .62);
  background: rgba(244, 239, 230, .08);
}

.cookie-button:active,
.cookie-consent__link:active,
.cookie-switch:active { transform: scale(.96); }

.cookie-consent__close:active { transform: translateY(-50%) scale(.92); }

.cookie-button--primary {
  border-color: #2677b9;
  background: #2677b9;
  color: #fff;
}

.cookie-button--primary:hover {
  border-color: #398dce;
  background: #398dce;
}

.cookie-button:focus-visible,
.cookie-consent__link:focus-visible,
.cookie-consent__close:focus-visible,
.cookie-switch:focus-visible,
.cookie-preferences__close:focus-visible {
  outline: 2px solid #ef9c61;
  outline-offset: 3px;
}

.cookie-preferences {
  position: fixed;
  z-index: 210;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(3, 8, 7, .76);
  backdrop-filter: blur(8px);
}

.cookie-preferences__dialog {
  width: min(620px, 100%);
  max-height: min(760px, calc(100dvh - 40px));
  overflow: auto;
  border: 1px solid rgba(90, 165, 223, .35);
  border-radius: 26px;
  background: #0e1514;
  color: #f4efe6;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .55);
}

.cookie-preferences__head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 25px 26px 20px;
  border-bottom: 1px solid rgba(165, 178, 180, .2);
  background: #0e1514;
}

.cookie-preferences__head h2 {
  margin: 0;
  font-size: 1.45rem;
  letter-spacing: -.03em;
}

.cookie-preferences__head p {
  margin: 6px 0 0;
  color: #879396;
  font-size: .8rem;
}

.cookie-preferences__close {
  width: 38px;
  height: 38px;
  flex: none;
  border: 0;
  border-radius: 50%;
  background: rgba(244, 239, 230, .07);
  color: #f4efe6;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.cookie-category {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  padding: 22px 26px;
  border-bottom: 1px solid rgba(165, 178, 180, .16);
}

.cookie-category h3 { margin: 0 0 6px; font-size: 1rem; }
.cookie-category p { margin: 0; color: #879396; font-size: .8rem; line-height: 1.55; }

.cookie-category__required {
  align-self: center;
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(35, 115, 90, .18);
  color: #77c3a8;
  font-size: .67rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.cookie-switch {
  position: relative;
  align-self: center;
  width: 48px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: #515c5f;
  cursor: pointer;
  transition-property: background-color, transform;
  transition-duration: 160ms;
}

.cookie-switch::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, .3);
  transition: transform 160ms ease-out;
}

.cookie-switch[aria-checked="true"] { background: #2677b9; }
.cookie-switch[aria-checked="true"]::after { transform: translateX(20px); }

.cookie-preferences__footer {
  position: sticky;
  bottom: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px;
  padding: 18px 26px 24px;
  background: #0e1514;
}

.cookie-preferences__note {
  padding: 0 26px 8px;
  color: #879396;
  font-size: .7rem;
  line-height: 1.5;
}

.cookie-preferences__note a { font-weight: 650; }

@media (max-width: 760px) {
  .cookie-consent__panel {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 15px 48px 15px 18px;
  }
  .cookie-consent__copy p { font-size: .7rem; }
  .cookie-consent__actions { justify-content: flex-start; gap: 14px; }
  .cookie-consent__actions .cookie-button { margin-inline-start: auto; }
  .cookie-consent__close { right: 10px; top: 18px; transform: none; }
  .cookie-consent__close:active { transform: scale(.92); }
  .cookie-preferences { padding: 10px; }
  .cookie-preferences__dialog { max-height: calc(100dvh - 20px); border-radius: 20px; }
  .cookie-preferences__head,
  .cookie-category { padding-inline: 20px; }
  .cookie-preferences__footer { display: grid; grid-template-columns: 1fr 1fr; padding-inline: 20px; }
  .cookie-preferences__footer .cookie-button--primary { grid-column: 1 / -1; grid-row: 1; }
  .cookie-preferences__note { padding-inline: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .cookie-button,
  .cookie-consent__link,
  .cookie-consent__close,
  .cookie-switch,
  .cookie-switch::after { transition-duration: .01ms !important; }
}
