.account_page_content .user_form form .popup_form_input_wrap .sms_code,
.login-sms-code,
#login-sms-form .login-sms-code {
    direction: ltr !important;
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

/* Extra specific rule for login form to ensure LTR direction */
#login-sms-form .popup_form_input_wrap .login-sms-code,
.user_form #login-sms-form .login-sms-code,
div#login-sms-form div.login-sms-code {
    direction: ltr !important;
}

.account_page_content .user_form form .popup_form_input_wrap .sms_code input,
.login-sms-code input,
#login-sms-form .login-sms-code input {
    text-align: center;
}

/* Form messages positioned after the form inside .user_form container */
#login-form .form-messages-container {
    margin: 20px auto;
    text-align: center;
    width: calc(100% - 4vw);
}

.form-messages-container .form_response {
    margin: 10px 0;
    padding: 15px 20px;
    border-radius: 8px;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.form-messages-container .form_response.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.form-messages-container .form_response.pocessing {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}


@keyframes rotateAndPause {
    0% { transform: rotate(0deg); }
    45% { transform: rotate(180deg); }
    50% { transform: rotate(180deg); }
    95% { transform: rotate(360deg); }
    100% { transform: rotate(360deg); }
}

.form_response.pocessing::before {
    animation: rotateAndPause 2s infinite;
    transform-origin: center center;
}

/* Стилі для таймера та посилання "Надіслати ще раз" */
.timer-text {
    color: #F4A261;
    font-weight: 500;
    display: inline-block;
}

.timer-text.hidden {
    display: none !important;
}

.resend-code {
    cursor: pointer;
}

.resend-code.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Field validation error styles */
.popup_form_input_wrap.has-error input,
.popup_form_input_wrap.has-error select {
    border: 2px solid #f44336 !important;
    background-color: #fff5f5 !important;
    box-shadow: 0 0 0 2px rgba(244, 67, 54, 0.1) !important;
}

.popup_form_input_wrap.has-error input:focus,
.popup_form_input_wrap.has-error select:focus {
    border-color: #f44336 !important;
    box-shadow: 0 0 0 3px rgba(244, 67, 54, 0.2) !important;
    outline: none;
}

.popup_form_input_wrap.has-error .popup_form_input_label {
    color: #f44336 !important;
}

.field-error-message {
    color: #f44336;
    font-size: 13px;
    margin-top: 5px;
    font-weight: 500;
    display: block;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Select2 error state */
.popup_form_input_wrap.has-error .select2-container--default .select2-selection--single {
    border-color: #f44336 !important;
    background-color: #fff5f5 !important;
}

.popup_form_input_wrap.has-error .select2-container--default.select2-container--focus .select2-selection--single {
    border-color: #f44336 !important;
    box-shadow: 0 0 0 3px rgba(244, 67, 54, 0.2) !important;
}

.popup_form_input_wrap.has-error .select2-container--default .select2-selection--single.has-error {
    border-color: #f44336 !important;
    background-color: #fff5f5 !important;
}

/* Checkbox styles */
.form_checkboxes {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.popup_form_checkbox_wrap {
    position: relative;
}

.popup_form_checkbox_wrap label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    font-size: 15px;
    line-height: 1.6;
    color: #333;
    user-select: none;
}

.popup_form_checkbox_wrap input[type="checkbox"] {
    margin-left: 10px;
    margin-top: 3px;
    cursor: pointer;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    accent-color: #FF6B35;
}

.popup_form_checkbox_wrap input[type="checkbox"]:focus {
    outline: 2px solid #FF6B35;
    outline-offset: 2px;
}

.popup_form_checkbox_wrap a {
    color: #FF6B35;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.popup_form_checkbox_wrap a:hover {
    color: #E55A2B;
}

.popup_form_checkbox_wrap.has-error {
    border: 1px solid #f44336;
    border-radius: 8px;
    padding: 10px;
    background-color: #fff5f5;
}

.popup_form_checkbox_wrap.has-error input[type="checkbox"] {
    accent-color: #f44336;
}

.popup_form_checkbox_wrap .field-error-message {
    color: #f44336;
    font-size: 14px;
    margin-top: 5px;
    display: none;
    font-weight: 500;
}

.popup_form_checkbox_wrap.has-error .field-error-message {
    display: block;
}