/* =========================================
   Базовые настройки и сброс стилей
========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@font-face {
    font-family: 'oskelly';
    src: url('../fonts/SFProText-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

html, body {
    height: 100%;
    /* Мягкий светлый фон для всей страницы */
    background-color: #f4f7f9; 
    font-family: "oskelly", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #334155; /* Темно-серый текст для комфортного чтения */
    -webkit-font-smoothing: antialiased;
}

/* =========================================
   Логотип
========================================= */
.logo {
    width: 170px;
    height: 30px;
    margin: 0 auto 28px auto; /* Центрируем логотип по горизонтали */
    background-image: url(../images/logo.png);
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    display: block;
}

/* =========================================
   Контейнер формы (Карточка)
========================================= */
.osmi-form {
    max-width: 480px;
    margin: 40px auto;
    background: #ffffff;
    padding: 35px 40px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05); /* Легкая тень для объема */
}

.osmi-form__step {
    border: none;
    margin: 0;
    padding: 0;
    min-width: 0;
}

/* =========================================
   Поля ввода (Inputs)
========================================= */
.form-field {
    margin-bottom: 10px; /* Уменьшено с 20px для сокращения расстояния между полями */
    position: relative;
}

.form-field__label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #475569;
    text-align: center;
}

.form-field__input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background-color: #ffffff;
    color: #1e293b;
    font-size: 15px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-field__input::placeholder {
    color: #94a3b8;
}

/* Эффект при клике на поле */
.form-field__input:focus {
    border-color: #3b82f6; /* Приятный синий акцент */
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* Состояние ошибки */
.input-error {
    border-color: #ef4444 !important; /* Красная рамка */
    background-color: #fef2f2;
}

.form-field__error-text {
    display: block;
    color: #ef4444;
    font-size: 12px;
    margin-top: 6px;
    min-height: 15px; /* Резервируем место, чтобы форма не прыгала */
}

/* =========================================
   Радиокнопки (Выбор пола)
========================================= */
.form-field__options {
    display: flex;
    justify-content: center; /* Центрируем выбор пола */
    gap: 25px;
    margin-top: 10px;
}

.form-field__option {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.form-field__radio-input {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    accent-color: #3b82f6; /* Синий цвет активной кнопки */
    cursor: pointer;
}

.form-field__radio-text {
    font-size: 15px;
    color: #334155;
}

.form-field__options + .form-field__error-text {
    text-align: center;
}

/* =========================================
   Чекбокс и Оферта
========================================= */
.form-field__checkbox-wrapper {
    display: flex;
    justify-content: space-between; /* Расталкивает текст и чекбокс по разным краям */
    align-items: center; /* Выравнивает их ровно по центру по вертикали */
    width: 100%; /* Гарантирует, что строка растянется на всю ширину формы */
    cursor: pointer;
    margin-top: 10px;
}

.form-field__checkbox-input {
    width: 18px;
    height: 18px;
    margin: 0 0 0 15px; /* Убрали старый margin-right и добавили отступ слева на случай узких экранов */
    accent-color: #3b82f6;
    flex-shrink: 0;
    cursor: pointer;
}

.form-field__checkbox-text {
    font-size: 13px;
    color: #64748b;
    line-height: 1.5;
}

.osmi-form__link {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
}

.osmi-form__link:hover {
    text-decoration: underline;
}

/* =========================================
   Кнопки
========================================= */
.button {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    margin-top: 15px; /* Добавлен отступ для кнопки, чтобы она не слипалась с верхними элементами после уменьшения gap */
}

/* Кнопка "Получить код" */
.button--action {
    background-color: #f1f5f9;
    color: #3b82f6;
    border: 1px solid #e2e8f0;
}

.button--action:hover:not(:disabled) {
    background-color: #e2e8f0;
}

/* Главная кнопка "Подтвердить" */
.button--submit {
    background-color: #3b82f6;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

.button--submit:hover:not(:disabled) {
    background-color: #2563eb; /* Чуть темнее при наведении */
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.35);
}

.button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

/* =========================================
   Вспомогательные элементы
========================================= */
.form-field--hidden {
    display: none !important;
}

.warning {
    max-width: 480px;
    margin: 20px auto 0;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    min-height: 20px;
    padding: 0 20px;
}

.osk-subheader {
    font-size: 22px;
    font-weight: 600;
    color: #1e293b; /* Темно-синий, почти черный, для акцента на заголовке */
    text-align: center;
    margin-bottom: 8px;
}

.osk-subtext {
    font-size: 14px;
    color: #64748b; /* Приглушенный серо-синий цвет, как у текста чекбокса */
    text-align: center;
    line-height: 1.5;
    margin-bottom: 25px; /* Достаточный отступ до первого поля формы */
}

/* =========================================
   Адаптивность для мобильных (Media Queries)
========================================= */
@media only screen and (max-width: 520px) {
    body {
        background-color: #ffffff; /* На мобилках убираем серый фон */
    }
    
    .osmi-form {
        margin: 0 auto;
        padding: 25px 20px;
        box-shadow: none;
        border-radius: 0;
    }
    
    .warning {
        margin-top: 15px;
    }
	
	.osk-subheader {
        font-size: 20px;
    }
    
    .osk-subtext {
        margin-bottom: 20px;
    }
}