/* Общий стиль формы */
#form1-deliveryForm, #form1-applicationForm {
    width: 100%;
    padding: 1em;
    background-color: #EFF0F2;
    border-radius: 8px;
    box-shadow: none;
    /* Удалено max-width и margin */
}

/* Выравнивание по левому краю */
.form1-label, .form1-input {
    display: block;
    width: 100%;
    margin-bottom: 0.5em;
}

/* Стили для полей ввода */
.form1-input {
    width: 100% !important;
    padding: 0.5em;
    box-sizing: border-box;
    border-radius: 7px !important;
    font-weight: 500 !important;
    color: #000 !important;
    height: 3.2em !important;
    border: 1px solid #ccc;
    transition: border-color 0.2s, background-color 0.2s;
}

.form1-input:focus {
    border-color: #007BFF;
    outline: none;
}

/* Стили для кнопок */
.form1-button {
    margin-top: 1em;
    padding: 0.8em 2.6em;
	font-family:roboto !important;
    color: #000;
    background-color: #FFD200 !important;
    border: none !important;
    border-radius: 5px;
    font-size: 23px;
    font-weight: 400;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: background 0.2s;
}

.form1-button:hover {
    background-color: #f2c602 !important;
	color:inherit !important;
}

.form1-button:active {


}

/* Отступ для подвала */
#form1-spacer {
    height: 120px;
}

/* Ошибка поля */
.form1-input.invalid {
    border: 2px solid #dc3545 !important;
    background-color: #fde9ec !important;
    color: #000 !important;
    position: relative;
}

/* Сообщение об ошибке внутри поля */
.form1-input.invalid::placeholder {
    color: #dc3545 !important;
    opacity: 1 !important;
    font-weight: bold !important;
}

/* Стиль для отображения ориентировочной стоимости */
.form1-result-cost {
    font-size: 1.2em;
    font-weight: bold;
    margin-top: 25px;
    display: block;
    color: #000 !important;
}

/* Стиль для сообщения над формой */
.form1-message {
    font-size: 1em;
    margin-bottom: 1em;
    color: #555;
}

/* Скрытые и вспомогательные поля */
.ht-familia, .ht-otchestvo, .ht-interval {
    display: none !important;
}
.ht-label {
    display: none !important;
}
.ht-field {
    display: none !important;
    margin-bottom: 0 !important;
}

/* Стили для модального окна */
.form1-modal {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0; top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
}
.form1-modal-content {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background-color: #EFF0F2;
    padding: 24px 32px;
    border-radius: 10px;
    text-align: center;
    font-size: 18px;
    color: #000 !important;
    box-shadow: 0 2px 12px rgba(0,0,0,0.12);
}

/* Стили для textarea */
#form1-comment {
    height: 7em !important;
    resize: vertical;
    padding: 10px;
    box-sizing: border-box;
    border-radius: 7px !important;
    border: 1px solid #ccc;
    font-size: 1em;
}

/* Стили для контейнера информации */
.form1-comment-info {
    font-size: 0.9em;
    color: #000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: -18px;
    padding: 0 10px;
    background-color: #EFF0F2;
    position: relative;
    z-index: 1;
    margin-bottom: 20px;
    font-weight: bold;
}

/* Счетчик символов */
.form1-comment-info .form1-counter {
    color: #000;
    font-weight: bold;
    font-size: 16px;
}

/* Сообщения об ошибках */
.form1-comment-info .form1-error-message {
    color: #dc3545;
    margin-left: 10px;
    font-weight: bold;
}

/* Стили для чекбокса согласия */
.form1-consent {
    display: flex;
    align-items: center;
    margin-top: 1em;
    margin-bottom: 1em;
}

.form1-consent input[type="checkbox"] {
    display: none;
}

.form1-consent label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 1em;
    color: #555;
}

.form1-consent .toggle-switch {
    position: relative;
    width: 40px;
    height: 20px;
    background-color: #ccc;
    border-radius: 15px;
    margin-right: 10px;
    transition: background-color 0.3s;
}
.form1-consent .toggle-switch::before {
    content: '';
    position: absolute;
    width: 18px; height: 18px;
    background-color: #fff;
    border-radius: 50%;
    top: 1px; left: 1px;
    transition: left 0.3s;
}
.form1-consent input[type="checkbox"]:checked + .toggle-switch {
    background-color: #155724;
}
.form1-consent input[type="checkbox"]:checked + .toggle-switch::before {
    left: 21px;
}

/* Стиль для ссылки */
.form1-consent a {
    color: #000 !important;
    text-decoration: none;
    text-align: left !important;
    white-space: normal;
}
.form1-consent a:hover {
    text-decoration: underline;
	color: #000 !important;
}

/* Адаптивная капча */
#form1-captchaContainer img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto 1em auto;
}

/* Адаптивность (мобильные) */
@media (max-width: 600px) {
    #form1-deliveryForm, #form1-applicationForm {
        padding: 0.5em;
        border-radius: 0;
    }
    .form1-modal-content {
        padding: 14px 6px;
        border-radius: 6px;
        font-size: 1em;
    }
    .form1-button {
        width: 100%;
        font-size: 1em;
        padding: 0.8em 0;
    }
    .form1-consent {
        flex-direction: column;
        align-items: flex-start;
    }
    .form1-comment-info {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 12px;
        margin-top: -12px;
    }
}

.form1-button-container {
    display: flex;
    justify-content: center;
    width: 100%;
}