/* ==========================================================================
   Cookie: баннер и настройки (chunks/cookies.tpl, js/consent.js)
   Цвета сайта: зелёный #65C75C / #41AC37, оранжевый #D9551C / #C33F06
   ========================================================================== */

.consent[hidden],
.consent__card[hidden],
.consent__desc[hidden] {
  display: none !important;
}

.consent {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 2147483647;
  width: 460px;
  max-width: calc(100vw - 48px);
  font-family: var(--pk-font, 'Inter', sans-serif);
  color: #222;
}

/* Пока открыт баннер — прячем виджет чата, чтобы не перекрывал кнопки */
.consent-open jdiv {
  visibility: hidden !important;
}

.consent__card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(4, 44, 103, 0.18);
  overflow: hidden;
}

.consent__card--banner {
  padding: 24px;
}

.consent__text {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: #333;
}

.consent a {
  color: #D9551C;
  text-decoration: none;
  border-bottom: 1px solid rgba(217, 85, 28, 0.35);
  transition: color 0.2s, border-color 0.2s;
}

.consent a:hover,
.consent a:focus {
  color: #C33F06;
  border-bottom-color: #C33F06;
}

.consent__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 20px;
}

/* Основная кнопка — как зелёные кнопки сайта */
.consent__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 150px;
  height: 46px;
  padding: 0 28px;
  border: 0;
  border-radius: 25px;
  background: #65C75C;
  color: #fff;
  font: 600 15px/1 var(--pk-font, 'Inter', sans-serif);
  cursor: pointer;
  transition: background-color 0.2s;
}

.consent__btn:hover,
.consent__btn:focus-visible {
  background: #41AC37;
  color: #fff;
}

/* Второстепенное действие — текстовая ссылка */
.consent__link {
  padding: 6px 0;
  border: 0;
  border-bottom: 1px solid transparent;
  background: none;
  color: #222;
  font: 600 14px/1.2 var(--pk-font, 'Inter', sans-serif);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}

.consent__link:hover,
.consent__link:focus-visible {
  color: #D9551C;
  border-bottom-color: #D9551C;
}

/* ---------- Панель настроек ---------- */

.consent__card--settings {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 48px);
}

.consent__head {
  flex-shrink: 0;
  padding: 14px 20px;
  box-shadow: 0 4px 12px rgba(4, 44, 103, 0.06);
}

.consent__back {
  display: inline-flex;
  padding: 6px;
  border: 0;
  background: none;
  color: #777;
  cursor: pointer;
  transition: color 0.2s;
}

.consent__back:hover {
  color: #D9551C;
}

.consent__body {
  overflow-y: auto;
  padding: 20px 24px 8px;
}

.consent__title {
  margin-bottom: 12px;
  font: 700 22px/1.3 var(--pk-font, 'Inter', sans-serif);
  color: #222;
}

.consent__group {
  border-top: 1px solid #e3e3e3;
}

.consent__body > .consent__text + .consent__group {
  margin-top: 20px;
}

.consent__more {
  border-top: 1px solid #e3e3e3;
  padding-top: 16px;
}

.consent__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 0;
}

.consent__toggle-desc {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
  color: #222;
}

.consent__name {
  font: 600 15px/1.4 var(--pk-font, 'Inter', sans-serif);
  transition: color 0.2s;
}

.consent__toggle-desc:hover .consent__name {
  color: #D9551C;
}

/* плюс / минус */
.consent__plus {
  position: relative;
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  margin-top: 4px;
}

.consent__plus::before,
.consent__plus::after {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  width: 14px;
  height: 2px;
  background: currentColor;
  transition: transform 0.2s;
}

.consent__plus::after {
  transform: rotate(90deg);
}

.consent__toggle-desc[aria-expanded="true"] .consent__plus::after {
  transform: rotate(0deg);
}

.consent__always {
  flex-shrink: 0;
  font-size: 12px;
  color: #41AC37;
}

.consent__desc {
  padding: 0 0 16px 26px;
  font-size: 13px;
  line-height: 1.6;
  color: #666;
}

.consent__more {
  margin: 16px 0 8px;
  font-size: 13px;
  color: #666;
}

/* переключатель */
.consent__switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  cursor: pointer;
}

.consent__switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.consent__state {
  font-size: 12px;
  color: #999;
}

.consent__state::after {
  content: attr(data-off);
}

.consent__switch.is-on .consent__state {
  color: #41AC37;
}

.consent__switch.is-on .consent__state::after {
  content: attr(data-on);
}

.consent__slider {
  position: relative;
  width: 48px;
  height: 26px;
  border-radius: 13px;
  background: #d5d5d5;
  transition: background-color 0.2s;
}

.consent__slider::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s;
}

.consent__switch input:checked + .consent__slider {
  background: #65C75C;
}

.consent__switch input:checked + .consent__slider::after {
  transform: translateX(22px);
}

.consent__switch input:focus-visible + .consent__slider {
  outline: 2px solid #D9551C;
  outline-offset: 2px;
}

.consent__foot {
  flex-shrink: 0;
  padding: 16px 24px;
  box-shadow: 0 -4px 12px rgba(4, 44, 103, 0.06);
}

@media screen and (max-width: 639px) {
  .consent {
    left: 0;
    right: 0;
    bottom: 0;
    width: auto;
    max-width: none;
  }

  .consent__card {
    border-radius: 16px 16px 0 0;
  }

  .consent__card--banner {
    padding: 20px 16px;
  }

  .consent__actions {
    flex-wrap: wrap;
  }

  .consent__btn {
    flex: 1 1 auto;
  }

  .consent__card--settings {
    max-height: 90vh;
  }

  .consent__body {
    padding: 16px 16px 8px;
  }

  .consent__foot {
    padding: 12px 16px;
  }

  .consent__foot .consent__btn {
    width: 100%;
  }
}

/* ==========================================================================
   Согласие в формах заявок и отзывов
   ========================================================================== */

.politik_label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  line-height: 1.5;
  cursor: pointer;
}

.politik_label .politik_inp {
  flex-shrink: 0;
  margin-top: 3px;
}

.politik_label a,
.politic_label a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: opacity 0.2s;
}

/* глобальное a:hover на сайте делает текст белым — здесь цвет сохраняем */
.politik_label a:hover,
.politik_label a:focus,
.politic_label a:hover,
.politic_label a:focus {
  color: inherit;
  opacity: 0.7;
}

.politic_label {
  gap: 8px;
  margin-bottom: 10px;
  font-size: 13px;
  line-height: 1.5;
}

/* ==========================================================================
   Текстовые страницы (политика, согласие): ссылки и якоря
   ========================================================================== */

#h1_content a {
  color: #D9551C;
  text-decoration: none;
  border-bottom: 1px solid rgba(217, 85, 28, 0.3);
  transition: color 0.2s, border-color 0.2s;
}

#h1_content a:hover,
#h1_content a:focus {
  color: #C33F06;
  border-bottom-color: #C33F06;
}

/* шапка фиксированная — заголовки по якорю не уходят под неё */
#h1_content [id] {
  scroll-margin-top: 130px;
}

/* ==========================================================================
   Подвал: ссылки на документы
   ========================================================================== */

.footer_politic {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
}

.footer_politic a {
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
  transition: color 0.2s, border-color 0.2s;
}

.footer_politic a:hover,
.footer_politic a:focus {
  color: #D9551C;
  border-bottom-color: #D9551C;
}

/* в формах сайта есть правило .buy_accept label { display:block } — перебиваем */
.buy_accept .politik_label {
  display: flex;
}
