/* ============================================================
   legal.css — стили для юридических блоков
   Эврика / тема evrika
   ============================================================ */

/* ── Контент информационных страниц ── */
.legal-doc {
  max-width: 780px;
  line-height: 1.7;
  color: var(--ink);
}

.legal-doc h1 {
  font-size: 1.6rem;
  font-weight: 700;
  margin: 0 0 4px;
  color: var(--ink);
}

.legal-doc .legal-updated {
  font-size: 12px;
  color: var(--ink-60);
  margin: 0 0 28px;
}

.legal-doc h2 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 28px 0 8px;
  color: var(--ink);
  border-bottom: 1px solid var(--border);
  padding-bottom: 5px;
}

.legal-doc h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 18px 0 6px;
  color: var(--ink);
}

.legal-doc p {
  margin: 0 0 12px;
}

.legal-doc ul,
.legal-doc ol {
  margin: 0 0 14px;
  padding-left: 22px;
}

.legal-doc li {
  margin-bottom: 5px;
}

.legal-doc a {
  color: var(--accent);
  text-decoration: underline;
}

.legal-doc a:hover {
  color: var(--accent-dark, #1a56db);
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0 20px;
  font-size: 14px;
}

.legal-table th,
.legal-table td {
  padding: 8px 12px;
  border: 1px solid var(--border);
  vertical-align: top;
  text-align: left;
}

.legal-table th {
  background: var(--surface);
  font-weight: 600;
}

.legal-table td:first-child {
  font-weight: 500;
  white-space: nowrap;
  width: 220px;
  color: var(--ink-60);
}

/* ── Чекбоксы согласий (форма регистрации, отзывы, чекаут) ── */
.consent-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
}

/* Компактный вариант — для формы быстрой регистрации в чекауте */
.consent-row--compact {
  padding: 6px 10px;
  margin-bottom: 6px;
  gap: 8px;
}

.consent-row--compact .consent-checkbox {
  width: 15px;
  height: 15px;
  margin-top: 1px;
}

.consent-row--compact .consent-label {
  font-size: 11.5px;
  line-height: 1.4;
}

.consent-row--required {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 5%, transparent);
}

.consent-checkbox {
  flex-shrink: 0;
  margin-top: 2px;
  width: 17px;
  height: 17px;
  cursor: pointer;
  accent-color: var(--accent);
}

.consent-label {
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink);
  cursor: pointer;
  flex: 1;
}

.consent-label a {
  color: var(--accent);
  text-decoration: underline;
  white-space: nowrap;
}

.consent-label a:hover {
  opacity: 0.8;
}

.consent-required-mark {
  color: var(--accent);
  font-weight: 700;
  margin-left: 2px;
}

/* Override .review-form label { display:block } that breaks consent-row flex layout */
.review-form .consent-label {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 3px;
  font-size: 13px;
  color: var(--ink);
}

/* ── Текст-предупреждение под кнопкой ── */
.consent-note {
  font-size: 12px;
  color: var(--ink-60);
  margin-top: 8px;
  line-height: 1.5;
}

.consent-note a {
  color: var(--accent);
  text-decoration: underline;
}

/* ── Cookie-баннер ── */
#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: var(--ink, #1a1a2e);
  color: #fff;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  box-shadow: 0 -4px 20px rgba(0,0,0,.18);
  transform: translateY(100%);
  transition: transform .35s cubic-bezier(.4,0,.2,1);
}

#cookie-banner.is-visible {
  transform: translateY(0);
}

.cookie-icon {
  font-size: 22px;
  flex-shrink: 0;
  line-height: 1;
}

.cookie-text {
  flex: 1;
  font-size: 13px;
  line-height: 1.5;
  min-width: 200px;
}

.cookie-text a {
  color: #93c5fd;
  text-decoration: underline;
}

.cookie-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.cookie-btn {
  padding: 8px 18px;
  border-radius: var(--radius-s, 6px);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  white-space: nowrap;
  transition: opacity .15s;
}

.cookie-btn:hover {
  opacity: 0.85;
}

.cookie-btn--accept {
  background: var(--accent, #2563eb);
  color: #fff;
}

.cookie-btn--essential {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,.4);
}

@media (max-width: 600px) {
  #cookie-banner {
    padding: 12px 14px;
  }

  .cookie-actions {
    width: 100%;
  }

  .cookie-btn {
    flex: 1;
    text-align: center;
  }
}
