.popup_form {
    position: relative;
    padding-top: 1.875rem;
    padding-left: 1.875rem;
    padding-right: 1.875rem;
    padding-bottom: 1.875rem;
    display: block;
    margin-bottom: 7.625rem;
    background-image: url("/inc/img/background_main_form.png");
    border-radius: 0.75rem;
    flex-direction: column;
    margin-top: 3.75rem;
    gap: 2.5rem;
    background-size: cover;
}
.popup_form-title {
    font-weight: 500;
    font-size: 2.25rem;
    letter-spacing: -0.04em;
    color: #fff;
    margin-bottom: 1.25rem;
}

.popup_form-form{
    display: block;
    margin-top: 1.875rem;
}
@media (max-width: 849.99px) {
    .popup_form-title {
        font-size: 1.5rem;
        letter-spacing: -0.04em;
        margin-bottom: 0.75rem;
    }

    .popup_form{
        max-width: 100% !important;
    }
}
.popup_form-description {
    font-weight: 400;
    font-size: 1rem;
    color: #fff;
}
@media (max-width: 849.99px) {
    .popup_form-description {
        font-size: 0.875rem;
    }
}
.popup_form-form {
    position: relative;
    max-width: 63.625rem;
    z-index: 3;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}
@media (max-width: 849.99px) {
    .popup_form-form {
        margin-top: 1.9rem;
        gap: 4rem;
    }
}
.popup_form-form-inputs {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.625rem;
}
@media (max-width: 849.99px) {
    .popup_form-form-inputs {
        gap: 0.65rem;
        display: flex;
        flex-direction: column;
    }
}
.popup_form-form-inputs input {
    padding: 1.28125rem 1.25rem;
    border: none;
    border-radius: 0.75rem;
    font-weight: 400;
    font-size: 1rem;
    letter-spacing: -0.02em;
    color: #eff1f5;
    background-color: #242424;
}
@media (max-width: 849.99px) {
    .popup_form-form-inputs input {
        letter-spacing: -0.09em;
    }
}
.popup_form-form .c-check-confirm {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
}
@media (max-width: 849.99px) {
    .popup_form-form .c-check-confirm {
        gap: 0.8rem;
    }
}
.popup_form-form .c-check-confirm-text {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    column-gap: 0.5rem;
    row-gap: 0.125rem;
    color: #878888;
}
.popup_form-form .c-check-confirm-text a {
    color: #1cb4ff;
}
@media (max-width: 849.99px) {
    .popup_form-form .c-check-confirm-text {
        width: 100%;
        font-weight: 400;
        font-size: 0.875rem;
    }
}
.popup_form-form-bg {
    position: absolute;
    bottom: 0;
    right: 0;
    z-index: 1;
}
.popup_form-form__button {
    display: flex;
    width: 13rem;
}
@media (max-width: 849.99px) {
    .popup_form-form__button .button {
        margin-top: -0.6rem;
        padding: 0.9375rem 2rem;
        line-height: 1rem;
        letter-spacing: -0.08em;
    }

    .popup_form-form__button{
        width: 12rem;
    }
}

.popup_form-up{
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.success{
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}


/* Стили для ошибок валидации */
.form-errors {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    min-width: 300px;
    max-width: 500px;
    width: auto;
    background: rgba(0, 0, 0, 0.85) !important;
    backdrop-filter: blur(10px);
    color: #ffffff !important;
    padding: 16px 24px !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: slideDown 0.3s ease-out, fadeOut 0.3s ease-in 4.7s forwards;
    text-align: left !important;
    font-size: 14px;
    line-height: 1.5;
}

.form-errors div {
    margin-bottom: 8px;
    color: #ffffff !important;
}

.form-errors div:last-child {
    margin-bottom: 0;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    to {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
        visibility: hidden;
    }
}

/* Стили для полей с ошибками */
.error-field {
    border-color: #ff6b6b !important;
    background-color: rgba(255, 107, 107, 0.1) !important;
    box-shadow: 0 0 0 2px rgba(255, 107, 107, 0.2);
}

.has-error .c-checkbox {
    border-color: #ff6b6b !important;
    box-shadow: 0 0 0 2px rgba(255, 107, 107, 0.2);
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.error-field, .has-error .c-checkbox {
    animation: shake 0.3s ease-in-out;
}

/* Стили для кнопки во время загрузки */
.button.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.button.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Адаптив для мобильных устройств */
@media (max-width: 768px) {
    .form-errors {
        top: 10px;
        left: 10px;
        right: 10px;
        transform: none;
        min-width: auto;
        max-width: none;
        width: auto;
        padding: 12px 16px !important;
        font-size: 13px;
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-30px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    @keyframes fadeOut {
        from {
            opacity: 1;
            transform: translateY(0);
        }
        to {
            opacity: 0;
            transform: translateY(-20px);
            visibility: hidden;
        }
    }
}