/* Cookie Consent — стили под шаблон «Лайм» (логика в js/cookie-consent.js) */

.cc-banner,
.cc-modal,
.cc-modal * {
  box-sizing: border-box;
}

/* ---------- Кнопки ---------- */

.cc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 22px;
  border-radius: 30px;
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.cc-btn--primary {
  background: #D3EF30;
  color: #232323;
}

.cc-btn--primary:hover {
  background: #c2dd22;
}

.cc-btn--secondary {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.5);
}

.cc-btn--secondary:hover {
  border-color: #D3EF30;
  color: #D3EF30;
}

/* ---------- Баннер ---------- */

.cc-banner {
  position: fixed;
  left: 20px;
  right: 20px;
  bottom: 20px;
  z-index: 999999;
  max-width: 1100px;
  margin: 0 auto;
  background: linear-gradient(90deg, #232323, #3a3a3a);
  color: #fff;
  font-family: "Montserrat Alternates", sans-serif;
  font-size: 14px;
  line-height: 1.45;
  padding: 20px 56px 20px 24px;
  border-radius: 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
  transform: translateY(calc(100% + 20px));
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.cc-banner[hidden] {
  display: none;
}

.cc-banner.cc-is-visible {
  transform: translateY(0);
  opacity: 1;
}

.cc-banner.cc-is-hiding {
  transform: translateY(calc(100% + 20px));
  opacity: 0;
}

.cc-banner__text {
  flex: 1 1 360px;
  min-width: 0;
}

.cc-banner__text a {
  color: #D3EF30;
  text-decoration: underline;
}

.cc-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  flex: 0 0 auto;
}

.cc-banner__close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 30px;
  height: 30px;
  border: none;
  background: transparent;
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.7;
}

.cc-banner__close:hover {
  opacity: 1;
  color: #D3EF30;
}

@media (max-width: 640px) {
  .cc-banner {
    left: 10px;
    right: 10px;
    bottom: 10px;
    padding: 18px 16px 16px;
    border-radius: 15px;
    flex-direction: column;
    align-items: stretch;
  }
  .cc-banner__text {
    flex: unset;
    max-width: calc(100% - 30px);
  }
  .cc-banner__actions {
    flex-direction: column;
  }
  .cc-banner__actions .cc-btn {
    width: 100%;
  }
}

/* ---------- Модалка настроек ---------- */

.cc-modal {
  position: fixed;
  inset: 0;
  z-index: 1000000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  font-family: "Montserrat Alternates", sans-serif;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.cc-modal[hidden] {
  display: none;
}

.cc-modal.cc-is-visible {
  opacity: 1;
}

.cc-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}

.cc-modal__dialog {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: 86vh;
  overflow-y: auto;
  background: #2b2b2b;
  color: #fff;
  border-radius: 20px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.cc-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.cc-modal__header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #fff;
}

.cc-modal__close {
  border: none;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  color: #fff;
  cursor: pointer;
  padding: 4px 8px;
  opacity: 0.7;
}

.cc-modal__close:hover {
  opacity: 1;
  color: #D3EF30;
}

.cc-modal__body {
  padding: 8px 24px;
}

.cc-category {
  padding: 16px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.cc-category:last-child {
  border-bottom: none;
}

.cc-category__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  font-size: 15px;
  gap: 12px;
}

.cc-category p {
  margin: 6px 0 0 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.65);
}

.cc-modal__footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 16px 24px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

@media (max-width: 480px) {
  .cc-modal__footer {
    flex-direction: column;
  }
  .cc-modal__footer .cc-btn {
    width: 100%;
  }
}

/* ---------- Переключатель ---------- */

.cc-switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 24px;
  flex: 0 0 auto;
  margin: 0;
}

.cc-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.cc-switch__slider {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.cc-switch__slider::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 3px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s ease;
}

.cc-switch input:checked + .cc-switch__slider {
  background: #D3EF30;
}

.cc-switch input:checked + .cc-switch__slider::before {
  background: #232323;
  transform: translateX(18px);
}

.cc-switch--disabled .cc-switch__slider {
  cursor: not-allowed;
  opacity: 0.6;
}
