/* ================================================================
   Попап «Записаться» — стили (копия оформления Elementor-попапа 63801)
   Версия: 1.0.4 — фикс пустоты под кнопкой (спиннер + <br>)
   ================================================================ */

/* ===== Оверлей ===== */
.records-popup-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: rgba(0, 0, 0, .8);
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.records-popup-overlay.is-open { display: flex; }

/* ===== Окно ===== */
.records-popup {
    position: relative;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 4px 10px 0 rgba(0, 0, 0, .2);
    width: 100%;
    max-width: 400px;
    max-height: 90vh;
    overflow-x: hidden;
    overflow-y: auto;
    box-sizing: border-box;
}

/* ===== Крестик ===== */
.records-popup__close {
    position: absolute;
    top: 12px;
    right: 14px;
    display: flex;
    background: none;
    border: none;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    color: #000;
    z-index: 2;
}

/* ===== Заголовок ===== */
.records-popup__title {
    font-family: "Exo2bold", Exo2bold, sans-serif;
    font-size: 30px;
    font-weight: 700;
    text-transform: uppercase;
    color: #000;
    text-align: center;
    line-height: 1.2;
    margin: 20px 0 0;                      /* зазор СВЕРХУ: 20px */
    padding: 0 40px 0 20px;
}

/* ===== Подзаголовок ===== */
.records-popup__text {
    font-family: "Exo2bold", Exo2bold, sans-serif;
    color: #000;
    text-align: center;
    margin: 10px 0 20px;
    padding: 0 20px;
}

/* ===== Обёртка формы ===== */
.records-popup__form {
    padding: 0 20px 0;                     /* нижний паддинг убран — зазор даёт кнопка */
    box-sizing: border-box;
    max-width: 100%;
}

/* ===== Поля формы ===== */
.records-popup .wpcf7-form p { margin: 0 0 10px; }
.records-popup .wpcf7-form p:last-of-type { margin-bottom: 0; }

.records-popup .wpcf7-form-control.wpcf7-text,
.records-popup .wpcf7-form-control.wpcf7-tel,
.records-popup .wpcf7-form input[type="text"],
.records-popup .wpcf7-form input[type="tel"] {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: 48px;
    border: 2px solid #000;                 /* ← цвет рамки полей */
    border-radius: 10px;
    padding: 0 16px !important;
    font-family: "Exo2bold", Exo2bold, sans-serif;
    font-size: 18px;
    font-weight: 400;
    text-transform: uppercase;
    box-sizing: border-box !important;
    outline: none;
    display: block;
}
.records-popup .wpcf7-form-control.wpcf7-text:focus,
.records-popup .wpcf7-form-control.wpcf7-tel:focus {
    border-color: #555;
}

/* ===== Чекбокс ===== */
.records-popup .wpcf7-acceptance { font-size: 12px; line-height: 1.4; }
.records-popup .wpcf7-acceptance a { text-decoration: underline; }
.records-popup .wpcf7-acceptance label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
}
.records-popup .wpcf7-acceptance input[type="checkbox"] { margin-top: 3px; flex-shrink: 0; }

/* ===== Кнопка отправки ===== */
.records-popup .wpcf7-form input[type="submit"] {
    width: 100%;
    background-color: #000;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 18px;
    font-family: "Exo2bold", Exo2bold, sans-serif;
    font-size: 16px;
    font-weight: 800;
    text-transform: uppercase;
    line-height: 1;
    cursor: pointer;
    box-sizing: border-box;
    display: block;
    margin-bottom: 20px;                   /* зазор СНИЗУ = 20px, как сверху */
}
.records-popup .wpcf7-form input[type="submit"]:hover {
    background-color: #222;
}

/* ===== Чистим лишние отступы вокруг кнопки ===== */
.records-popup .wpcf7-spinner {
    display: none;                          /* спиннер не занимает место */
}
.records-popup .wpcf7-form p:last-of-type br {
    display: none;                          /* <br> не создаёт пустую строку */
}

/* ===== Мобильная версия ===== */
@media (max-width: 767px) {
    .records-popup { max-width: 90vw; }
    .records-popup__title { font-size: 20px; }
    .records-popup .wpcf7-form-control.wpcf7-text,
    .records-popup .wpcf7-form-control.wpcf7-tel {
        height: 49px;
        padding-left: 20px;
    }
    .records-popup .wpcf7-form input[type="submit"] { padding: 14px; }
}