/* ─── Файл: /assets/css/cookie-consent.css ───────────────────────────── */

/* === Основной контейнер === */
.cookie-consent {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: var(--card-bg);
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
  z-index: 9999;
  border-radius: 16px 16px 0 0;
  overflow: hidden;
}

.cookie-consent .container {
  max-width: 1024px;
  margin: auto;
  padding: 20px;
}

/* Центрирование */
.cookie-consent .cookie-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Заголовки и текст */
.cookie-consent h2 {
  margin-bottom: 0.5em;
  font-size: 1.4em;
}

.cookie-consent p {
  margin-bottom: 1em;
  color: var(--text-muted);
}

/* === Переключатели (Toggles) === */
.cookie-toggles {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2em;
  margin-bottom: 1.5em;
}

.cookie-toggles .toggle {
  display: flex;
  align-items: center;
  gap: 0.5em;
  flex-direction: row;
}

.cookie-toggles .toggle input {
  display: none;
}

/* Уникальный стиль переключателя */
.cookie-toggles .toggle .cookie-slider {
  position: relative;
  width: 40px;
  height: 20px;
  background: #ccc;
  border-radius: 10px;
  transition: background 0.3s;
}

.cookie-toggles .toggle .cookie-slider::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.3s;
}

.cookie-toggles .toggle input:checked + .cookie-slider {
  background: var(--accent);
}

.cookie-toggles .toggle input:checked + .cookie-slider::after {
  transform: translateX(20px);
}

/* Подписи */
.cookie-toggles .toggle .label-text {
  font-size: 0.95em;
  white-space: nowrap;
  max-width: none;
}

/* === Кнопки === */
.cookie-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5em;
  margin-bottom: 1em;
}

.cookie-actions .btn {
  flex: 1 1 auto;
  min-width: 120px;
}

.cookie-actions .btn.light {
  background: #fff;
  color: var(--accent);
}

/* === Ссылки === */
.cookie-links {
  font-size: 0.85em;
  display: flex;
  justify-content: center;
  gap: 1em;
  flex-wrap: wrap;
}

.cookie-links a {
  color: var(--text-color);
  text-decoration: underline;
}

.cookie-links a:hover {
  color: var(--accent);
}

.toggle-group {
  margin-bottom: 1.2em;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.toggle {
  display: flex;
  align-items: center;
  flex-grow: 1;
  gap: 10px;
}

.label-text {
  font-size: 0.95em;
  color: var(--text-color);
}

.info-toggle {
  background: transparent;
  border: none;
  font-size: 1.2em;
  cursor: pointer;
  color: var(--text-color);
  padding: 4px;
}


/* === Адаптив для мобильных === */
@media (max-width: 600px) {
  .cookie-consent .container {
    padding: 15px;
  }

  .cookie-toggles {
    flex-direction: column;
    gap: 1em;
  }

  .cookie-toggles .toggle {
    flex-direction: column;
    align-items: center;
  }

  .cookie-toggles .toggle .cookie-slider {
    margin-bottom: 0.5em;
  }

  .cookie-toggles .toggle .label-text {
    white-space: normal;
    text-align: center;
  }

  .cookie-actions {
    flex-direction: column;
  }
}

.toggle-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 320px;
  text-align: center;
  position: relative;
}

.label-text {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
}

.info-toggle {
  background: none;
  border: none;
  font-size: 1em;
  color: var(--accent);
  cursor: pointer;
  transition: transform 0.2s;
  padding: 0;
  line-height: 1;
}

.info-toggle[aria-expanded="true"] {
  transform: rotate(180deg);
}

.toggle-info {
  font-size: 0.85em;
  color: var(--text-muted);
  margin-top: 0.4em;
  line-height: 1.4;
  display: none;
}

.toggle-info[aria-hidden="false"] {
  display: block;
}

@media (max-width: 600px) {
  .cookie-consent .container {
    padding: 15px;
  }

  .cookie-toggles {
    flex-direction: column;
    gap: 1.5em;
  }

  .cookie-toggles .toggle {
    flex-wrap: wrap;
    flex-direction: row;
    justify-content: center;
    text-align: left;
    gap: 0.6em;
  }

  .cookie-toggles .toggle .cookie-slider {
    order: 1;
  }

  .cookie-toggles .toggle .label-text {
    order: 2;
    white-space: normal;
    text-align: left;
    display: inline-flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.3em;
    justify-content: flex-start;
  }

  .cookie-actions {
    flex-direction: column;
  }

  .toggle-group {
    width: 100%;
    max-width: 100%;
    align-items: center;
  }

  .label-text {
    flex-wrap: wrap;
  }
}