/* ION Heat — Modal Form */

.modal-form {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 3000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-form.is-open {
    display: flex;
}

.modal-form__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.65);
    cursor: pointer;
}

.modal-form__inner {
    position: relative;
    background: var(--fon2);
    border-radius: 16px;
    max-width: 680px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 1;
}

.modal-form__body {
    padding: 48px 40px 40px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.modal-form__title {
    color: var(--white);
    font-family: "Open Sans", sans-serif;
    font-size: clamp(28px, 4vw, 48px);
    line-height: 130%;
    font-weight: 300;
}

/* Закрытие */
.modal-form__close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 2;
}

.modal-form__close:hover {
    background: rgba(255,255,255,0.2);
}

.modal-form__close::before,
.modal-form__close::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 2px;
    background: var(--white);
    border-radius: 2px;
}

.modal-form__close::before { transform: rotate(45deg); }
.modal-form__close::after  { transform: rotate(-45deg); }

/* CF7 стили внутри модалки */
.modal-form__cf7 .wpcf7-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.modal-form__cf7 .wpcf7-form p {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.modal-form__cf7 .wpcf7-form br { display: none; }

.modal-form__cf7 input[type="text"],
.modal-form__cf7 input[type="email"],
.modal-form__cf7 input[type="tel"],
.modal-form__cf7 textarea {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 5px;
    color: var(--white);
    font-family: var(--menu-font-family);
    font-size: var(--menu-font-size);
    padding: 10px 14px;
    width: 100%;
    outline: none;
    transition: border-color 0.2s;
}

.modal-form__cf7 input:focus,
.modal-form__cf7 textarea:focus {
    border-color: var(--main);
}

.modal-form__cf7 input::placeholder,
.modal-form__cf7 textarea::placeholder {
    color: rgba(255,255,255,0.35);
}

.modal-form__cf7 textarea { height: 120px; resize: vertical; }

.modal-form__cf7 .wpcf7-acceptance label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
}

.modal-form__cf7 .wpcf7-acceptance input[type="checkbox"] {
    margin-top: 3px;
    accent-color: var(--main);
    flex-shrink: 0;
}

.modal-form__cf7 .wpcf7-list-item-label {
    color: rgba(255,255,255,0.6);
    font-size: 14px;
    line-height: 130%;
}

.modal-form__cf7 .wpcf7-list-item-label a { color: var(--main); }

.modal-form__cf7 input[type="submit"] {
    background: var(--main);
    border-radius: 100px;
    border: none;
    padding: 14px 40px;
    width: 100%;
    color: var(--white);
    font-family: var(--button-font-family);
    font-size: var(--button-font-size);
    font-weight: var(--button-font-weight);
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s;
}

.modal-form__cf7 input[type="submit"]:hover {
    background: var(--accent);
}

.modal-form__cf7 .wpcf7-response-output {
    color: var(--main);
    font-size: 14px;
    border: none;
    padding: 4px 0;
    margin: 0;
}

.modal-form__cf7 .wpcf7-spinner { display: none; }

@media (max-width: 768px) {
    .modal-form__body { padding: 48px 20px 28px; }
}