/* Cookie-баннер — в духе KOMIS / CookieYes, палитра чёрный · серый · белый */
.wf-cookie {
  --wf-cookie-bg: #141414;
  --wf-cookie-text: #f0f0f0;
  --wf-cookie-muted: #9a9a9a;
  --wf-cookie-border: rgba(255, 255, 255, 0.14);
  --wf-cookie-shadow: 0 -1px 10px rgba(0, 0, 0, 0.35), 0 24px 48px rgba(0, 0, 0, 0.45);

  position: fixed;
  z-index: 999999;
  right: 40px;
  bottom: 40px;
  width: 440px;
  max-width: calc(100vw - 32px);
  box-sizing: border-box;
  font-family: Aeonik, arial, sans-serif;
  font-size: 14px;
  line-height: 24px;
  color: var(--wf-cookie-text);
  pointer-events: none;
}

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

.wf-cookie__panel {
  pointer-events: auto;
  padding: 20px 26px;
  border-radius: 6px;
  background: var(--wf-cookie-bg);
  border: 1px solid var(--wf-cookie-border);
  box-shadow: var(--wf-cookie-shadow);
}

.wf-cookie__title {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 700;
  line-height: 24px;
  color: var(--wf-cookie-text);
}

.wf-cookie__text {
  margin: 0;
  font-size: 14px;
  line-height: 24px;
  font-weight: 400;
  color: var(--wf-cookie-text);
}

.wf-cookie__text a {
  color: var(--wf-cookie-text);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.wf-cookie__text a:hover {
  color: #ffffff;
}

.wf-cookie__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
}

.wf-cookie__actions[hidden] {
  display: none !important;
}

.wf-cookie__btn {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  cursor: pointer;
  border-radius: 2px;
  padding: 8px 12px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 24px;
  text-align: center;
  transition: opacity 0.15s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.wf-cookie__btn:hover {
  opacity: 0.88;
}

.wf-cookie__btn--primary {
  background: #ffffff;
  color: #121212;
  border: 2px solid #ffffff;
}

.wf-cookie__btn--primary:hover {
  opacity: 1;
  background: #e8e8e8;
  border-color: #e8e8e8;
}

.wf-cookie__btn--ghost {
  background: transparent;
  color: var(--wf-cookie-text);
  border: 2px solid rgba(255, 255, 255, 0.55);
}

.wf-cookie__btn--ghost:hover {
  border-color: #ffffff;
  color: #ffffff;
}

/* Панель настроек */
.wf-cookie__prefs {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--wf-cookie-border);
}

.wf-cookie__prefs[hidden] {
  display: none !important;
}

.wf-cookie__prefs-title {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 700;
  line-height: 24px;
  color: var(--wf-cookie-text);
}

.wf-cookie__category {
  padding: 12px 0;
  border-bottom: 1px solid var(--wf-cookie-border);
}

.wf-cookie__category:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

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

.wf-cookie__category-head label,
.wf-cookie__category-label {
  font-size: 16px;
  font-weight: 700;
  line-height: 24px;
  color: var(--wf-cookie-text);
}

.wf-cookie__category-head label {
  cursor: pointer;
}

.wf-cookie__always {
  font-size: 14px;
  font-weight: 600;
  line-height: 24px;
  color: #b8b8b8;
  white-space: nowrap;
}

.wf-cookie__category p {
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 22px;
  color: var(--wf-cookie-muted);
}

/* Переключатель (как CookieYes) */
.wf-cookie__switch {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
}

.wf-cookie__switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.wf-cookie__switch-ui {
  position: relative;
  display: block;
  width: 44px;
  height: 24px;
  border-radius: 50px;
  background: #3a3a3a;
  cursor: pointer;
  transition: background 0.2s ease;
}

.wf-cookie__switch-ui::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  transition: transform 0.2s ease;
}

.wf-cookie__switch input:checked + .wf-cookie__switch-ui {
  background: #ffffff;
}

.wf-cookie__switch input:checked + .wf-cookie__switch-ui::after {
  transform: translateX(20px);
  background: #121212;
}

.wf-cookie__switch input:disabled + .wf-cookie__switch-ui {
  opacity: 0.45;
  cursor: not-allowed;
}

@media only screen and (max-width: 576px) {
  .wf-cookie {
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    max-width: 100%;
  }

  .wf-cookie__panel {
    border-radius: 6px 6px 0 0;
    padding: 20px 24px;
  }

  .wf-cookie__actions {
    flex-direction: column;
    gap: 10px;
  }

  .wf-cookie__btn {
    width: 100%;
    flex: none;
  }

  .wf-cookie__actions--notice .wf-cookie__btn--primary {
    order: 1;
  }

  .wf-cookie__actions--notice .wf-cookie__btn[data-action="customize"] {
    order: 2;
  }

  .wf-cookie__actions--notice .wf-cookie__btn[data-action="reject"] {
    order: 3;
  }
}

@media only screen and (max-width: 440px) {
  .wf-cookie__title {
    font-size: 16px;
  }

  .wf-cookie__text,
  .wf-cookie__btn {
    font-size: 12px;
    line-height: 20px;
  }
}
