/* ============================================================================
   Серверные страницы международной инсталляции: кнопки, компактный hero,
   юридические страницы, реквизиты, цены; плюс стили SPA-компонентов, которые есть
   только на intl (окно согласия на cookies). Разметку страниц рисует сервер
   (backend services/editions/intl/render/*) на классах landing.css (.lp-*) и
   этих; в SPA (SITE_MODE=spa) файл подключает шаблон (installation.brand
   serverPageStyles), на витрине этапа 1 — en.css через @import.
   ============================================================================ */

/* Токены intl, которых нет в styles.css SPA, — только внутри серверных страниц */
.en-main {
  --en-accent: #b4ff39;
  --en-line: rgba(255, 255, 255, .09);
}

/* ── Кнопки ────────────────────────────────────────────────────────────── */
.en-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: transform .15s ease, background .15s ease;
}

.en-btn:active { transform: scale(.98); }

.en-btn-primary {
  background: var(--en-accent);
  color: #0b0b0f;
}

.en-btn-ghost {
  border: 1px solid var(--en-line);
  background: rgba(255, 255, 255, .04);
  /* в SPA нет landing.css: без явного цвета ссылка-кнопка синяя на тёмном */
  color: var(--text, #fff);
}

.en-btn-ghost:hover { background: rgba(255, 255, 255, .09); }

/* ── Hero и секции главной ─────────────────────────────────────────────── */
.en-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

/* Текстовый hero без визуала (цены, контакты, документы, 404 — renderCompactHero):
   без высоты «под картинку» из landing.css. */
.en-hero-compact { padding-bottom: 0; }

@media (min-width: 980px) {
  .en-hero-compact {
    grid-template-columns: 1fr;
    min-height: 0;
  }
}

/* ── Юридические страницы и контакты ───────────────────────────────────── */
/* Разделы внутри документа — намеренно мельче .lp-section-title: это пункты
   одного текста, а не самостоятельные секции страницы. */
.en-legal h2 {
  margin: 32px 0 12px;
  font-size: 18px;
  line-height: 1.3;
  font-weight: 650;
  color: var(--text);
}

.en-legal h2:first-child { margin-top: 0; }

.en-legal p { overflow-wrap: anywhere; }

.en-company {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px 24px;
  margin: 0;
  max-width: 42em;
}

.en-company dt {
  font-size: 13px;
  color: var(--muted);
}

.en-company dd {
  margin: 0 0 12px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  overflow-wrap: anywhere;
}

.en-company a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--en-accent);
}

/* Ссылки в тексте серверных страниц (цены, документы) — тем же акцентом */
.en-main .lp-prose a { color: var(--en-accent); }

@media (min-width: 720px) {
  .en-company {
    grid-template-columns: 220px 1fr;
    align-items: baseline;
  }

  .en-company dd { margin-bottom: 0; }
}

/* ── Цены ──────────────────────────────────────────────────────────────── */
/* Разметка — RU-страницы на классах pricing.css (render/pricing.js; классы и структуру
   сверяет backend tests/editions/intl/pricingMarkup.mirror.test.js). Здесь то, что на RU
   делает JS, и поправки под ссылки вместо кнопок. Цвет выбранной подписи и положение
   ручки — те же, что у .switcher-label.active и .toggle-knob.right в pricing.css:
   держать в синхроне. */
.en-pricing .pricing-title { text-transform: uppercase; }

.en-pricing a.card-btn {
  display: block;
  box-sizing: border-box;
  text-align: center;
  text-decoration: none;
}

.en-pricing .pricing-footnote a { color: var(--accent, #6ce5b1); }

/* Текст только для скринридера */
.en-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Переключатель периода: радиокнопки внутри .billing-switcher, скрыты, но в порядке
   фокуса (стрелки меняют период); видимость сеток решает :has — правила только прячут
   неактивный период. Браузер без :has (iOS < 15.4, Firefox < 121) такие правила
   отбрасывает: тогда переключатель скрыт, видны обе сетки с подписями периода. */
.en-billing-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.en-pricing .switcher-label {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.en-billing-input:checked + .switcher-label {
  color: #fff;
  font-weight: 600;
}

.en-billing-input:focus-visible + .switcher-label {
  outline: 2px solid var(--accent, #6ce5b1);
  outline-offset: 2px;
  border-radius: 6px;
}

/* Зона нажатия тумблера — 44px в высоту: 26px внутри рамки тумблера + 2 × 9px */
.en-toggle-hit {
  position: absolute;
  inset: -9px -4px;
  cursor: pointer;
}

.en-pricing .toggle-knob { pointer-events: none; }

.billing-switcher:has(.en-billing-input[value="annual"]:checked) .toggle-knob { left: 29px; }

.en-pricing:has(.en-billing-input[value="monthly"]:checked) :is(.en-plans-annual, .en-toggle-to-monthly),
.en-pricing:has(.en-billing-input[value="annual"]:checked) :is(.en-plans-monthly, .en-toggle-to-annual) {
  display: none;
}

.en-plans-caption { display: none; }

@supports not selector(:has(a)) {
  .en-pricing .billing-switcher { display: none; }

  .en-pricing .en-plans-caption {
    display: block;
    margin: 24px 0 12px;
    color: #fff;
    font-weight: 600;
  }
}

/* На телефоне заголовок раздела и описание — друг под другом */
@media (max-width: 600px) {
  .en-pricing .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    text-align: left;
  }
}

/* ── Окно согласия на cookies (.app, components/CookieBanner.js) ───────────────────── */
/* «Decline» — вторичная кнопка рядом с «Accept» (стили окна — styles.css; два класса —
   чтобы перекрыть border: none у .cookie-btn независимо от порядка подключения) */
.cookie-btn.cookie-btn-decline {
  background: transparent;
  color: var(--text, #f6f7fb);
  border: 1px solid rgba(255, 255, 255, .25);
}

.cookie-btn.cookie-btn-decline:hover { background: rgba(255, 255, 255, .08); }

/* Кнопки окна — зона нажатия от 44px; ссылка — подчёркнута и контрастна на тёмном фоне */
.cookie-banner .cookie-btn { min-height: 44px; }

.cookie-banner .cookie-banner-link {
  color: var(--accent, #6ce5b1);
  text-decoration: underline;
}

/* Нижнее меню (84px) с кнопкой «Создать», выступающей на 54px, видно до 959px —
   окно над ними, а не поверх */
@media (max-width: 959px) {
  .cookie-banner { bottom: calc(84px + 56px + env(safe-area-inset-bottom, 0px)); }
}

/* «Cookie settings» в подвале — кнопка, выглядит как соседние ссылки */
.footer-link.footer-link-button {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
}


/* Оплата Freemius (editions/en/checkout.js): строка подписки над тарифами, отказ у карточки */
.en-billing-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  max-width: 720px;
  margin: 0 auto 24px;
  padding: 12px 16px;
  border: 1px solid var(--en-line);
  border-radius: 12px;
  color: var(--text, #fff);
}

.en-billing-status[hidden] { display: none; }

.en-billing-manage {
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--accent, #6ce5b1);
  border-radius: 10px;
  background: transparent;
  color: var(--accent, #6ce5b1);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.en-billing-manage:disabled { opacity: .6; cursor: progress; }

.en-pricing .card-btn[aria-busy="true"] { opacity: .6; pointer-events: none; }

.en-checkout-error {
  margin: 8px 0 0;
  color: #ff8a80;
  font-size: 14px;
}
