/* === FLORA /my-account/ login — редакторский минимализм ================= */

/* Выключаем старые заголовки WooCommerce */
.woocommerce-account .entry-title,
.woocommerce-account .page-title,
.woocommerce-account h1.entry-title,
.woocommerce-account .content-area > article > header,
.woocommerce-account article.page > header.entry-header,
.woocommerce-account .woocommerce > h2:first-child {
    display: none !important;
}

.fa-auth-page {
    --fa-blue: #187b4b;
    --fa-blue-ink: #105f39;
    --fa-blue-deep: #0d4a2c;
    --fa-surface: #ffffff;
    --fa-bg: #f8fafc;
    --fa-line: #e2e8f0;
    --fa-line-soft: #f1f5f9;
    --fa-ink: #0f172a;
    --fa-ink-soft: #475569;
    --fa-muted: #64748b;
    --fa-radius: 18px;
    --fa-radius-sm: 10px;
    --fa-shadow: 0 1px 3px rgba(15, 23, 42, .04), 0 12px 40px -16px rgba(30, 61, 108, .18);

    max-width: 480px;
    margin: 32px auto 64px;
    padding: 0 20px;
    color: var(--fa-ink);
    font-family: 'Source Sans Pro', 'Segoe UI', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.fa-auth-head {
    text-align: center;
    margin: 0 0 28px;
}
.fa-auth-title {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.025em;
    margin: 0 0 8px;
    color: var(--fa-ink);
    line-height: 1.1;
}
.fa-auth-sub {
    font-size: 15px;
    color: var(--fa-muted);
    margin: 0;
    line-height: 1.55;
}

/* Карточка */
.fa-auth-card {
    background: var(--fa-surface);
    border: 1px solid var(--fa-line);
    border-radius: var(--fa-radius);
    box-shadow: var(--fa-shadow);
    overflow: hidden;
}

/* Tabs */
.fa-auth-tabs {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-bottom: 1px solid var(--fa-line);
    background: var(--fa-bg);
}
.fa-auth-tab {
    appearance: none;
    background: transparent;
    border: 0;
    padding: 16px 12px;
    font: 600 14px/1 'Source Sans Pro', system-ui, sans-serif;
    color: var(--fa-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: color .18s ease, background .18s ease;
}
.fa-auth-tab:hover { color: var(--fa-ink-soft); }
.fa-auth-tab:focus-visible {
    outline: none;
    box-shadow: inset 0 0 0 3px rgba(24, 123, 75, .45);
    border-radius: 4px;
}
/* Общий фокус-ринг ЛК — `body.woocommerce-account :where(a,button,…):focus-visible
   { outline: 3px solid rgba(24,123,75,.25) !important; outline-offset: 2px }` —
   у табов срезается `overflow:hidden` карточки: видна только полоска слева и
   снизу (F161). Даём внутреннее кольцо, которое срезать нельзя.
   !important тут вынужденный — перебиваем чужой !important. */
.woocommerce-account .fa-auth-tabs .fa-auth-tab:focus-visible {
    outline: none !important;
}
.fa-auth-link:focus-visible,
.fa-auth-eye:focus-visible {
    outline: 2px solid var(--fa-blue);
    outline-offset: 2px;
    border-radius: 6px;
}
.fa-auth-tab.is-active {
    color: var(--fa-blue);
    background: var(--fa-surface);
}
.fa-auth-tab-ico {
    font-size: 15px;
    line-height: 1;
}
.fa-auth-tabs-indicator {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 50%;
    height: 2px;
    background: var(--fa-blue);
    transition: transform .24s cubic-bezier(.45,.05,.55,.95);
    transform: translateX(0);
}
.fa-auth-tabs[data-pos="1"] .fa-auth-tabs-indicator { transform: translateX(100%); }

/* Панели */
.fa-auth-panel { padding: 28px 24px 24px; }
.fa-auth-panel[hidden] { display: none; }

/* Форма */
.fa-auth-form {
    display: grid;
    gap: 14px;
}
.fa-auth-step { display: grid; gap: 14px; animation: faFadeIn .2s ease-out; }
.fa-auth-step[hidden] { display: none; }

.fa-auth-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--fa-ink-soft);
    letter-spacing: 0.01em;
    margin: 0;
}

.fa-auth-input-shell {
    border: 1px solid var(--fa-line);
    border-radius: var(--fa-radius-sm);
    background: var(--fa-surface);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.fa-auth-input-shell:focus-within {
    border-color: var(--fa-blue);
    box-shadow: 0 0 0 4px rgba(24, 123, 75, .18);
}
.fa-auth-input-shell input {
    width: 100%;
    padding: 14px 16px;
    border: 0;
    background: transparent;
    font: 500 16px/1.2 'Source Sans Pro', system-ui, sans-serif;
    color: var(--fa-ink);
    outline: none;
    box-sizing: border-box;
}
.fa-auth-input-shell input::placeholder { color: #94a3b8; font-weight: 400; }

/* Поле с кнопкой действия (показ пароля) */
.fa-auth-input-shell--action { display: flex; align-items: stretch; }
.fa-auth-input-shell--action input { flex: 1 1 auto; min-width: 0; }
.fa-auth-eye {
    appearance: none;
    background: transparent;
    border: 0;
    cursor: pointer;
    flex: 0 0 auto;
    width: 46px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: var(--fa-muted);
    opacity: .55;
    transition: opacity .15s ease;
}
.fa-auth-eye:hover { opacity: 1; }
.fa-auth-eye[aria-pressed="true"] { opacity: 1; }
.fa-auth-eye-ico { font-size: 17px; line-height: 1; }

.fa-auth-input-shell--code input {
    text-align: center;
    letter-spacing: 10px;
    font-size: 22px;
    font-weight: 700;
    padding: 16px 8px;
}

.fa-auth-masked {
    font-size: 14px;
    color: var(--fa-ink-soft);
    background: var(--fa-line-soft);
    padding: 10px 14px;
    border-radius: var(--fa-radius-sm);
    margin: 0;
    text-align: center;
}

.fa-auth-note {
    font-size: 13px;
    color: var(--fa-muted);
    line-height: 1.5;
    margin: 2px 0 0;
}

/* Кнопки */
.fa-auth-btn {
    appearance: none;
    border: 0;
    border-radius: var(--fa-radius-sm);
    padding: 14px 20px;
    font: 700 15px/1 'Source Sans Pro', system-ui, sans-serif;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
    margin-top: 2px;
}
.fa-auth-btn--primary {
    background: var(--fa-blue);
    color: #fff;
    box-shadow: 0 4px 14px -4px rgba(24, 123, 75, .45);
}
.fa-auth-btn--primary:hover:not(:disabled) {
    background: var(--fa-blue-ink);
    transform: translateY(-1px);
    box-shadow: 0 8px 22px -8px rgba(24, 123, 75, .4);
}
.fa-auth-btn--primary:active:not(:disabled) { transform: translateY(0); }
.fa-auth-btn--ghost {
    background: var(--fa-surface);
    color: var(--fa-blue);
    border: 1px solid var(--fa-blue);
}
.fa-auth-btn--ghost:hover {
    background: var(--fa-blue);
    color: #fff;
}
.fa-auth-btn:disabled { opacity: .55; cursor: default; transform: none; box-shadow: none; }

/* Чекбокс remember */
.fa-auth-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--fa-ink-soft);
    user-select: none;
    cursor: pointer;
    margin-top: -4px;
}
.fa-auth-remember input { accent-color: var(--fa-blue); width: 16px; height: 16px; }

/* Вспомогательные ссылки/кнопки-ссылки */
.fa-auth-aux {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
}
.fa-auth-aux--centered { justify-content: center; }
.fa-auth-link {
    background: transparent;
    border: 0;
    /* Зона нажатия не меньше 44px: сама подпись остаётся 13px (F160) */
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 12px 0;
    font: 600 13px/1.2 'Source Sans Pro', system-ui, sans-serif;
    color: var(--fa-blue);
    cursor: pointer;
    text-decoration: none;
}
.fa-auth-link:hover:not(:disabled) { text-decoration: underline; }
.fa-auth-link--muted { color: var(--fa-muted); font-weight: 500; }
/* Счётчик до повторной SMS — это информация, а не «серый выключенный контрол»:
   #94a3b8 давал контраст 2.6:1 (F164) */
.fa-auth-link:disabled { color: var(--fa-muted); cursor: default; }

/* Алерт */
.fa-auth-alert {
    padding: 12px 14px;
    border-radius: var(--fa-radius-sm);
    font-size: 14px;
    line-height: 1.45;
    animation: faFadeIn .18s ease-out;
}
.fa-auth-alert--error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}
.fa-auth-alert--success {
    background: #ecfdf5;
    color: #166534;
    border: 1px solid #bbf7d0;
}

/* Регистрация: раскрывающаяся секция под картой */
.fa-auth-register {
    margin-top: 20px;
    border: 1px solid var(--fa-line);
    border-radius: var(--fa-radius);
    background: var(--fa-surface);
    overflow: hidden;
}
.fa-auth-register-toggle {
    width: 100%;
    background: transparent;
    border: 0;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: var(--fa-ink-soft);
    transition: background .15s;
    text-align: left;
}
.fa-auth-register-toggle:hover { background: var(--fa-bg); }
.fa-auth-register-toggle strong {
    color: var(--fa-blue);
    font-weight: 700;
}
.fa-auth-register-chev {
    margin-left: auto;
    font-size: 18px;
    color: var(--fa-muted);
    transition: transform .2s ease;
}
.fa-auth-register[aria-expanded="true"] .fa-auth-register-chev,
.fa-auth-register-toggle[aria-expanded="true"] .fa-auth-register-chev {
    transform: rotate(180deg);
}
.fa-auth-register-body {
    padding: 0 20px 20px;
    border-top: 1px solid var(--fa-line-soft);
    animation: faFadeIn .2s ease-out;
}
.fa-auth-register-body[hidden] { display: none; }
.fa-auth-register-intro {
    font-size: 14px;
    color: var(--fa-ink-soft);
    line-height: 1.55;
    margin: 16px 0 18px;
    padding: 14px 16px;
    background: var(--fa-bg);
    border-radius: var(--fa-radius-sm);
    border-left: 3px solid var(--fa-blue);
}

/* Глобальные правила ЛК (inc/flora-account.php, wp_head) красят ЛЮБОЙ input
   рамкой 2px, своим радиусом и 16px !important, а кнопку submit — синим
   градиентом. Внутри карточки входа рамку рисует .fa-auth-input-shell, поэтому
   поле обнуляем: иначе две концентрические рамки и убитый шрифт кода (F157),
   а вторичная кнопка регистрации теряет ghost-стиль (F163). */
.woocommerce-account .fa-auth-card .fa-auth-input-shell input,
.woocommerce-account .fa-auth-register .fa-auth-input-shell input {
    border: 0 !important;
    border-radius: 0 !important;
    padding: 14px 16px !important;
    background: transparent !important;
    box-shadow: none !important;
}
.woocommerce-account .fa-auth-card .fa-auth-input-shell input:focus,
.woocommerce-account .fa-auth-register .fa-auth-input-shell input:focus {
    transform: none !important;
    box-shadow: none !important;
    border-color: transparent !important;
}
.woocommerce-account .fa-auth-card .fa-auth-input-shell--code input {
    font-size: 22px !important;
    padding: 16px 8px !important;
}
.woocommerce-account .fa-auth-register button.fa-auth-btn--ghost {
    background: var(--fa-surface) !important;
    background-image: none !important;
    color: var(--fa-blue) !important;
    border: 1px solid var(--fa-blue) !important;
    box-shadow: none !important;
}
.woocommerce-account .fa-auth-register button.fa-auth-btn--ghost:hover {
    background: var(--fa-blue) !important;
    background-image: none !important;
    color: #fff !important;
}

/* Юридическая сноска WooCommerce внутри карточки регистрации: по умолчанию она
   крупнее и темнее подписей самой формы, а ссылка — фиолетовая (F223) */
.fa-auth-register-body .woocommerce-privacy-policy-text p {
    font-size: 13px;
    line-height: 1.5;
    color: var(--fa-muted);
    margin: 0 0 12px;
}
.fa-auth-register-body .woocommerce-privacy-policy-text a { color: var(--fa-blue); }

/* WooCommerce notices */
.woocommerce-notices-wrapper {
    margin: 0 0 18px;
}
.woocommerce-notices-wrapper .woocommerce-error,
.woocommerce-notices-wrapper .woocommerce-message,
.woocommerce-notices-wrapper .woocommerce-info {
    border-radius: var(--fa-radius-sm) !important;
    border: 1px solid transparent !important;
    padding: 14px 18px !important;
    font-size: 14px !important;
}

@keyframes faFadeIn {
    from { opacity: 0; transform: translateY(3px); }
    to   { opacity: 1; transform: translateY(0);  }
}

/* Mobile */
@media (max-width: 520px) {
    .fa-auth-page { margin: 16px auto 40px; padding: 0 16px; }
    .fa-auth-title { font-size: 26px; }
    .fa-auth-sub { font-size: 14px; }
    .fa-auth-tab { padding: 14px 10px; font-size: 13px; }
    .fa-auth-panel { padding: 22px 18px 20px; }
    .fa-auth-input-shell--code input { letter-spacing: 8px; font-size: 20px; }
    .woocommerce-account .fa-auth-card .fa-auth-input-shell--code input { font-size: 20px !important; }
}
