@font-face {
    font-family: 'Inter';

    src: url("./assets/fonts/Inter.ttf") format("truetype");

    font-weight: normal;
    font-style: normal;

    font-display: swap;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;

    min-height: 100%;

    font-family: 'Inter', sans-serif;
}

body {
    background-color: #eaeaea;
}


/* ============================================== */
/* Страница */
/* ============================================== */

.form-page {
    width: 100%;
    min-height: 100vh;

    padding: 30px 20px;

    display: flex;
    justify-content: center;
    align-items: center;
}


/* ============================================== */
/* Карточка */
/* ============================================== */

.form-card {
    width: 100%;
    max-width: 500px;

    padding: 35px;

    background-color: white;

    border-radius: 16px;

    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.12);
}


/* ============================================== */
/* Логотип */
/* ============================================== */

.logo {
    display: flex;
    align-items: center;
    justify-content: center;

    margin-bottom: 30px;
}

.logo-img {
    width: 40px;
    height: 40px;

    border-radius: 8px;
}

.logo-text {
    margin: 0 0 0 7px;

    font-size: 22px;
}


/* ============================================== */
/* Заголовки */
/* ============================================== */

.step h2,
.state-screen h2 {
    margin: 0 0 25px;

    text-align: center;

    font-size: 28px;
    line-height: 1.2;
}

.step-description {
    margin: 0 0 30px;

    color: #666;

    text-align: center;

    font-size: 15px;

    line-height: 1.4;
}


/* ============================================== */
/* Поля */
/* ============================================== */

.form-group {
    display: flex;
    flex-direction: column;

    gap: 8px;

    margin-bottom: 18px;
}

.form-group label {
    font-size: 14px;
    font-weight: 600;
}

.form-group label span {
    color: #567cee;
}

.form-group input,
.form-group select {
    width: 100%;
    min-height: 48px;

    padding: 12px 14px;

    border: 1px solid #d0d0d0;
    border-radius: 9px;

    outline: none;

    background-color: white;
    color: #111;

    font-family: inherit;
    font-size: 16px;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #567cee;

    box-shadow:
        0 0 0 3px rgba(86, 124, 238, 0.12);
}

.form-group input:disabled,
.form-group select:disabled {
    cursor: not-allowed;

    background-color: #f2f2f2;
    color: #777;
}

.form-group input::placeholder {
    color: #999;
}


/* ============================================== */
/* Input suffix */
/* ============================================== */

.input-suffix {
    position: relative;
}

.input-suffix input {
    padding-right: 55px;
}

.input-suffix span {
    position: absolute;

    top: 50%;
    right: 14px;

    transform: translateY(-50%);

    color: #777;

    font-size: 14px;

    pointer-events: none;
}


/* ============================================== */
/* Согласия */
/* ============================================== */

.consent-list {
    display: flex;
    flex-direction: column;

    gap: 15px;

    margin-bottom: 20px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;

    gap: 10px;

    color: #333;

    font-size: 14px;
    line-height: 1.4;

    cursor: pointer;
}

.checkbox-label input {
    width: 18px;
    height: 18px;

    flex-shrink: 0;

    margin: 1px 0 0;

    accent-color: #567cee;

    cursor: pointer;
}


/* ============================================== */
/* Captcha */
/* ============================================== */

.captcha-placeholder {
    width: 100%;

    margin-bottom: 20px;
    padding: 14px;

    border: 1px dashed #c8c8c8;
    border-radius: 9px;

    background-color: #f7f7f7;

    text-align: center;
}

.captcha-placeholder-title {
    margin-bottom: 5px;

    font-size: 14px;
    font-weight: 600;
}

.captcha-placeholder-description,
.captcha-placeholder-status {
    color: #888;

    font-size: 13px;
}

.captcha-placeholder-status {
    margin-top: 5px;
}


/* ============================================== */
/* Кнопки */
/* ============================================== */

.primary-button,
.secondary-button {
    width: 100%;
    min-height: 48px;

    padding: 12px 20px;

    border-radius: 9px;

    font-family: inherit;
    font-size: 16px;

    cursor: pointer;

    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.primary-button {
    border: none;

    color: white;

    background-color: #567cee;
}

.primary-button:hover:not(:disabled) {
    background-color: #4669d1;

    transform: translateY(-1px);
}

.primary-button:disabled {
    cursor: not-allowed;

    opacity: 0.5;
}

.secondary-button {
    border: 1px solid #d0d0d0;

    color: #333;

    background-color: white;
}

.secondary-button:hover {
    background-color: #f5f5f5;
}

.button-row {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 10px;

    margin-top: 8px;
}


/* ============================================== */
/* Скрытые элементы */
/* ============================================== */

.hidden {
    display: none !important;
}


/* ============================================== */
/* Экраны состояния */
/* ============================================== */

.state-screen {
    text-align: center;
}

.state-screen p {
    margin: 0;

    color: #666;

    font-size: 15px;
    line-height: 1.5;
}


/* ============================================== */
/* Loader */
/* ============================================== */

.loader {
    width: 42px;
    height: 42px;

    margin: 0 auto 25px;

    border: 4px solid #e0e0e0;
    border-top-color: #567cee;

    border-radius: 50%;

    animation: spin 0.8s linear infinite;
}

@keyframes spin {

    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}


/* ============================================== */
/* Ошибка */
/* ============================================== */

.error-icon {
    width: 48px;
    height: 48px;

    margin: 0 auto 20px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    color: white;

    background-color: #d9534f;

    font-size: 26px;
    font-weight: 700;
}


/* ============================================== */
/* Успех */
/* ============================================== */

.success-icon {
    width: 48px;
    height: 48px;

    margin: 0 auto 20px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    color: white;

    background-color: #4caf50;

    font-size: 25px;
    font-weight: 700;
}


/* ============================================== */
/* Реферальная ссылка */
/* ============================================== */

.success-referral {
    width: 100%;

    margin: 25px 0;

    text-align: left;
}

.success-referral-label {
    display: block;

    margin-bottom: 8px;

    color: #666;

    font-size: 13px;
    font-weight: 600;
}

.success-referral input {
    width: 100%;

    min-height: 48px;

    padding: 12px 14px;

    border: 1px solid #d0d0d0;
    border-radius: 9px;

    outline: none;

    background-color: #f7f7f7;
    color: #555;

    font-family: inherit;
    font-size: 14px;
}


/* ============================================== */
/* Телефон */
/* ============================================== */

@media (max-width: 600px) {

    .form-page {
        padding: 15px;
    }

    .form-card {
        padding: 25px 20px;

        border-radius: 14px;
    }

    .logo {
        margin-bottom: 25px;
    }

    .step h2,
    .state-screen h2 {
        font-size: 25px;
    }

    .form-group {
        margin-bottom: 16px;
    }

    .form-group input,
    .form-group select {
        min-height: 48px;

        font-size: 16px;
    }

    .button-row {
        grid-template-columns: 1fr;
    }

    .button-row .secondary-button {
        order: 2;
    }

    .button-row .primary-button {
        order: 1;
    }
}