/* ============================================
МОДАЛЬНЫЕ ОКНА, ФОРМЫ
============================================ */

/* ---------- ПОДЛОЖКА ---------- */
.overlay {
    opacity: 0;
    visibility: hidden;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, .5);
    z-index: 2000000;
    transition: .3s all;
}

/* ---------- СТАТИЧЕСКИЕ ФОРМЫ (отзывы, поставщикам) ---------- */
.modal {
    margin: 15px 0 0 0;
    background: #c8c8c63d;
    padding: 20px 40px 25px 40px;
    text-align: left;
    border-radius: 15px;
}

body.modal-open {
    overflow: hidden;

}

/* ---------- МОДАЛЬНОЕ ОКНО ---------- */
.modal_main {
    opacity: 0;
    visibility: hidden;
    width: 100%;
    max-width: 480px;
    height: auto;
    max-height: 93dvh;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 300000000000000;
    box-shadow: 0 3px 10px -0.5px rgb(0 0 0 / 20%);
    text-align: left;
    border-radius: 15px;
    background-color: white;
    transition: 0.3s all;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Активное состояние */
.modal_main.active,
.overlay.active {
    opacity: 1;
    visibility: visible;
    display: flex;
}

/* ---------- ПРИЛИПАЮЩИЙ ЗАГОЛОВОК ---------- */
.modal__header--sticky {
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
    border-bottom: 1px solid #e5e7eb;
    padding: 20px 24px 15px 24px;
    margin: 0;
}



/* ---------- НОВЫЙ БЛОК ЗАГОЛОВКА (flex-контейнер) ---------- */
.modal__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

/* ---------- ЗАГОЛОВКИ И ТЕКСТ ---------- */
.modal_main_header {
    font-size: 25px;
    line-height: 1.3;
    font-family: PTSansCaptionBold, Arial;
    font-weight: 600;
    flex: 1;
}

.modal_main_header h3 {
    margin: 0;
    font-size: 23px;
}

.modal_main p {
    padding: 0;
    margin: 14px 0 0 0;
    font-size: 16px;
    font-family: PTSansRegular, Arial;
    line-height: 1.4;
}

p.p_form {
    font-size: 16px;
    padding: 0;
    margin: 16px 0 30px 0;
}

p.p_form span {
    color: #f00;
    font-size: 19px;
    font-family: PTSansRegular, Arial;
    font-weight: 900;
}

/* Отступ для абзаца под заголовком */
p.p_padding {
    font-size: 13px;
    padding: 0;
    margin: 16px 0 16px 0;
}

.p_padding a {
    color: #333333;
    text-decoration: underline;
}

/* ---------- ЛЕЙБЛЫ ФОРМЫ ---------- */
.modal_main label,
.modal label {
    font-size: 13px;
    line-height: 1.5;
    font-family: PTSansRegular, Arial;
    font-weight: normal;
    display: flex;
    padding: 0 0 3px 0;
}

/* ---------- ЗВЕЗДОЧКИ НА ОБЯЗАТЕЛЬНЫХ ПОЛЯХ ---------- */
star::before {
    content: "*";
    font-size: 19pt;
    color: #f00;
    display: block;
    height: 0;
    width: 15px;
    margin: -4px 0 10px 0;
}

/* ---------- ПОЛЯ ВВОДА (ОБЩИЕ) ---------- */
.modal_main input,
.modal input {
    border: 1px solid #a5b0c3;
    background: #213aab12;
    border-radius: 7px;
    font-size: 17px;
    resize: none;
    outline: none;
    padding: 10px;
    width: 100%;
    box-sizing: border-box;
}

.modal_main input:focus,
.modal input:focus {
    border-color: #a2b9e4;
    box-shadow: 0 0 5px #92a7cd;
    border-radius: 7px;
    resize: none;
    outline: none;
    padding: 10px;
}

/* ---------- ПОЛЕ ТЕЛЕФОН ---------- */
.modal_main input[type=tel],
.modal input[type=tel] {
    border: 1px solid #a5b0c3;
    background: #213aab12;
    border-radius: 7px;
    font-size: 20px;
    padding: 10px;
    width: 100%;
    box-sizing: border-box;
}

.modal_main input[type=tel]:focus,
.modal input[type=tel]:focus {
    border-color: #a2b9e4;
    box-shadow: 0 0 5px #92a7cd;
    border-radius: 7px;
    resize: none;
    outline: none;
    padding: 10px;
}

/* ---------- ПОЛЕ КОММЕНТАРИЙ (TEXTAREA) ---------- */
.modal_main textarea,
.modal textarea {
    border: 1px solid #a5b0c3;
    background: #213aab12;
    border-radius: 7px;
    font-size: 16px;
    resize: none;
    outline: none;
    padding: 10px;
    width: 100%;
    box-sizing: border-box;
}

.modal_main textarea:focus,
.modal textarea:focus {
    border-color: #a2b9e4;
    box-shadow: 0 0 5px #92a7cd;
    border-radius: 7px;
    resize: none;
    outline: none;
    padding: 10px;
}

/* ---------- СЕЛЕКТ (ВЫПАДАЮЩИЙ СПИСОК) ---------- */
.wpcf7-form-control.wpcf7-select {
    border: 1px solid #a5b0c3;
    background: #213aab12 url("data:image/svg+xml,%3Csvg id='Layer_1' data-name='Layer 1' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26.9 14.95'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%234f4d4d;fill-rule:evenodd;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M29.86,5.85a1.51,1.51,0,0,0-2.12,0L16.85,16.74,6,5.85A1.5,1.5,0,0,0,3.84,8l12,12a1.51,1.51,0,0,0,2.12,0L29.86,8A1.5,1.5,0,0,0,29.86,5.85Z' transform='translate(-3.4 -5.42)'/%3E%3C/svg%3E") no-repeat right 15px center;
    background-size: 14px 8px;
    appearance: none;
    border-radius: 7px;
    font-size: 17px;
    padding: 10px 35px 10px 10px;
    width: 100%;
    cursor: pointer;
    box-sizing: border-box;
}

.wpcf7-form-control.wpcf7-select:focus {
    border-color: #a2b9e4;
    box-shadow: 0 0 5px #92a7cd;
    outline: none;
}

/* ---------- ЧЕКБОКСЫ ---------- */
input[type="checkbox"] {
    width: auto;
    margin: 0 8px 0 0;
}

input[type="checkbox"]:focus {
    box-shadow: none;
}

.wpcf7-list-item {
    margin: 0;
}

span.wpcf7-form-control {
    border-radius: 8px;
}

/* Контейнер с чекбоксами — только в модальном окне */
.modal_main .wpcf7-checkbox {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 4px 0 4px 0;
}

/* Каждый элемент чекбокса — только в модальном окне */
.modal_main .wpcf7-list-item {
    display: flex;
    align-items: center;
    background: #eff1f9;
    padding: 6px 13px 4px 13px;
    border: 1px solid #ccd2e6;
    border-radius: 8px;
    width: fit-content;
}

/* Обертка чекбоксов — только в модальном окне */
.modal_main span.wpcf7-form-control-wrap {
    display: block;
}

/* Активный чекбокс (выбран) */
.modal_main .wpcf7-list-item:has(input:checked) {
    background: #e8f0fe;
    border-color: #b4c6e5;
}

/* ---------- КНОПКИ ---------- */
/* Кнопка отправки формы */
.modal_main input[type=submit] {
    background-color: #79b622;
    color: #fff;
    font-family: PTSansCaptionBold, Arial;
    font-size: 16px;
    padding: 8px 20px;
    border-radius: 50px;
    border: none;
    width: fit-content;
    cursor: pointer;
}

.wpcf7-submit {
    margin: 15px 0 5px 0;
}

.modal_main input[type=submit] {
    margin: 5px 0 5px 0;
}

/* Кнопка закрытия модального окна */
.modal__cross {
    width: 37px;
    height: 37px;
    position: relative;
    top: 0;
    right: 0;
    fill: #9b9fa8;
    padding: 11px;
    cursor: pointer;
    border-radius: 50%;
    background: #eff1f9;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.modal__cross:hover {
    background: #eff1f9;
    transform: rotate(90deg);
}

/* Кнопка-ссылка */
.modal_button a {
    font-family: PTSansCaptionBold, Arial;
    text-transform: none;
    font-size: 16px;
    line-height: 3;
    padding: 8px 14px;
    border-radius: 5px;
    width: fit-content;
    background: #213aab;
    color: white;
}

/* ---------- ЗАГРУЗКА ФАЙЛА ---------- */
.wpcf7 input[type="file"] {
    cursor: pointer;
    padding: 15px 0 15px 15px;
}

.form-control {
    font-size: 14px !important;
}

/* ---------- СООБЩЕНИЯ ОБ ОШИБКАХ И УСПЕХЕ ---------- */
.wpcf7 form .wpcf7-response-output {
    margin: 20px 0 10px 0;
}

.wpcf7 form.sent .wpcf7-response-output {
    border-color: #46b450;
    padding: 10px 10px 10px 12px;
    background: #e6f4e5;
    border-radius: 7px;
    font-family: PTSansRegular, Arial;
    font-size: 16px;
    line-height: 1.5;
}

.wpcf7 form.invalid .wpcf7-response-output {
    border-color: #f63939;
    padding: 10px 10px 10px 12px;
    background: #fde4e4;
    border-radius: 7px;
    font-family: PTSansRegular, Arial;
    font-size: 16px;
    line-height: 1.5;
}

.wpcf7-not-valid-tip {
    padding: 5px 0 0 0;
}

/* ---------- СЧЕТЧИК СИМВОЛОВ ---------- */
.modal_main span,
.modal span {
    font-size: 13px;
    line-height: 1.5;
}

/* ---------- ПРЕЛОАДЕР (СКРЫТ) ---------- */
.wpcf7-spinner {
    display: none;
}

/* ---------- РАЗНОЕ ---------- */
/* Скрываем переносы строк в формах */
form br {
    display: none;
}



/* ============================================
КАСТОМНЫЙ СКРОЛЛБАР (убраны стрелки)
============================================ */

/* Контейнер для скроллируемого содержимого */
/* Контейнер для скроллируемого содержимого */
.modal__scrollable-content {
    flex: 1;
    overflow-y: auto;
    padding: 0 24px 20px 24px;
    margin: 0 3px 0 0;
}

/* Стили скроллбара */
.modal__scrollable-content::-webkit-scrollbar {
    width: 4px !important;
    height: 4px !important;
}

.modal__scrollable-content::-webkit-scrollbar-track {
    background: white;
    border-radius: 10px;
    margin: 5px 0;
}

.modal__scrollable-content::-webkit-scrollbar-thumb {
    background: #bfc6d3;
    border-radius: 10px;
}

.modal__scrollable-content::-webkit-scrollbar-thumb:hover {
    background: #bfc6d3;
}

.modal__scrollable-content::-webkit-scrollbar-button {
    display: none; !important; /* Это убирает стрелки */
}

.modal__scrollable-content::-webkit-scrollbar-corner {
    background: transparent;
}

/* ДЛЯ FIREFOX - отдельно, без хуйни которая ломает оперу */
@-moz-document url-prefix() {
    .modal__scrollable-content {
        scrollbar-width: thin;
        scrollbar-color: #79b622 white;
    }
}

@media (max-width: 580px) {
    .modal_main {
        max-width: 97%;
        max-height: 93dvh;
        border-radius: 10px;
    }

    .modal__header--sticky {
        padding: 15px 15px 10px 15px;
    }

    .modal__scrollable-content {
        padding: 0 15px 20px 15px;
    }

    .modal_main_header {
        font-size: 24px;
    }

    .modal_main_header h3 {
        font-size: 22px;
    }
}

/* ---------- МОДАЛЬНЫЕ ОКНА, ФОРМЫ (КОНЕЦ) ---------- */