/*!
 * Cookie Consent Manager for Shveimarkt.ru — стили
 * Чтобы подстроить под фирменный стиль магазина, измените переменные ниже.
 */

:root {
  --cc-accent: #d9376e;        /* акцентный цвет (кнопки, ссылки) */
  --cc-accent-hover: #bb2c5c;
  --cc-text: #1f2430;
  --cc-muted: #5a6272;
  --cc-bg: #ffffff;
  --cc-border: #e3e7ef;
  --cc-radius: 12px;
  --cc-shadow: 0 12px 40px rgba(20, 24, 40, 0.18);
  --cc-overlay: rgba(16, 20, 34, 0.55);
  --cc-gap: 16px;
}

/* скрыто по умолчанию, показываем через .cc-show */
[data-cookie-banner],
[data-cookie-modal] {
  display: none;
}
[data-cookie-banner].cc-show,
[data-cookie-modal].cc-show {
  display: block;
}

/* Запрет прокрутки, когда открыто модальное окно */
body.cc-lock {
  overflow: hidden;
}

/* ============================ БАННЕР (снизу) ============================ */
.cc-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 100000;
  max-width: 760px;
  margin: 0 auto;
  background: var(--cc-bg);
  color: var(--cc-text);
  border: 1px solid var(--cc-border);
  border-radius: var(--cc-radius);
  box-shadow: var(--cc-shadow);
  padding: 20px 22px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.5;
  box-sizing: border-box;
}
.cc-banner__title {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
}
.cc-banner__text {
  margin: 0 0 16px;
  font-size: 13.5px;
  color: var(--cc-muted);
}
.cc-banner__text a {
  color: var(--cc-accent);
  text-decoration: underline;
}
.cc-banner__text a:hover { color: var(--cc-accent-hover); }

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

/* Кнопки */
.cc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s, opacity .15s;
  font-family: inherit;
}
.cc-btn:focus-visible { outline: 2px solid var(--cc-accent); outline-offset: 2px; }
.cc-btn--primary {
  background: var(--cc-accent);
  color: #fff;
}
.cc-btn--primary:hover { background: var(--cc-accent-hover); }
.cc-btn--ghost {
  background: transparent;
  color: var(--cc-accent);
  border-color: currentColor;
}
.cc-btn--ghost:hover { background: rgba(217, 55, 110, 0.08); }
.cc-btn--link {
  background: transparent;
  color: var(--cc-muted);
  text-decoration: underline;
  padding: 10px 6px;
}
.cc-btn--link:hover { color: var(--cc-text); }

/* =========================== МОДАЛЬНОЕ ОКНО ============================= */
.cc-modal {
  position: fixed;
  inset: 0;
  z-index: 100001;
  background: var(--cc-overlay);
  overflow-y: auto;
  padding: 20px;
  box-sizing: border-box;
}
.cc-modal__dialog {
  position: relative;
  max-width: 620px;
  margin: 5vh auto 20px;
  background: var(--cc-bg);
  color: var(--cc-text);
  border-radius: var(--cc-radius);
  box-shadow: var(--cc-shadow);
  padding: 26px 26px 22px;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.55;
}
.cc-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border: 0;
  background: #f2f4f9;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  color: var(--cc-muted);
  transition: background .15s;
  font-family: inherit;
}
.cc-modal__close:hover { background: #e6e9f1; }
.cc-modal__title {
  margin: 0 32px 12px 0;
  font-size: 19px;
  font-weight: 700;
}
.cc-modal__intro {
  margin: 0 0 18px;
  font-size: 13.5px;
  color: var(--cc-muted);
}
.cc-modal__intro a { color: var(--cc-accent); text-decoration: underline; }

.cc-option {
  border: 1px solid var(--cc-border);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 12px;
}
.cc-option__head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}
.cc-option__name {
  font-weight: 600;
  font-size: 14.5px;
  display: block;
}
.cc-option__head input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--cc-accent);
  flex: 0 0 auto;
}
.cc-option__desc {
  margin: 8px 0 0 28px;
  font-size: 13px;
  color: var(--cc-muted);
}
.cc-option__desc a { color: var(--cc-accent); text-decoration: underline; }

.cc-option--locked {
  background: #fafbfe;
}
.cc-option--locked .cc-option__head { cursor: default; }

.cc-option__note {
  margin: 10px 0 0 28px;
  font-size: 12.5px;
  color: #8a6d00;
  background: #fff7dd;
  border-radius: 8px;
  padding: 8px 12px;
}
.cc-option__note:empty { display: none; }

.cc-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

/* Анимация появления */
.cc-banner.cc-show, .cc-modal.cc-show { animation: ccFadeIn .25s ease-out; }
@keyframes ccFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ======================= ССЫЛКА «НАСТРОЙКА COOKIE» ====================== */
.cc-footer-link {
  color: inherit;
  text-decoration: underline;
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
}
.cc-footer-link:hover { opacity: .75; }

/* Адаптивность */
@media (max-width: 560px) {
  .cc-banner { padding: 16px; }
  .cc-banner__actions { flex-direction: column; }
  .cc-banner__actions .cc-btn { width: 100%; }
  .cc-modal__dialog { padding: 20px 16px 16px; }
}
