/*
 * hostiko-child / assets/css/auth-legal-pages.css
 * ─────────────────────────────────────────────────────────────────────────────
 * Стили для страниц авторизации и правовых документов.
 * Подключается только на нужных страницах (is_page login/register/etc.) —
 * см. functions.php, раздел 1 (hostikochild_child_enqueue_styles).
 *
 * Классы body добавляются PHP-хуком (functions.php, раздел 6):
 *   hostiko-auth-page  — login, register, remind-password
 *   hostiko-legal-page — privacy-policy
 *
 * Структура файла:
 *   1. CSS-переменные — цвета форм и поверхностей
 *   2. Контентная область — layout и фоновый градиент
 *   3. Блок формы (карточка) — размеры, отступы, тень
 *   4. Поля ввода — стили, состояния focus/invalid
 *   5. Чекбокс, ссылки, кнопка submit
 *   6. Блок подтверждения регистрации
 *   7. Правовые страницы (privacy-policy)
 *   8. Адаптивность (мобильные ≤ 767px)
 */


/* =============================================================================
  1. CSS-ПЕРЕМЕННЫЕ ФОРМ
  Все цвета поверхностей, рамок, фокуса и статусов вынесены сюда.
  ============================================================================= */

body.hostiko-auth-page,
body.hostiko-legal-page {
  --hostiko-auth-surface: #ffffff;
  --hostiko-auth-surface-soft: #fbfcff;
  --hostiko-auth-border: rgba(64, 56, 131, 0.1);
  --hostiko-auth-shadow: 0 10px 24px rgba(64, 56, 131, 0.08);
  --hostiko-auth-text: #2f2a4d;
  --hostiko-auth-text-soft: #5f5a87;
  --hostiko-auth-focus: #3b88ff;
  --hostiko-auth-focus-ring: rgba(59, 136, 255, 0.12);
  --hostiko-auth-success-bg: #eefbf3;
  --hostiko-auth-success-border: rgba(44, 140, 87, 0.24);
  --hostiko-auth-error-bg: #fff3f2;
  --hostiko-auth-error-border: rgba(208, 71, 58, 0.28);
}

body.hostiko-auth-page #primary.content-area.hostiko-page-containerr,
body.hostiko-legal-page #primary.content-area.hostiko-page-containerr {
  position: relative;
  padding: 36px 0 96px;
}
/* =============================================================================
  2. КОНТЕНТНАЯ ОБЛАСТЬ — LAYOUT И ФОНОВЫЙ ГРАДИЕНТ
  ============================================================================= */

body.hostiko-auth-page #primary.content-area.hostiko-page-containerr::before,
body.hostiko-legal-page #primary.content-area.hostiko-page-containerr::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #f9fbff 0%, #ffffff 100%);
  pointer-events: none;
}

body.hostiko-auth-page #primary.content-area.hostiko-page-containerr .container,
body.hostiko-legal-page #primary.content-area.hostiko-page-containerr .container {
  position: relative;
  z-index: 1;
}

body.hostiko-auth-page .entry-content,
body.hostiko-legal-page .entry-content {
  position: relative;
}

body.hostiko-auth-page :is(.hostiko-login-form, .hostiko-register-form, .hostiko-remindPassword-form) {
  width: min(100%, 480px);
  margin: 24px auto 0;
  padding: 34px 32px;
  background: var(--hostiko-auth-surface);
  border: 1px solid var(--hostiko-auth-border);
  border-radius: 12px;
  box-shadow: var(--hostiko-auth-shadow);
  font-family: var(--hostiko-ui-font-sans, "Jost", sans-serif);
}
/* =============================================================================
  3. БЛОК ФОРМЫ — КАРТОЧКА (размеры, отступы, тень)
  ============================================================================= */

body.hostiko-auth-page :is(.hostiko-login-form, .hostiko-register-form, .hostiko-remindPassword-form) h2 {
  margin: 0 0 14px;
  color: var(--hostiko-auth-text);
  font-family: var(--hostiko-ui-font-sans, "Jost", sans-serif);
  font-size: clamp(27px, 3vw, 32px);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.02em;
  text-align: center;
}

body.hostiko-auth-page :is(.hostiko-login-form, .hostiko-register-form, .hostiko-remindPassword-form) p,
body.hostiko-auth-page :is(.hostiko-login-form, .hostiko-register-form, .hostiko-remindPassword-form) label,
body.hostiko-auth-page :is(.hostiko-login-form, .hostiko-register-form, .hostiko-remindPassword-form) .form-links a {
  font-family: var(--hostiko-ui-font-sans, "Jost", sans-serif);
}

body.hostiko-auth-page :is(.hostiko-login-form, .hostiko-register-form, .hostiko-remindPassword-form) .form-group {
  margin-bottom: 18px;
}

body.hostiko-auth-page :is(.hostiko-login-form, .hostiko-register-form, .hostiko-remindPassword-form) .form-group label {
  display: block;
  margin-bottom: 8px;
  color: var(--hostiko-auth-text);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}

body.hostiko-auth-page :is(.hostiko-login-form, .hostiko-register-form, .hostiko-remindPassword-form) :where(input[type="password"], input[type="text"], input[type="email"], input[type="tel"]) {
  width: 100%;
  min-height: 50px;
  padding: 12px 15px;
  color: var(--hostiko-auth-text);
  background: #ffffff;
  border: 1px solid rgba(95, 90, 135, 0.22);
  border-radius: 8px;
  box-shadow: inset 0 1px 2px rgba(64, 56, 131, 0.02);
  font-size: 15px;
  line-height: 1.4;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
/* =============================================================================
  4. ПОЛЯ ВВОДА — БАЗОВЫЕ СТИЛИ, FOCUS И ОШИБКИ
  ============================================================================= */

body.hostiko-auth-page :is(.hostiko-login-form, .hostiko-register-form, .hostiko-remindPassword-form) :where(input[type="password"], input[type="text"], input[type="email"], input[type="tel"]).is-invalid {
  border-color: #d0473a;
  box-shadow: 0 0 0 3px rgba(208, 71, 58, 0.14);
}

body.hostiko-auth-page :is(.hostiko-login-form, .hostiko-register-form, .hostiko-remindPassword-form) :where(input[type="password"], input[type="text"], input[type="email"], input[type="tel"])::placeholder {
  color: #8c86b2;
}

body.hostiko-auth-page :is(.hostiko-login-form, .hostiko-register-form, .hostiko-remindPassword-form) :where(input[type="password"], input[type="text"], input[type="email"], input[type="tel"]):focus {
  border-color: var(--hostiko-auth-focus);
  box-shadow: 0 0 0 4px var(--hostiko-auth-focus-ring);
  outline: none;
}

body.hostiko-auth-page :is(.hostiko-login-form, .hostiko-register-form, .hostiko-remindPassword-form) .checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 2px;
  color: var(--hostiko-auth-text-soft);
  font-size: 14px;
  line-height: 1.55;
}
/* =============================================================================
  5. ЧЕКБОКС, ССЫЛКИ, КНОПКА SUBMIT
  ============================================================================= */

body.hostiko-auth-page :is(.hostiko-login-form, .hostiko-register-form, .hostiko-remindPassword-form) .checkbox-group input[type="checkbox"] {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--hostiko-auth-focus);
}

body.hostiko-auth-page :is(.hostiko-login-form, .hostiko-register-form, .hostiko-remindPassword-form) .checkbox-group label {
  margin: 0;
  color: var(--hostiko-auth-text-soft);
  font-size: 14px;
  font-weight: 500;
}

body.hostiko-auth-page :is(.hostiko-login-form, .hostiko-register-form, .hostiko-remindPassword-form) a {
  color: var(--hostiko-ui-link, #3b88ff);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

body.hostiko-auth-page :is(.hostiko-login-form, .hostiko-register-form, .hostiko-remindPassword-form) a:hover {
  color: var(--hostiko-ui-link-hover, #0216a2);
}

body.hostiko-auth-page :is(.hostiko-login-form, .hostiko-register-form, .hostiko-remindPassword-form) :is(.register-btn, .login-btn, .remindPassword-btn) {
  min-height: 52px;
  margin-top: 8px;
  padding: 14px 18px;
  background: var(--hostiko-auth-focus);
  border: 0;
  border-radius: 8px;
  box-shadow: 0 8px 16px rgba(59, 136, 255, 0.18);
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

body.hostiko-auth-page :is(.hostiko-login-form, .hostiko-register-form, .hostiko-remindPassword-form) :is(.register-btn, .login-btn, .remindPassword-btn):hover {
  background: var(--hostiko-ui-link-hover, #0216a2);
  box-shadow: 0 12px 24px rgba(2, 22, 162, 0.22);
}

body.hostiko-auth-page :is(.hostiko-login-form, .hostiko-register-form, .hostiko-remindPassword-form) :is(.register-btn, .login-btn, .remindPassword-btn):focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px var(--hostiko-auth-focus-ring), 0 18px 34px rgba(59, 136, 255, 0.28);
}

body.hostiko-auth-page :is(.hostiko-login-form, .hostiko-register-form, .hostiko-remindPassword-form) .form-links {
  margin-top: 18px;
  color: var(--hostiko-auth-text-soft);
}

body.hostiko-auth-page :is(.hostiko-login-form, .hostiko-register-form, .hostiko-remindPassword-form) .form-links a {
  font-size: 14px;
  font-weight: 500;
}

body.hostiko-auth-page .register-error {
  color: #9f2d23;
  background: var(--hostiko-auth-error-bg);
  border: 1px solid var(--hostiko-auth-error-border);
  border-radius: 12px;
  padding: 12px 14px;
  margin: 0 0 18px;
  font-size: 14px;
  line-height: 1.5;
}

body.hostiko-auth-page .register-confirm-block {
  width: min(100%, 520px);
  margin: 24px auto 0;
  padding: 34px 32px;
  background: #ffffff;
  border: 1px solid var(--hostiko-auth-success-border);
  border-radius: 12px;
  box-shadow: var(--hostiko-auth-shadow);
}
/* =============================================================================
  6. БЛОК ПОДТВЕРЖДЕНИЯ РЕГИСТРАЦИИ
  Показывается после успешной AJAX-отправки формы register-form.js.
  ============================================================================= */

body.hostiko-auth-page .register-confirm-title {
  color: var(--hostiko-auth-text);
  font-family: var(--hostiko-ui-font-sans, "Jost", sans-serif);
  font-size: clamp(28px, 3vw, 34px);
  font-weight: 600;
  line-height: 1.15;
}
/* =============================================================================
  7. ПРАВОВЫЕ СТРАНИЦЫ (privacy-policy и аналогичные)
  ============================================================================= */

body.hostiko-auth-page .register-confirm-text {
  color: var(--hostiko-auth-text-soft);
  font-family: var(--hostiko-ui-font-sans, "Jost", sans-serif);
  font-size: 16px;
  line-height: 1.7;
}

body.hostiko-legal-page .entry-content {
  max-width: 880px;
  margin: 0 auto;
  padding: 38px clamp(22px, 4vw, 46px) 44px;
  background: #ffffff;
  border: 1px solid var(--hostiko-auth-border);
  border-radius: 16px;
  box-shadow: var(--hostiko-auth-shadow);
}

body.hostiko-legal-page .entry-content > * {
  margin-top: 0;
  margin-bottom: 0;
}

body.hostiko-legal-page .entry-content > * + * {
  margin-top: 16px;
}

body.hostiko-legal-page .entry-content h1,
body.hostiko-legal-page .entry-content h2,
body.hostiko-legal-page .entry-content h3,
body.hostiko-legal-page .entry-content h4 {
  color: var(--hostiko-auth-text);
  font-family: var(--hostiko-ui-font-sans, "Jost", sans-serif);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

body.hostiko-legal-page .entry-content h1 {
  font-size: clamp(34px, 4vw, 42px);
  margin-bottom: 6px;
}

body.hostiko-legal-page .entry-content h2 {
  margin-top: 34px;
  font-size: clamp(24px, 3vw, 30px);
}

body.hostiko-legal-page .entry-content h3,
body.hostiko-legal-page .entry-content h4 {
  margin-top: 26px;
}

body.hostiko-legal-page .entry-content p,
body.hostiko-legal-page .entry-content li,
body.hostiko-legal-page .entry-content td,
body.hostiko-legal-page .entry-content th {
  color: var(--hostiko-auth-text-soft);
  font-size: 17px;
  line-height: 1.72;
}

body.hostiko-legal-page .entry-content ul,
body.hostiko-legal-page .entry-content ol {
  padding-left: 1.2em;
}

body.hostiko-legal-page .entry-content li + li {
  margin-top: 8px;
}

body.hostiko-legal-page .entry-content a {
  color: var(--hostiko-ui-link, #3b88ff);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

body.hostiko-legal-page .entry-content a:hover {
  color: var(--hostiko-ui-link-hover, #0216a2);
}

body.hostiko-legal-page .entry-content table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 14px;
}

body.hostiko-legal-page .entry-content th,
body.hostiko-legal-page .entry-content td {
  padding: 12px 14px;
  border: 1px solid rgba(95, 90, 135, 0.12);
}

body.hostiko-legal-page .entry-content th {
  color: var(--hostiko-auth-text);
  background: rgba(59, 136, 255, 0.06);
  font-weight: 600;
}

@media (max-width: 767px) {
  body.hostiko-auth-page #primary.content-area.hostiko-page-containerr,
  body.hostiko-legal-page #primary.content-area.hostiko-page-containerr {
    padding: 24px 0 72px;
  }
}
/* =============================================================================
  8. АДАПТИВНОСТЬ — МОБИЛЬНЫЕ УСТРОЙСТВА (≤ 767px)
  ============================================================================= */

@media (max-width: 767px) {
  body.hostiko-auth-page :is(.hostiko-login-form, .hostiko-register-form, .hostiko-remindPassword-form),
  body.hostiko-auth-page .register-confirm-block {
    margin-top: 16px;
    padding: 24px 18px;
    border-radius: 10px;
  }

  body.hostiko-auth-page :is(.hostiko-login-form, .hostiko-register-form, .hostiko-remindPassword-form) h2,
  body.hostiko-auth-page .register-confirm-title {
    font-size: 26px;
  }

  body.hostiko-auth-page :is(.hostiko-login-form, .hostiko-register-form, .hostiko-remindPassword-form) .checkbox-group {
    gap: 8px;
  }

  body.hostiko-auth-page :is(.hostiko-login-form, .hostiko-register-form, .hostiko-remindPassword-form) :is(.register-btn, .login-btn, .remindPassword-btn) {
    min-height: 50px;
  }

  body.hostiko-legal-page .entry-content {
    padding: 24px 18px 30px;
    border-radius: 12px;
  }

  body.hostiko-legal-page .entry-content h1 {
    font-size: 30px;
  }

  body.hostiko-legal-page .entry-content h2 {
    font-size: 24px;
    margin-top: 28px;
  }

  body.hostiko-legal-page .entry-content p,
  body.hostiko-legal-page .entry-content li,
  body.hostiko-legal-page .entry-content td,
  body.hostiko-legal-page .entry-content th {
    font-size: 16px;
  }
}
