span.mf-req {
    color: red;
}

.error-message {
    color: red;
    font-size: 12px;
    display: block;
    margin-top: 5px;
    margin-left: 45%;
}

/* Центрирование формы */
.contact_page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    box-sizing: border-box;
}

.form_block {
    width: 100%;
    max-width: 500px;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.form_row {
    margin-bottom: 15px;
    overflow: hidden; /* Очищаем float */
}

.form_row label {
    float: left;
    width: 30%;
    margin-right: 10px;
    text-align: right;
    line-height: 34px; /* Выравнивание по высоте поля */
}

.form_row .inputbox,
.form_row textarea {
    float: left;
    width: 65%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

.form-group.has-errors {
    display: flex;
    flex-direction: column;
}

.form-group.has-errors label {
    float: none;
    width: auto;
    text-align: left;
    margin-bottom: 5px;
    line-height: normal;
}

.form-group.has-errors .input-wrapper {
    width: 100%;
}

.form-group.has-errors .input-wrapper input,
.form-group.has-errors .input-wrapper textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

.form_row .clear {
    clear: both;
}

.button {
    background-color: #007bff;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: block;
    margin-left: 30%;
}

.button:hover {
    background-color: #0056b3;
}

/* Стили для всплывающего окна */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.popup-content {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
    position: relative;
}

.popup-content h3 {
    margin-top: 0;
    color: #28a745;
    font-size: 24px;
    margin-bottom: 20px;
}

.popup-content p {
    margin-bottom: 15px;
    line-height: 1.5;
    color: #333;
}

/* Контейнер для кнопки - центрирование */
.popup-button-container {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.popup-close {
    background-color: #ff6633;
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
    min-width: 120px;
}

.popup-close:hover {
    background-color: #e55a2b;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* Адаптивность */
@media (max-width: 600px) {
    .form_block {
        max-width: 90%;
    }
    .form_row label {
        width: 40%;
        line-height: 24px;
    }
    .form_row .inputbox,
    .form_row textarea {
        width: 55%;
    }
    .button {
        margin-left: 40%;
    }
    .form-group.has-errors label {
        width: 100%;
    }
    .form-group.has-errors .input-wrapper {
        width: 100%;
    }
    
    .popup-content {
        padding: 20px;
        max-width: 95%;
    }
    
    .popup-content h3 {
        font-size: 20px;
    }
    
    .error-message {
        margin-left: 40%;
    }
}

