/* ══════════════════════════════════════════════════════════════════════
   legal.css — юридические страницы (legal.js), баннер согласия и полоса
   «тестовый режим» (consent.js). Отдельный файл, чтобы не трогать
   styles.css: у статики на проде годовой кэш, и чем меньше файлов
   перезаливается, тем меньше шансов отравить версию.
   Токены берутся из styles.css — файл подключается ПОСЛЕ него.
   ══════════════════════════════════════════════════════════════════════ */

/* ── Юридические страницы: переключатель PL/EN/RU + типографика ───────── */
.legal-page { padding: calc(var(--nav-height) + var(--space-12)) 0 var(--space-20); }
.legal-shell {
  max-width: 820px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-2xl);
  padding: var(--space-10) var(--space-8) var(--space-8);
  box-shadow: var(--shadow-md);
}
.legal-langs {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  padding-bottom: var(--space-6); margin-bottom: var(--space-6);
  border-bottom: 1px solid var(--border-subtle);
}
.legal-langs__label {
  font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-faint); margin-right: var(--space-3); font-weight: 600;
}
.legal-langs__btn {
  font-family: var(--font-body); font-size: 13px; font-weight: 600;
  padding: 6px 14px; border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle); background: transparent;
  color: var(--text-secondary); cursor: pointer; transition: all .18s;
}
.legal-langs__btn:hover { color: var(--text-primary); background: var(--bg-card-hover); }
.legal-langs__btn.is-active {
  background: var(--primary-grad); border-color: transparent;
  color: #fff; box-shadow: 0 2px 10px rgba(181,115,74,.28);
}
.legal-title {
  font-family: var(--font-display); font-size: clamp(1.9rem, 4vw, 2.6rem);
  letter-spacing: -.025em; line-height: 1.12; margin-bottom: var(--space-2);
}
.legal-meta {
  font-size: 13px; color: var(--text-muted); font-weight: 500;
  padding-bottom: var(--space-6); margin-bottom: var(--space-6);
  border-bottom: 1px solid var(--border-subtle);
}
.legal-content { color: var(--text-secondary); font-size: 15.5px; line-height: 1.75; }
.legal-content h2 {
  color: var(--text-primary); font-family: var(--font-display);
  font-size: 1.22rem; font-weight: 700; letter-spacing: -.01em;
  margin: var(--space-8) 0 var(--space-4);
}
.legal-content p { margin-bottom: var(--space-4); }
.legal-content ul { margin: 0 0 var(--space-5); padding-left: var(--space-5); }
.legal-content li { margin-bottom: 8px; }
.legal-content a { color: var(--primary-600); text-decoration: underline; text-underline-offset: 2px; }
.legal-content b, .legal-content strong { color: var(--text-primary); font-weight: 700; }
.legal-content code {
  font-family: var(--font-mono); font-size: 12.5px;
  background: rgba(181,115,74,.1); color: var(--primary-600);
  padding: 1px 6px; border-radius: 5px;
}
.legal-callout {
  background: rgba(181,115,74,.08);
  border: 1px solid rgba(181,115,74,.22);
  border-left: 3px solid var(--primary-500);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5);
  margin: 0 0 var(--space-5);
  color: var(--text-primary);
}
.legal-operator {
  margin-top: var(--space-10); padding: var(--space-5) var(--space-6);
  background: var(--bg-surface); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
}
.legal-operator__title {
  font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-faint); font-weight: 700; margin-bottom: 8px;
}
.legal-operator__body { font-size: 14px; line-height: 1.7; color: var(--text-secondary); }
.legal-operator__body a { color: var(--primary-600); text-decoration: none; }
.legal-prevail { margin-top: var(--space-5); font-size: 12px; color: var(--text-faint); line-height: 1.6; }
@media (max-width: 640px) {
  .legal-shell { padding: var(--space-6) var(--space-5); border-radius: var(--radius-xl); }
  .legal-content { font-size: 15px; }
}

/* ── Баннер согласия. «Принять» и «Отклонить» одного веса и размера:
      отказ не должен стоить дороже согласия (EDPB Guidelines 03/2022). ── */
.lfc { position: fixed; inset: auto 0 0 0; z-index: 2000; display: none; padding: 0 16px 16px; }
.lfc.is-open { display: block; animation: lfcUp .32s cubic-bezier(.2,.8,.3,1); }
@keyframes lfcUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
.lfc__card {
  max-width: 860px; margin: 0 auto;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: var(--space-6);
}
.lfc__card--wide { max-width: 720px; max-height: 84vh; overflow-y: auto; }
.lfc__title {
  font-family: var(--font-display); font-size: 1.15rem; font-weight: 700;
  letter-spacing: -.02em; color: var(--text-primary); margin-bottom: 6px;
}
.lfc__beta {
  display: flex; align-items: flex-start; gap: 7px;
  font-size: 12.5px; line-height: 1.45; color: var(--primary-600);
  font-weight: 600; margin-bottom: var(--space-4);
}
.lfc__beta-dot {
  width: 7px; height: 7px; border-radius: 50%; flex: 0 0 7px; margin-top: 5px;
  background: #E0A458; box-shadow: 0 0 0 3px rgba(224,164,88,.22);
}
.lfc__body { font-size: 13.5px; line-height: 1.62; color: var(--text-secondary); margin-bottom: var(--space-4); }
.lfc__links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: var(--space-5); }
.lfc__link { font-size: 12.5px; color: var(--primary-600); text-decoration: none; font-weight: 600; }
.lfc__link:hover { text-decoration: underline; }
.lfc__dot { color: var(--text-faint); font-size: 12px; }
.lfc__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.lfc__btn {
  font-family: var(--font-body); font-size: 14px; font-weight: 600;
  padding: 11px 22px; border-radius: var(--radius-md); cursor: pointer;
  border: 1px solid transparent; transition: transform .15s, box-shadow .15s, background .15s;
  min-width: 132px;
}
.lfc__btn:hover { transform: translateY(-1px); }
.lfc__btn--accept { background: var(--primary-grad); color: #fff; box-shadow: var(--shadow-md); }
.lfc__btn--reject {
  background: var(--bg-card); color: var(--text-primary);
  border-color: rgba(139,109,78,.35);
}
.lfc__btn--reject:hover { background: var(--bg-card-hover); }
.lfc__btn--ghost { background: transparent; color: var(--text-secondary); min-width: 0; padding: 11px 16px; }
.lfc__btn--ghost:hover { color: var(--text-primary); }
.lfc__cat {
  border: 1px solid var(--border-subtle); border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5); margin-bottom: var(--space-3);
  background: var(--bg-card);
}
.lfc__cat-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.lfc__cat-name { font-weight: 700; font-size: 14px; color: var(--text-primary); }
.lfc__cat-body { font-size: 12.5px; line-height: 1.6; color: var(--text-secondary); margin: 0; }
.lfc__locked {
  font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: var(--primary-600); background: rgba(181,115,74,.12);
  padding: 4px 10px; border-radius: var(--radius-full); white-space: nowrap;
}
.lfc__switch { position: relative; display: inline-block; width: 44px; height: 25px; flex: 0 0 44px; }
.lfc__switch input { opacity: 0; width: 0; height: 0; }
.lfc__slider {
  position: absolute; inset: 0; cursor: pointer; border-radius: 999px;
  background: rgba(139,109,78,.25); transition: background .2s;
}
.lfc__slider::before {
  content: ""; position: absolute; width: 19px; height: 19px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.lfc__switch input:checked + .lfc__slider { background: var(--primary-500); }
.lfc__switch input:checked + .lfc__slider::before { transform: translateX(19px); }
.lfc__switch input:focus-visible + .lfc__slider { outline: 2px solid var(--primary-500); outline-offset: 2px; }
@media (max-width: 560px) {
  .lfc { padding: 0 10px 10px; }
  .lfc__card { padding: var(--space-5); }
  .lfc__actions { flex-direction: column; }
  .lfc__btn { width: 100%; min-width: 0; }
}

/* ── Полоса «тестовый режим» ─────────────────────────────────────────── */
.lfb {
  position: fixed; left: 16px; bottom: 16px; z-index: 1400;
  display: flex; align-items: center; gap: 9px;
  max-width: min(420px, calc(100vw - 32px));
  padding: 9px 12px 9px 14px;
  background: var(--bg-elevated);
  border: 1px solid rgba(181,115,74,.28);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-md);
  font-size: 12px; line-height: 1.35; color: var(--text-secondary);
}
.lfb__dot {
  width: 7px; height: 7px; border-radius: 50%; flex: 0 0 7px;
  background: #E0A458; box-shadow: 0 0 0 3px rgba(224,164,88,.22);
}
.lfb__text { flex: 1 1 auto; }
.lfb__more { color: var(--primary-600); font-weight: 700; text-decoration: none; font-size: 11px; }
.lfb__x {
  border: 0; background: transparent; cursor: pointer; color: var(--text-faint);
  font-size: 18px; line-height: 1; padding: 0 2px; flex: 0 0 auto;
}
.lfb__x:hover { color: var(--text-primary); }
.lfb--mini { padding: 0; border: 0; background: transparent; box-shadow: none; }
.lfb__pill {
  font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: .1em;
  padding: 6px 11px; border-radius: var(--radius-full); cursor: pointer;
  background: var(--bg-elevated); color: var(--primary-600);
  border: 1px solid rgba(181,115,74,.28); box-shadow: var(--shadow-md);
}
@media (max-width: 560px) {
  .lfb { left: 10px; right: 10px; bottom: 10px; max-width: none; font-size: 11.5px; }
}

/* ── Согласие в окне покупки (purchase.js): три обязательные галочки ──── */
.pp-consent { margin: 14px 0 10px; display: grid; gap: 9px; }
.pp-consent__row {
  display: flex; align-items: flex-start; gap: 9px; cursor: pointer;
  font-size: 12px; line-height: 1.45; color: var(--text-secondary);
  text-align: left;   /* окно покупки центрирует текст, юридические формулировки читаются хуже */
}
.pp-consent__row input { margin-top: 2px; cursor: pointer; flex: 0 0 auto; }
.pp-consent__row a { color: var(--primary-500); text-decoration: none; }
.pp-consent__row a:hover { text-decoration: underline; }
.pp-consent__beta {
  display: flex; align-items: flex-start; gap: 8px;
  background: rgba(224,164,88,.1); border: 1px solid rgba(224,164,88,.3);
  border-radius: var(--radius-md); padding: 10px 12px;
  font-size: 12px; line-height: 1.45; color: var(--text-primary); margin-bottom: 12px;
  text-align: left;
}
