/*
 * ============================================================================
 * inc/snowman-register/assets/snowman-register.css — стили формы анкеты Снеговика
 * ============================================================================
 *
 * @version    1.7.1
 * @build      2026-10-22-133000
 * @generated  2026-10-22 13:30:00 (MSK)
 *
 * НАЗНАЧЕНИЕ:
 *   - Оформление трёхшаговой формы регистрации/актуализации Снеговика.
 *   - Использует CSS-переменные из cabinet.css (--tst-cabinet-*).
 *   - Подключается на /anketa-snegovika/ и /cabinet-login/.
 *
 * ИЗМЕНЕНИЯ ОТ v1.7.0:
 *   - Блок .tst-field input[...]: добавлено box-sizing: border-box.
 *     Без него padding 14px + border 1px выходили за пределы контейнера
 *     и поля анкеты (шаг 3) вылезали за рамки карточки.
 *
 * ОТКУДА ВЫЗЫВАЕТСЯ:
 *   - inc/snowman-register/class-snowman-register.php (wp_enqueue_style).
 *   - inc/cabinet/cabinet-config.php (страница /cabinet-login/).
 *
 * ВНЕШНИЕ ЗАВИСИМОСТИ:
 *   - CSS-переменные --tst-cabinet-* из cabinet.css (fallback заданы).
 *
 * ИСТОРИЯ ОБНОВЛЕНИЙ:
 *   v1.7.0 — 2026-10-21 — актуальная версия из аудита.
 *   v1.7.1 — 2026-10-22 — box-sizing: border-box для полей анкеты.
 *
 * ============================================================================
 */

.tst-snowman-register {
    /* Используем переменные из cabinet.css, чтобы не дублировать */
    --tst-sr-primary: var(--tst-cabinet-primary, #1e6fd9);
    --tst-sr-primary-hover: var(--tst-cabinet-primary-hover, #1558b0);
    --tst-sr-text: var(--tst-cabinet-text, #1f2733);
    --tst-sr-muted: var(--tst-cabinet-muted, #6b7688);
    --tst-sr-border: var(--tst-cabinet-border, #e2e6ee);
    --tst-sr-bg: var(--tst-cabinet-card-bg, #ffffff);
    --tst-sr-bg-soft: var(--tst-cabinet-bg, #f7f9fc);
    --tst-sr-danger: var(--tst-cabinet-danger, #c0392b);
    --tst-sr-success: var(--tst-cabinet-success, #1e8449);
    --tst-sr-radius: var(--tst-cabinet-radius, 10px);

    display: block;
    color: var(--tst-sr-text);
    font-family: inherit;
    font-size: 16px;
    line-height: 1.5;
    background: var(--tst-sr-bg-soft);
    padding: 32px 24px;
    border-radius: var(--tst-sr-radius);
}

.tst-snowman-register *,
.tst-snowman-register *::before,
.tst-snowman-register *::after {
    box-sizing: border-box;
}

.tst-progress {
    margin: 0 0 24px;
}

.tst-progress__bar {
    height: 6px;
    width: 100%;
    border-radius: 3px;
    background: var(--tst-sr-border);
    overflow: hidden;
}

.tst-progress__fill {
    height: 100%;
    background: var(--tst-sr-primary);
    transition: width 0.3s ease;
}

.tst-progress__text {
    margin-top: 8px;
    text-align: right;
    font-size: 13px;
    color: var(--tst-sr-muted);
}

.tst-step {
    margin-bottom: 24px;
}

.tst-step-hidden {
    display: none !important;
}

.tst-title {
    margin: 0 0 16px;
    font-size: 24px;
    font-weight: 700;
    color: var(--tst-sr-text);
}

.tst-text {
    margin: 0 0 20px;
    font-size: 15px;
    line-height: 1.55;
    color: var(--tst-sr-text);
}

.tst-message {
    display: none;
    margin: 0 0 16px;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.4;
}

.tst-message.is-error {
    display: block;
    background: #fdecea;
    color: var(--tst-sr-danger);
    border: 1px solid #f5c6cb;
}

.tst-message.is-success {
    display: block;
    background: #e6f7ec;
    color: var(--tst-sr-success);
    border: 1px solid #c3e6cb;
}

.tst-message.is-info {
    display: block;
    background: #eaf2fb;
    color: var(--tst-sr-primary);
    border: 1px solid #c7dbf5;
}

.tst-field {
    margin-bottom: 20px;
}

.tst-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: var(--tst-sr-text);
}

.tst-field--required > label .tst-required-mark {
    color: var(--tst-sr-danger);
    margin-left: 2px;
}

.tst-field input[type="text"],
.tst-field input[type="email"],
.tst-field input[type="tel"],
.tst-field input[type="url"],
.tst-field input[type="number"] {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    border: 1px solid var(--tst-sr-border);
    border-radius: 8px;
    background: var(--tst-sr-bg);
    color: var(--tst-sr-text);
    font-size: 16px;
    line-height: 1.3;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tst-field input:focus {
    outline: none;
    border-color: var(--tst-sr-primary);
    box-shadow: 0 0 0 3px rgba(30, 111, 217, 0.15);
}

.tst-field input.is-invalid {
    border-color: var(--tst-sr-danger);
    box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.15);
}

.tst-field__hint {
    margin: 6px 0 0;
    font-size: 12px;
    color: var(--tst-sr-muted);
    line-height: 1.4;
}

.tst-otp {
    display: grid;
    grid-template-columns: repeat(6, minmax(40px, 1fr));
    gap: 8px;
    max-width: 360px;
    box-sizing: border-box;
}

.tst-otp__cell {
    width: 100%;
    height: 56px;
    padding: 0;
    border: 1px solid var(--tst-sr-border);
    border-radius: 8px;
    background: var(--tst-sr-bg);
    color: var(--tst-sr-text);
    font-size: 22px;
    font-weight: 600;
    text-align: center;
    box-sizing: border-box;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    -moz-appearance: textfield;
}

.tst-otp__cell::-webkit-outer-spin-button,
.tst-otp__cell::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.tst-otp__cell:focus {
    outline: none;
    border-color: var(--tst-sr-primary);
    box-shadow: 0 0 0 3px rgba(30, 111, 217, 0.15);
}

.tst-otp__cell.is-invalid {
    border-color: var(--tst-sr-danger);
    box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.15);
}

.tst-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 40px;
    padding: 0 18px;
    border-radius: 8px;
    border: 1px solid var(--tst-sr-border);
    background: var(--tst-sr-bg);
    color: var(--tst-sr-text);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.tst-btn:hover {
    background: var(--tst-sr-bg-soft);
}

.tst-btn--primary {
    background: var(--tst-sr-primary);
    border-color: var(--tst-sr-primary);
    color: #fff;
}

.tst-btn--primary:hover {
    background: var(--tst-sr-primary-hover);
    border-color: var(--tst-sr-primary-hover);
}

.tst-btn--primary:disabled,
.tst-btn--primary.is-loading {
    opacity: 0.6;
    cursor: not-allowed;
}

.tst-btn--ghost {
    background: transparent;
    border-color: transparent;
    color: var(--tst-sr-muted);
}

.tst-btn--ghost:hover {
    color: var(--tst-sr-text);
    background: transparent;
}

.tst-btn--link {
    height: auto;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--tst-sr-primary);
    text-decoration: underline;
}

.tst-btn--link:hover {
    color: var(--tst-sr-primary-hover);
}

.tst-form-email__actions,
.tst-form-code__actions,
.tst-form-anketa__actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 8px;
}

.tst-form-code__actions-left {
    margin-right: auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

.tst-block {
    margin: 0 0 20px;
    padding: 20px;
    border-radius: var(--tst-sr-radius);
    background: var(--tst-sr-bg);
    border: 1px solid var(--tst-sr-border);
}

.tst-block__title {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 600;
    color: var(--tst-sr-text);
}

.tst-block__subtitle {
    margin: 0 0 16px;
    font-size: 13px;
    color: var(--tst-sr-muted);
}

.tst-radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 8px;
}

.tst-radio-group--inline {
    flex-direction: row;
    flex-wrap: wrap;
}

.tst-radio {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--tst-sr-text);
    cursor: pointer;
}

.tst-radio input[type="radio"] {
    margin: 0;
    accent-color: var(--tst-sr-primary);
}

.tst-required-mark {
    color: var(--tst-sr-danger);
    margin-left: 2px;
}

.tst-child-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0 0 20px;
}

.tst-child-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: var(--tst-sr-radius);
    border: 1px solid var(--tst-sr-border);
    background: var(--tst-sr-bg);
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tst-child-card:hover {
    border-color: var(--tst-sr-primary);
    box-shadow: 0 0 0 3px rgba(30, 111, 217, 0.1);
}

.tst-child-card.is-active {
    border-color: var(--tst-sr-primary);
    box-shadow: 0 0 0 3px rgba(30, 111, 217, 0.15);
}

.tst-child-card__img-wrap {
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--tst-sr-bg-soft);
    overflow: hidden;
}

.tst-child-card__photo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tst-child-card__info {
    flex: 1 1 auto;
    min-width: 0;
}

.tst-child-card__name {
    margin: 0 0 2px;
    font-size: 15px;
    font-weight: 600;
    color: var(--tst-sr-text);
}

.tst-child-card__meta {
    margin: 0;
    font-size: 13px;
    color: var(--tst-sr-muted);
    line-height: 1.4;
}

.tst-child-card-main {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 0 0 20px;
    padding: 16px;
    border-radius: var(--tst-sr-radius);
    background: var(--tst-sr-bg);
    border: 1px solid var(--tst-sr-border);
}

.tst-child-card-main__img-wrap {
    flex: 0 0 72px;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--tst-sr-bg-soft);
}

.tst-child-card-main__photo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tst-child-card-main__info {
    flex: 1 1 auto;
    min-width: 0;
}

.tst-child-card-main__name {
    margin: 0 0 4px;
    font-size: 18px;
    font-weight: 600;
    color: var(--tst-sr-text);
}

.tst-child-card-main__meta {
    margin: 0;
    font-size: 14px;
    color: var(--tst-sr-muted);
    line-height: 1.45;
}

@media (max-width: 768px) {
    .tst-snowman-register {
        padding: 24px 16px;
    }

    .tst-title {
        font-size: 20px;
    }

    .tst-block {
        padding: 16px;
    }

    .tst-radio-group--inline {
        flex-direction: column;
        align-items: flex-start;
    }

    .tst-form-email__actions,
    .tst-form-code__actions,
    .tst-form-anketa__actions {
        flex-direction: column-reverse;
    }

    .tst-form-code__actions-left {
        margin-right: 0;
        justify-content: flex-start;
    }

    .tst-btn {
        width: 100%;
    }

    .tst-btn--link {
        width: auto;
    }

    .tst-otp {
        grid-template-columns: repeat(6, 1fr);
        gap: 6px;
    }

    .tst-otp__cell {
        height: 48px;
        font-size: 20px;
    }
}

/*
 * ----------------------------------------------------------------------------
 * Файл:    snowman-register.css
 * Версия:  v1.7.1
 * Путь:    wp-content/themes/tstnext/inc/snowman-register/assets/snowman-register.css
 * Дата:    2026-10-22
 * Время:   13:30:00 (MSK)
 * ----------------------------------------------------------------------------
 * Commit:  snowman-register.css: box-sizing: border-box для полей анкеты
 * ----------------------------------------------------------------------------
 */