/* ===== Кнопки выбора формы ===== */
.cf7-modal-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin: 24px 0 32px;
    justify-content: center;
}

.cf7-modal-buttons .btn.btn-to-all {
    display: inline-block;
    padding: 14px 28px;
    border: 0;
    border-radius: 8px;
    background: #1c5ba5;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: background .2s, transform .15s;
}

.cf7-modal-buttons .btn.btn-to-all:hover {
    background: #144880;
    transform: translateY(-1px);
}

.cf7-modal-buttons .btn.btn-to-all:focus-visible {
    outline: 3px solid #91b8e0;
    outline-offset: 2px;
}

/* ===== Модальное окно ===== */
.cf7-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.cf7-modal.is-open { display: flex; }

.cf7-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .65);
    cursor: pointer;
}

.cf7-modal__box {
    position: relative;
    width: 100%;
    max-width: 720px;
    max-height: 90vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: #fff;
    border-radius: 12px;
    padding: 32px 28px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
    z-index: 1;
    animation: cf7FadeIn .25s ease;
}

@keyframes cf7FadeIn {
    from { opacity: 0; transform: translateY(-12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.cf7-modal__close {
    position: absolute;
    top: 10px;
    right: 14px;
    width: 36px;
    height: 36px;
    border: 0;
    background: transparent;
    font-size: 28px;
    line-height: 1;
    color: #555;
    cursor: pointer;
    border-radius: 50%;
    transition: background .2s, color .2s;
}

.cf7-modal__close:hover { background: #f0f0f0; color: #000; }
.cf7-modal__close:focus-visible { outline: 3px solid #91b8e0; }

.cf7-modal__title {
    margin: 0 40px 20px 0;
    font-size: 20px;
    line-height: 1.3;
}

/* Блокировка скролла body */
body.cf7-modal-open { overflow: hidden; }

/* ===== Мобильная адаптация ===== */
@media (max-width: 600px) {
    .cf7-modal { padding: 10px; }
    .cf7-modal__box { padding: 24px 16px; border-radius: 10px; max-height: 95vh; }
    .cf7-modal-buttons .btn.btn-to-all { width: 100%; }
    .cf7-modal__title { font-size: 18px; }
}
/* ===== Модалка «Дзякуй» ===== */
.cf7-modal__box--success {
    max-width: 460px;
    text-align: center;
    padding: 48px 28px 36px;
}

.cf7-modal__success-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 24px;
    border-radius: 50%;
    background: #1c8a4a;
    color: #fff;
    font-size: 40px;
    line-height: 72px;
    font-weight: 700;
    box-shadow: 0 8px 24px rgba(28, 138, 74, .35);
    animation: cf7Pop .35s cubic-bezier(.2, 1.4, .4, 1) both;
}

@keyframes cf7Pop {
    from { transform: scale(.4); opacity: 0; }
    to   { transform: scale(1);  opacity: 1; }
}

.cf7-modal__success-text {
    margin: 0 0 28px;
    font-size: 18px;
    line-height: 1.5;
    color: #222;
}

.cf7-modal__box--success .btn.btn-to-all {
    display: inline-block;
    padding: 12px 36px;
    border: 0;
    border-radius: 8px;
    background: #1c5ba5;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
}

.cf7-modal__box--success .btn.btn-to-all:hover {
    background: #144880;
}