.cookie-notif,
.cookie-notif *,
.cookie-notif *::before,
.cookie-notif *::after {
  box-sizing: border-box;
}

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

.cookie-notif {
  --cookie-notif-accent: #4694d1;
  --cookie-notif-primary: #000;
  --cookie-notif-secondary: #676e78;
  --cookie-notif-disabled: #dfe3e6;
  position: relative;
  z-index: 9999;
  font-family: Golos, Arial, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  letter-spacing: .16px;
  color: var(--cookie-notif-primary);
}

.cookie-notif__banner {
  position: fixed;
  right: 24px;
  bottom: 20px;
  left: 24px;
  display: flex;
  align-items: center;
  gap: 24px;
  width: calc(100% - 48px);
  max-width: 1200px;
  min-height: 124px;
  margin: 0 auto;
  padding: 24px;
  border: 1px solid #fff;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 0 4px rgba(0, 0, 0, .04), 0 4px 32px rgba(0, 0, 0, .16);
}

.cookie-notif__intro {
  flex: 1 1 auto;
  min-width: 0;
}

.cookie-notif__text,
.cookie-notif__description,
.cookie-notif__category-description,
.cookie-notif__title {
  margin: 0;
  padding: 0;
}

.cookie-notif__text {
  color: var(--cookie-notif-secondary);
}

.cookie-notif__link {
  color: var(--cookie-notif-accent);
  text-decoration: underline;
  text-decoration-skip-ink: auto;
  text-underline-position: from-font;
}

.cookie-notif__settings-link {
  display: block;
  margin: 4px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  letter-spacing: inherit;
  cursor: pointer;
}

.cookie-notif__button {
  min-height: 40px;
  padding: 7px 24px;
  border: 1px solid var(--cookie-notif-accent);
  border-radius: 5px;
  font: 500 16px/24px Golos, Arial, sans-serif;
  letter-spacing: .16px;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, box-shadow .15s ease;
}

.cookie-notif__button:focus-visible,
.cookie-notif__link:focus-visible,
.cookie-notif__close:focus-visible {
  outline: 2px solid var(--cookie-notif-accent);
  outline-offset: 3px;
}

.cookie-notif__button--outline {
  flex: 0 0 auto;
  color: var(--cookie-notif-accent);
  background: #fff;
}

.cookie-notif__button--outline:hover {
  color: #fff;
  background: var(--cookie-notif-accent);
}

.cookie-notif__overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, .48);
  overflow: hidden;
}

.cookie-notif__modal {
  display: flex;
  flex-direction: column;
  width: 800px;
  max-width: 100%;
  max-height: calc(100vh - 48px);
  padding: 40px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 4px 32px rgba(0, 0, 0, .16);
}

.cookie-notif__modal-header {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 32px;
  margin-bottom: 24px;
}

.cookie-notif__title {
  flex: 1 1 auto;
  font-size: 32px;
  font-weight: 500;
  line-height: 40px;
  letter-spacing: 0;
}

.cookie-notif__close {
  position: relative;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.cookie-notif__close span::before,
.cookie-notif__close span::after {
  position: absolute;
  top: 11px;
  left: 2px;
  width: 21px;
  height: 1.5px;
  border-radius: 2px;
  background: #b0bac1;
  content: '';
}

.cookie-notif__close span::before { transform: rotate(45deg); }
.cookie-notif__close span::after { transform: rotate(-45deg); }

.cookie-notif__modal-content {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: #8a959d transparent;
  scrollbar-width: thin;
}

.cookie-notif__modal-content::-webkit-scrollbar { width: 4px; }
.cookie-notif__modal-content::-webkit-scrollbar-track { background: transparent; }
.cookie-notif__modal-content::-webkit-scrollbar-thumb {
  border-radius: 20px;
  background: #8a959d;
}

.cookie-notif__description {
  line-height: 24px;
}

.cookie-notif__description strong {
  font-weight: 500;
}

.cookie-notif__categories {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 24px;
}

.cookie-notif__category {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cookie-notif__category-title {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
}

.cookie-notif__checkbox {
  position: absolute;
  z-index: 1;
  top: 0;
  left: 0;
  width: 24px;
  height: 24px;
  margin: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  cursor: pointer;
}

.cookie-notif__checkbox:disabled {
  cursor: default;
}

.cookie-notif__checkbox:focus-visible + .cookie-notif__checkmark {
  outline: 2px solid var(--cookie-notif-accent);
  outline-offset: 3px;
}

.cookie-notif__checkmark {
  position: relative;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  border: 1px solid #b0bac1;
  border-radius: 5px;
  background: #fff;
}

.cookie-notif__checkbox:checked + .cookie-notif__checkmark {
  border-color: var(--cookie-notif-accent);
  background: var(--cookie-notif-accent);
}

.cookie-notif__checkbox:checked + .cookie-notif__checkmark::after {
  position: absolute;
  top: 4px;
  left: 8px;
  width: 7px;
  height: 12px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  content: '';
  transform: rotate(45deg);
}

.cookie-notif__checkbox:disabled + .cookie-notif__checkmark {
  border-color: var(--cookie-notif-disabled);
  background: var(--cookie-notif-disabled);
}

.cookie-notif__category-description {
  color: var(--cookie-notif-secondary);
}

.cookie-notif__modal-footer {
  display: flex;
  flex: 0 0 auto;
  justify-content: center;
  margin-top: 24px;
}

.cookie-notif__button--primary {
  min-height: 48px;
  padding-top: 11px;
  padding-bottom: 11px;
  color: #fff;
  background: var(--cookie-notif-accent);
}

.cookie-notif__button--primary:hover {
  background: #337eb9;
}

body.cookie-notif-lock {
  overflow: hidden;
}

@media (max-width: 767px) {
  .cookie-notif__banner {
    right: 24px;
    bottom: 0;
    left: 24px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 24px;
    width: calc(100% - 48px);
    min-height: 0;
    padding: 24px;
  }

  .cookie-notif__button--outline {
    width: 100%;
  }

  .cookie-notif__overlay {
    align-items: stretch;
    padding: 24px;
  }

  .cookie-notif__modal {
    width: 100%;
    max-height: none;
    padding: 16px;
  }

  .cookie-notif__modal-header {
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 16px;
  }

  .cookie-notif__title {
    font-size: 24px;
    line-height: 32px;
  }

  .cookie-notif__categories {
    margin-top: 16px;
  }

  .cookie-notif__modal-footer {
    margin-top: 16px;
  }

  .cookie-notif__button--primary {
    width: 100%;
  }
}

@media (max-width: 359px) {
  .cookie-notif__banner,
  .cookie-notif__overlay {
    right: 12px;
    left: 12px;
    width: calc(100% - 24px);
  }

  .cookie-notif__overlay {
    inset: 0;
    width: auto;
    padding: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cookie-notif__button { transition: none; }
}
