/* ============================================================================
 * МОДУЛЬНАЯ СИСТЕМА ФОРМ ОБРАТНОЙ СВЯЗИ — единая точка управления.
 *
 * Структура (по секциям ниже):
 *   1. CF7-совместимость (.contact-form-card .wpcf7-*) — стилизация дефолтного
 *      рендера Contact Form 7 в виде модульной разметки.
 *   2. Layout (section / wrapper / info-card / card / container / header).
 *   3. Form fields (.form-field input/textarea + .form-error + required-fields-note).
 *   4. Agreement / acceptance (чекбоксы согласия в белой плашке).
 *   5. Submit (.contact-form-buttons + .contact-form-submit + .wpcf7-submit).
 *   6. Theme modifiers: .theme-image / .theme-burgundy / .theme-gray / .theme-green.
 *      Применяются на двух уровнях: .contact-form-card.theme-* (внешняя плашка
 *      с фоном) и .contact-form-container.theme-* (прозрачный inner для z-index).
 *   7. Social icons (.contact-social-links, .social-icons-burgundy + SVG backgrounds).
 *   8. Modal-overlay (.dk-modal-form, .modal-overlay) — те же form-стили в модалке.
 *   9. Variants: .contact-form-compact (плотный layout), .contact-form-inline,
 *      .agreement-burgundy.
 *  10. Адаптив (@media 768 / 480 / 1400).
 *
 * Page-specific CSS:
 *   - corporate.css: .contact-form-info-card-corporate (Corp_request_back.webp)
 *     + .contact-form-wrapper.burgundy-form .contact-form-info-card.social-icons-burgundy
 *       (Frame 2131330063.png bg).
 *   - webinar-package.css: .contact-form-info-card (var(--color-secondary) тёмный фон).
 *   - test-drive.css: .contact-form-info-card (TestDrive_request_back.webp)
 *     + .social-icons-burgundy filter.
 *
 * Default values здесь рассчитаны на полноразмерные landing-секции
 * (.contact-form-section padding 120px 0, .contact-form-wrapper gap 10px,
 *  bg var(--color-bg-secondary)). Модалки используют .modal-content > * сценарий
 * с более компактными значениями.
 * ========================================================================== */

/* ===== 1. CF7-СОВМЕСТИМОСТЬ (.contact-form-card .wpcf7-*) =====
   Приводим стандартный рендер Contact Form 7 к виду как у эталона:
   поля с placeholder в белой плашке, чекбоксы в плашках, full-width кнопка. */

.contact-form-card.theme-gray {
    background: var(--color-bg-gray-shield);
    border-radius: 30px;
    padding: 32px;
}

.contact-form-card .wpcf7-form-control-wrap {
    display: block;
    width: 100%;
}

.contact-form-card .form-row {
    margin-bottom: 12px;
}

.contact-form-card .wpcf7-form input[type="text"],
.contact-form-card .wpcf7-form input[type="tel"],
.contact-form-card .wpcf7-form input[type="email"],
.contact-form-card .wpcf7-form textarea {
    width: 100%;
    background: var(--color-white);
    border: none;
    border-radius: 40px;
    padding: 20px 32px;
    font-family: var(--font-primary);
    font-size: var(--font-size-16);
    color: var(--color-text-main);
    box-sizing: border-box;
    outline: none;
    transition: box-shadow 0.2s ease;
}

/* Textarea — менее «таблеточный» вид + мин. высота + resize только по вертикали */
.contact-form-card .wpcf7-form textarea {
    border-radius: 20px;
    min-height: 110px;
    resize: vertical;
    line-height: 1.4;
}

.contact-form-card .wpcf7-form input[type="text"]:focus,
.contact-form-card .wpcf7-form input[type="tel"]:focus,
.contact-form-card .wpcf7-form input[type="email"]:focus,
.contact-form-card .wpcf7-form textarea:focus {
    box-shadow: 0 0 0 2px var(--focus-green);
}

.contact-form-card .wpcf7-form input::placeholder,
.contact-form-card .wpcf7-form textarea::placeholder {
    color: var(--color-text-gray);
    opacity: 1;
}

.contact-form-card .form-note {
    font-size: var(--font-size-14);
    color: var(--color-text-gray);
    font-style: italic;
    margin: 8px 0 12px;
}

/* Чекбоксы согласия в белых плашках */
.contact-form-card .form-acceptance {
    background: var(--color-white);
    border-radius: 30px;
    padding: 14px 20px;
    margin-bottom: 12px;
}

.contact-form-card .wpcf7-acceptance .wpcf7-list-item {
    margin: 0;
    display: block;
}

.contact-form-card .wpcf7-acceptance label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: var(--font-size-14);
    color: var(--color-text-main);
    line-height: 1.4;
}

/* .contact-form-card .wpcf7-acceptance input[type="checkbox"] / -label / a — глобально в forms.css */

/* Зелёная кнопка submit во всю ширину */
.contact-form-card .form-submit {
    margin-top: 16px;
}

.contact-form-card .wpcf7-submit {
    width: 100%;
    background: var(--color-primary);
    color: var(--color-white);
    border: none;
    border-radius: 50px;
    padding: 16px 24px;
    font-family: var(--font-primary);
    font-size: var(--font-size-18);
    font-weight: var(--font-weight-semibold);
    cursor: pointer;
    transition: background 0.2s ease;
}

.contact-form-card .wpcf7-submit:hover {
    background: var(--color-hover-green);
}

/* Бордовый submit — только когда сама карточка имеет тему .theme-burgundy.
 * Раньше правило ловило по wrapper'у .burgundy-form, но на /subscriptions/
 * карточка имеет .theme-image (зелёная) внутри burgundy-form-wrapper и
 * получала бордовый submit некорректно. */
.contact-form-card.theme-burgundy .wpcf7-submit {
    background: var(--color-burgundy); /* #99354B */
}

.contact-form-card.theme-burgundy .wpcf7-submit:hover {
    background: var(--color-hover-burgundy); /* #7E2E40 */
}

/* Компактная форма в баннере (.banner-form-compact) — например на /test-drive/
   верхняя форма. Submit зелёный (как в эталоне) + full-width. */
.banner-form-compact .wpcf7-submit,
.banner-form-compact input[type="submit"].wpcf7-submit {
    width: 100%;
    background: var(--color-primary);
    color: var(--color-white);
    border: none;
    border-radius: 50px;
    padding: 16px 24px;
    font-family: var(--font-primary);
    font-size: var(--font-size-18);
    font-weight: var(--font-weight-semibold);
    cursor: pointer;
    transition: background 0.2s ease;
}

.banner-form-compact .wpcf7-submit:hover {
    background: var(--color-hover-green);
}

.banner-form-compact .wpcf7-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.contact-form-card .wpcf7-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Прячем wpcf7-spinner справа от кнопки, не разрывая layout */
.contact-form-card .wpcf7-spinner {
    display: inline-block;
    vertical-align: middle;
}

/* Сообщения CF7 (ошибки/успех) — приводим под палитру темы */
.contact-form-card .wpcf7-response-output {
    border-radius: 12px;
    border: 1px solid var(--color-border-light);
    padding: 10px 16px;
    margin: 16px 0 0;
    font-size: var(--font-size-14);
}

.contact-form-card .wpcf7-not-valid-tip {
    color: var(--color-secondary);
    font-size: var(--font-size-14);
    margin-top: 4px;
}

/* ===== 2. LAYOUT (section / wrapper / info-card / card / container / header) =====
   Базовые значения соответствуют landing-секциям (corporate, test-drive,
   subscriptions, webinar-package, contacts). Раньше page-specific CSS дублировал
   эти правила; теперь — единая точка. */
.contact-form-section {
    padding: 120px 0;
    background: var(--color-bg-secondary);
}

.contact-form-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    align-items: stretch;
}

.contact-form .btn {
    margin-top: 12px;
    width: 100%;
}

/* Левая информационная плашка */
.contact-form-info-card {
    background: var(--color-white);
    border-radius: 30px;
    padding: 32px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.contact-form-info-card h2 {
    margin-bottom: 1.5rem;
}

.contact-form-info-card .text-p2 {
    color: var(--color-text-main);
    margin-bottom: 1rem;
}

.contact-form-info-card .text-p2:last-of-type {
    margin-bottom: 2rem;
}

/* Социальные ссылки */
.contact-social-links {
    display: flex;
    gap: 1rem;
    margin-top: 12px;
}

/* Тест-драйв/бордовая плашка: описание к заголовку (20px), иконки внизу */
.contact-form-wrapper.burgundy-form .contact-form-info-card.social-icons-burgundy {
    justify-content: flex-start;
    gap: 20px;
}
.contact-form-wrapper.burgundy-form .contact-form-info-card.social-icons-burgundy h2 {
    margin: 0 0 20px;
}
.contact-form-wrapper.burgundy-form .contact-form-info-card.social-icons-burgundy .text-p3 {
    margin: 0;
}
.contact-form-wrapper.burgundy-form .contact-form-info-card.social-icons-burgundy .contact-social-links {
    margin-top: auto;
}

.contact-social-title {
    margin-top: auto;
    margin-bottom: 12px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    text-decoration: none;
    padding: 0;
}

.contact-social-links .social-link:hover {
    transform: none;
    background-color: transparent; /* не сбрасываем background-image */
    border: none;
    box-shadow: none;
}

/* Ховер для Rutube в бордовой секции тест-драйва */
.burgundy-form-section .social-link.rutube img {
    transition: opacity 0.15s ease;
}
.burgundy-form-section .social-link.rutube:hover img {
    content: url('../img/Rutube_burgundy_icon_hover.svg');
}

/* Глобальный ховер для Rutube (зелёные иконки с <img>) */
.contact-social-links .social-link.rutube img {
    transition: opacity 0.15s ease;
}
.contact-social-links .social-link.rutube:hover img {
    content: url('../img/Rutube_green_icon_hover.svg');
}

/* Бордовая тема с фоновыми иконками */
.social-icons-burgundy .social-link.rutube:hover { background-image: url('../img/Rutube_burgundy_icon_hover.svg'); }

/* Универсальный hover Rutube (для подвала и любых других блоков с <img>) */
.social-link.rutube:hover img {
    content: url('../img/Rutube_green_icon_hover.svg');
}

/* Бордовые иконки социальных сетей (применяется через класс) */
/* Вариант с готовыми бордовыми иконками (Vector 4/5/6) только для бордовой темы */
.social-icons-burgundy .social-link {
    background: transparent;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 90% 90%;
    transition: none;
    transform: none;
    border: none;
    box-shadow: none;
    outline: none;
}
.social-icons-burgundy .social-link img { display: inline; }
.social-icons-burgundy .social-link.vk img,
.social-icons-burgundy .social-link.telegram img,
.social-icons-burgundy .social-link.whatsapp img,
.social-icons-burgundy .social-link.max img { display: none; }
.social-icons-burgundy .social-link.vk { background-image: url('../img/Vector (4).svg'); }
.social-icons-burgundy .social-link.telegram { background-image: url('../img/Vector (5).svg'); }
.social-icons-burgundy .social-link.whatsapp { background-image: url('../img/Vector (6).svg'); }
.social-icons-burgundy .social-link.rutube { background-image: url('../img/Rutube_burgundy_icon.svg'); }
.social-icons-burgundy .social-link.max { background-image: url('../img/Max_Logo_2.svg'); }

/* Ховер без мерцания: делаем иконку чуть светлее */
/* Смена SVG на ховере */
.social-icons-burgundy .social-link.vk:hover { background-image: url('../img/Vector (7).svg'); }
.social-icons-burgundy .social-link.telegram:hover { background-image: url('../img/Vector (8).svg'); }
.social-icons-burgundy .social-link.whatsapp:hover { background-image: url('../img/Vector (9).svg'); }
.social-icons-burgundy .social-link.rutube:hover { background-image: url('../img/Rutube_burgundy_icon_hover.svg'); }
.social-icons-burgundy .social-link.max:hover { opacity: 0.8; }

/* Если нет специфичных классов на ссылках, подстрахуемся и покажем исходные SVG */
.social-icons-burgundy .social-link:not(.vk):not(.telegram):not(.whatsapp) img {
    display: inline;
}

/* Правая плашка с формой */
.contact-form-card {
    border-radius: 30px;
    padding: 32px;
}

/* Уменьшенные отступы для модального окна */
.modal-content .contact-form-card {
    padding: 24px;
    border-radius: 20px;
}

.modal-content .form-field {
    margin-bottom: 16px;
}

.modal-content .contact-form h2 {
    margin-bottom: 12px;
}

.modal-content .contact-form .text-p2 {
    margin-bottom: 16px;
}

/* ===== СТИЛИ ФОРМЫ ===== */

.contact-form-container {
    width: 100%;
}

/* Зеленая тема для модального контейнера */
.contact-form-container.theme-green {
    background: linear-gradient(180deg, #E5F3E8 0%, #8BBE8E 100%);
    padding: 28px;
    border-radius: 30px;
}

.contact-form-container.theme-green .contact-form-title,
.contact-form-container.theme-green .contact-form-description {
    color: var(--color-text-main);
    text-align: left;
}

.contact-form-header {
    margin-bottom: 32px;
    text-align: center;
}

.contact-form-title {
    margin-bottom: 12px;
}

.contact-form-description {
    margin: 0;
    opacity: 0.8;
}

/* Поля формы */
.form-field {
    margin-bottom: 24px;
    position: relative;
}

.form-field input,
.form-field textarea {
    width: 100%;
    padding: 20px 24px;
    border: none;
    border-radius: 40px;
    transition: all 0.3s ease;
    background-color: var(--color-white);
    box-sizing: border-box;
    resize: vertical;
}

/* Текстовая область — менее «таблеточный» вид: квадратнее, ограничение по высоте */
.form-field textarea {
    border-radius: 20px;
    min-height: 110px;
    resize: vertical;
    font-family: inherit;
    line-height: 1.4;
}

/* Уменьшенное закругление только для поля "Комментарий" в зелёной модалке */
.contact-form-container.theme-green .form-field textarea {
    border-radius: 40px;
}

.form-field input:focus,
.form-field textarea:focus {
    outline: none;
    transform: translateY(-1px);
}

.form-field input::placeholder,
.form-field textarea::placeholder {
    color: var(--color-text-gray);
}


.form-error {
    display: none;
    color: var(--color-error);
    margin-top: 8px;
}

/* Сноска об обязательных полях */
.required-fields-note {
    margin-bottom: 16px;
    text-align: left;
}

.required-fields-note p {
    margin: 0;
    color: var(--color-white);
    font-style: italic;
}

/* Поле согласия */
.agreement-field {
    margin-bottom: 24px;
}

.agreement-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    line-height: 1.5;
    background: var(--color-white);
    padding: 16px 20px;
    border-radius: 30px;
    transition: all 0.3s ease;
}

.agreement-option:hover { background: var(--color-white); }

/* Стили для обычных форм (forms.js) */
.privacy-checkbox {
    margin-bottom: 24px;
}

.privacy-checkbox label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    line-height: 1.5;
    background: var(--color-white);
    padding: 16px 20px;
    border-radius: 30px;
    transition: all 0.3s ease;
}

.privacy-checkbox label:hover { background: var(--color-white); }

/* .privacy-checkbox input[type=checkbox] / .agreement-option input[type=checkbox]
 * — глобально в forms.css (общий компонент) */
.agreement-text {
    flex: 1;
}

.agreement-text.second-line {
    display: inline;
}

.privacy-link {
    color: var(--color-primary);
    text-decoration: underline;
    transition: color 0.3s ease;
}

.privacy-link:hover {
    color: var(--color-primary-dark);
}

/* Бордовый вариант чекбокса и ссылок (применяется через класс) */
.agreement-burgundy .agreement-option input[type="checkbox"] {
    border: 2px solid var(--color-burgundy);
}

.agreement-burgundy .agreement-option input[type="checkbox"]:checked {
    background: var(--color-white);
    border: 2px solid var(--color-burgundy);
}

.agreement-burgundy .agreement-option input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 12px;
    background: var(--color-burgundy);
    border-radius: 0;
    transform: translate(-50%, -50%);
}

.agreement-burgundy .privacy-link {
    color: var(--color-burgundy);
}

.agreement-burgundy .privacy-link:hover {
    color: var(--color-burgundy-dark);
}


/* Сообщение об успехе */
.form-success-message {
    text-align: center;
    padding: 40px 20px;
    background: var(--gradient-success);
    color: var(--color-white);
    border-radius: 16px;
    animation: slideIn 0.5s ease;
}

.success-icon {
    margin-bottom: 16px;
    background: rgba(255, 255, 255, 0.2);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    position: relative;
}

.success-icon::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 12px;
    border: 4px solid var(--color-white);
    border-top: none;
    border-right: none;
    transform: rotate(-45deg);
    margin-top: -4px;
}

.form-success-message h4 {
    margin-bottom: 8px;
    color: var(--color-white);
}

.form-success-message p {
    margin: 0;
    opacity: 0.9;
    color: var(--color-white);
}

/* Кнопки действий в сообщении об успехе */
.payment-action-buttons {
    margin-top: 25px;
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.payment-action-buttons .btn {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    padding: 12px 24px;
    border-radius: 25px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    min-width: 160px;
    border: none;
    cursor: pointer;
}

.payment-action-buttons .btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-primary);
}

/* Стили для индикатора перенаправления на оплату */
.payment-redirect-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.payment-redirect-info .spinner.small {
    width: 16px;
    height: 16px;
    border-width: 2px;
    border-color: var(--color-white);
    border-top-color: transparent;
}

.payment-redirect-info span {
    color: var(--color-white);
}

/* Информация о личном кабинете */
.cabinet-info {
    margin-top: 0.75rem !important;
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    opacity: 0.95;
}

/* ===== ЦВЕТОВЫЕ ТЕМЫ ===== */

/* Серая тема для контейнера формы */
.contact-form-container.theme-gray {
    background: var(--color-bg-gray-shield);
}

/* Серая тема для всей плашки */
.contact-form-card.theme-gray {
    background: var(--color-bg-gray-shield);
}

/* Тема с фоновым изображением для контейнера формы */
.contact-form-container.theme-image {
    background: none;
}

.contact-form-container.theme-image::before {
    display: none;
}

.contact-form-container.theme-image > * {
    position: static;
    z-index: auto;
}

/* Тема с фоновым изображением для всей плашки */
.contact-form-card.theme-image {
    background-image: url('../img/webp/Reviews_Main.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden;
}

.contact-form-card.theme-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    z-index: 1;
}

.contact-form-card.theme-image > * {
    position: relative;
    z-index: 2;
}

/* Бордовая тема с фоновым изображением для контейнера формы */
.contact-form-container.theme-burgundy {
    background: none;
}

.contact-form-container.theme-burgundy::before {
    display: none;
}

.contact-form-container.theme-burgundy > * {
    position: static;
    z-index: auto;
}

/* Бордовая тема с фоновым изображением для всей плашки */
.contact-form-card.theme-burgundy {
    background-image: url('../img/webp/Burgundy_background.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden;
}

.contact-form-card.theme-burgundy::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(139, 69, 19, 0.1) 0%, rgba(101, 67, 33, 0.2) 100%);
    border-radius: inherit;
    z-index: 1;
}

.contact-form-card.theme-burgundy > * {
    position: relative;
    z-index: 2;
}

/* Авто-каскад: внутри бордовой темы checkbox и ссылки автоматически бордовые.
   Это убирает необходимость каждый раз ставить .agreement-burgundy на .agreement-field
   и переопределять стили в per-page CSS. */
.contact-form-card.theme-burgundy .agreement-option input[type="checkbox"],
.contact-form-card.theme-burgundy .agreement-field input[type="checkbox"] {
    border-color: var(--color-burgundy);
    accent-color: var(--color-burgundy);
}

.contact-form-card.theme-burgundy .agreement-option input[type="checkbox"]:checked,
.contact-form-card.theme-burgundy .agreement-field input[type="checkbox"]:checked {
    border-color: var(--color-burgundy);
}

.contact-form-card.theme-burgundy .agreement-option input[type="checkbox"]:checked::after,
.contact-form-card.theme-burgundy .agreement-field input[type="checkbox"]:checked::after {
    background: var(--color-burgundy);
}

.contact-form-card.theme-burgundy .privacy-link,
.contact-form-card.theme-burgundy .agreement-field a {
    color: var(--color-burgundy);
}

.contact-form-card.theme-burgundy .privacy-link:hover,
.contact-form-card.theme-burgundy .agreement-field a:hover {
    color: var(--color-hover-burgundy);
}


/* ===== МОДАЛЬНОЕ ОКНО ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--overlay-medium);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    /* Начальное скрытое состояние чтобы избежать мигания */
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 20px;
    backdrop-filter: blur(5px);
}

/* Активное состояние модального окна */
.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    position: relative;
    max-width: 600px;
    width: 100%;
    max-height: 95vh;
    overflow-y: visible;
    animation: modalSlideIn 0.3s ease;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1;
}

.modal-close:hover {
    background: var(--overlay-light);
    color: var(--color-text-primary);
}

/* ===== АНИМАЦИИ ===== */

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* ===== АДАПТИВНОСТЬ ===== */

/* Большие ноутбуки */
@media screen and (max-width: 1366px) {
    .contact-form-section { 
        padding: 120px 0; 
    }
}

/* Средние ноутбуки */
@media screen and (max-width: 1200px) {
    .contact-form-section { 
        padding: 100px 0; 
    }
}

/* Планшеты */
@media screen and (max-width: 1024px) {
    .contact-form-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-form-info-card {
        padding: 28px;
    }
    
    .contact-form-card {
        padding: 28px;
    }
    
    .contact-form-section {
        padding: 60px 0;
    }
}

/* Планшеты горизонтальные */
@media screen and (max-width: 900px) {
    .contact-form-section { 
        padding: 70px 0; 
    }
    
    .contact-form-info-card,
    .contact-form-card { 
        padding: 28px; 
    }
}

/* Мобильные устройства */
@media screen and (max-width: 768px) {
    
    .contact-form-wrapper {
        gap: 32px;
    }
    
    .contact-form-info-card,
    .contact-form-card {
        padding: 2rem;
        border-radius: 20px;
    }
    
    /* Специальный порядок для бордовой формы */
    .contact-form-wrapper.burgundy-form {
        display: flex;
        flex-direction: column;
    }
    
    .contact-form-wrapper.burgundy-form .contact-form-info-card.social-icons-burgundy {
        order: 1;
    }
    
    .contact-form-wrapper.burgundy-form .contact-form-card.theme-burgundy {
        order: 2;
    }
    
    .form-field {
        margin-bottom: 20px;
    }
    
    .form-field input,
    .form-field textarea {
        padding: 16px 20px;
        border-radius: 40px;
    }
    
    .modal-overlay {
        padding: 20px;
    }
    
    .modal-close {
        top: 10px;
        right: 15px;
        width: 44px;
        height: 44px;
        font-size: 22px;
    }
    
    .contact-social-links {
        gap: 12px;
    }
    
    .social-link {
        width: 48px;
        height: 48px;
    }
}

/* Малые планшеты и большие мобильные */
@media screen and (max-width: 640px) {
    .contact-form-section { 
        padding: 50px 0; 
    }
    
    .contact-form-wrapper { 
        gap: 1.8rem; 
    }
    
    .contact-form-info-card,
    .contact-form-card { 
        padding: 22px; 
    }
}

/* Очень маленькие экраны */
@media screen and (max-width: 480px) {
    .contact-form-section {
        padding: 32px 0;
    }
    
    .contact-form-wrapper { 
        gap: 1.5rem; 
    }
    
    .contact-form-info-card,
    .contact-form-card {
        padding: 20px;
        border-radius: 20px;
    }
    
    .contact-form-header {
        margin-bottom: 24px;
    }
    
    .form-field {
        margin-bottom: 16px;
    }
    
    .form-field input,
    .form-field textarea {
        padding: 14px 16px;
        border-radius: 35px;
    }
    
    .success-icon {
        width: 60px;
        height: 60px;
    }
    
    .contact-social-links {
        gap: 8px;
    }
    
    .social-link {
        width: 44px;
        height: 44px;
    }
    
    .social-link img {
        width: 32px;
        height: 32px;
    }
}

/* Большие экраны */
@media screen and (min-width: 1400px) {
    
    .form-field input,
    .form-field textarea {
        padding: 24px 28px;
        border-radius: 60px;
    }
    .modal-content {
        max-width: 750px;
        max-height: 98vh;
    }
}

/* ===== ИНДИКАТОР ЗАГРУЗКИ ФОРМЫ ===== */

.form-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.form-loading .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-left-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

.form-loading p {
    margin: 0;
    color: rgba(255, 255, 255, 0.8);
    opacity: 0.9;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===== ДОПОЛНИТЕЛЬНЫЕ УТИЛИТЫ ===== */

/* Компактная форма */
.contact-form-compact .contact-form-header {
    margin-bottom: 24px;
}

.contact-form-compact .form-field {
    margin-bottom: 16px;
}

.contact-form-compact .form-field input,
.contact-form-compact .form-field textarea {
    padding: 20px 32px;
    border-radius: 40px;
}

.contact-form-compact .form-field .dropdown-trigger {
    padding: 0 0 0 8px;
}

/* Инлайн форма */
.contact-form-inline {
    display: flex;
    gap: 16px;
    align-items: end;
    flex-wrap: wrap;
}

.contact-form-inline .form-field {
    flex: 1;
    min-width: 200px;
    margin-bottom: 0;
}

@media screen and (max-width: 768px) {
    .contact-form-inline {
        flex-direction: column;
        gap: 12px;
    }
    
    .contact-form-inline .form-field {
        min-width: auto;
    }
    
}

/* Состояния полей */
.form-field-required input::after,
.form-field-required textarea::after {
    content: ' *';
    color: var(--color-error);
}

/* Скрытие элементов */
.contact-form-no-social .contact-social-links {
    display: none;
}

.contact-form-no-privacy .agreement-field {
    display: none;
}

/* ===== DROPDOWN FIELD СТИЛИ ===== */
.dropdown-field {
    position: relative;
}

.dropdown-wrapper {
    position: relative;
    width: 100%;
}

.dropdown-input {
    position: relative;
    background: var(--color-white);
    border: none;
    border-radius: 30px;
    padding: 20px 24px;
    cursor: pointer;
    min-height: auto;
    height: auto;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    width: 100%;
    box-sizing: border-box;
}

/* Убираем hover эффект для dropdown-input */

.dropdown-input.dropdown-open {
    /* Убираем закругления снизу при открытии */
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.dropdown-trigger {
    border: none;
    background: none;
    outline: none;
    flex: 1;
    color: var(--color-text-gray);
    cursor: pointer;
    padding: 0;
    margin: 0;
    height: auto;
    min-height: 0;
    text-align: left;
    width: 100%;
    pointer-events: auto;
}

.dropdown-arrow {
    width: 25px;
    height: 14px;
    background-image: url('data:image/svg+xml,<svg width="25" height="14" viewBox="0 0 25 14" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M0.550289 0.535358C0.902744 0.192568 1.38071 3.049e-07 1.87909 3.049e-07C2.37746 3.049e-07 2.85543 0.192568 3.20788 0.535358L12.5113 9.58641L21.8148 0.535358C22.1693 0.202283 22.644 0.0179815 23.1368 0.0221476C23.6296 0.0263136 24.101 0.218614 24.4495 0.557632C24.798 0.89665 24.9956 1.35526 24.9999 1.83468C25.0042 2.31411 24.8148 2.77599 24.4724 3.12085L13.8401 13.4646C13.4877 13.8074 13.0097 14 12.5113 14C12.013 14 11.535 13.8074 11.1825 13.4646L0.550289 3.12085C0.197939 2.77796 0 2.31295 0 1.8281C0 1.34325 0.197939 0.878251 0.550289 0.535358Z" fill="%23A91B60"/></svg>');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    transition: transform 0.3s ease;
    margin-left: 12px;
}

.dropdown-input.dropdown-open .dropdown-arrow {
    transform: rotate(180deg);
}

/* Зеленая стрелочка для поля тарифов */
.dropdown-field [data-field="tariff"] .dropdown-arrow {
    background-image: url('data:image/svg+xml,<svg width="25" height="14" viewBox="0 0 25 14" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M0.550289 0.535358C0.902744 0.192568 1.38071 3.049e-07 1.87909 3.049e-07C2.37746 3.049e-07 2.85543 0.192568 3.20788 0.535358L12.5113 9.58641L21.8148 0.535358C22.1693 0.202283 22.644 0.0179815 23.1368 0.0221476C23.6296 0.0263136 24.101 0.218614 24.4495 0.557632C24.798 0.89665 24.9956 1.35526 24.9999 1.83468C25.0042 2.31411 24.8148 2.77599 24.4724 3.12085L13.8401 13.4646C13.4877 13.8074 13.0097 14 12.5113 14C12.013 14 11.535 13.8074 11.1825 13.4646L0.550289 3.12085C0.197939 2.77796 0 2.31295 0 1.8281C0 1.34325 0.197939 0.878251 0.550289 0.535358Z" fill="%2332770A"/></svg>');
}

.selected-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex: 1;
    min-height: 0;
}

.selected-tags:empty {
    display: none;
}

.selected-tag {
    background: #F7F7F7;
    color: var(--color-text-main);
    padding: 6px 12px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tag-remove {
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.tag-remove:hover {
    background: var(--color-error);
    color: var(--color-white);
}

.dropdown-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    background: var(--color-white);
    border: none;
    border-radius: 0 0 30px 30px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    margin-top: -1px; /* Убираем щель между полем и списком */
    box-sizing: border-box;
    padding-right: 4px; /* Отступ для скролла внутри списка */
}

/* Кастомный скролл бордового цвета без стрелочек */
.dropdown-list::-webkit-scrollbar {
    width: 8px;
    background: transparent;
}

.dropdown-list::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 0;
    margin: 4px 0; /* Отступ от краев списка */
}

.dropdown-list::-webkit-scrollbar-thumb {
    background: var(--color-primary-burgundy);
    border-radius: 4px;
    border: none;
}

.dropdown-list::-webkit-scrollbar-thumb:hover {
    background: #8B1538;
}

/* Убираем стрелочки скролла */
.dropdown-list::-webkit-scrollbar-button {
    display: none;
    height: 0;
    width: 0;
}

.dropdown-list::-webkit-scrollbar-corner {
    background: transparent;
}

/* Для Firefox */
.dropdown-list {
    scrollbar-width: thin;
    scrollbar-color: var(--color-primary-burgundy) transparent;
}

.dropdown-option {
    display: flex;
    align-items: center;
    padding: 12px 16px 12px 20px; /* Меньше отступ справа для скролла */
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.dropdown-option:hover {
    background: var(--color-bg-gray-light);
}

/* .dropdown-option input[type=checkbox] — глобально в forms.css; здесь только margin-right */
.dropdown-option input[type="checkbox"] {
    margin-right: 12px;
}

.checkbox-custom {
    display: none;
}

.option-text {
    color: var(--color-text-main);
}

/* Стили для цен тарифов в dropdown */
.tariff-price-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.tariff-price-new {
    color: var(--color-text-main);
}

.tariff-price-old {
    color: var(--color-text-gray);
    text-decoration: line-through !important;
    text-decoration-line: line-through !important;
    opacity: 0.7;
}

/* Стили для radio buttons в dropdown */
.dropdown-option input[type="radio"] {
    margin: 0;
    width: 20px;
    height: 20px;
    border: 2px solid var(--color-primary);
    border-radius: 50%; /* Круглая форма для radio buttons */
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    background: var(--color-white);
    padding: 0;
    box-sizing: border-box;
    margin-right: 12px;
}

.dropdown-option input[type="radio"]:checked {
    background: var(--color-white);
    border: 2px solid var(--color-primary);
}

.dropdown-option input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    background: var(--color-primary);
    border-radius: 50%; /* Круглая точка внутри */
    transform: translate(-50%, -50%);
}

/* Бордовая тема для dropdown */
.theme-burgundy .dropdown-option input[type="checkbox"] {
    border: 2px solid var(--color-burgundy);
}

.theme-burgundy .dropdown-option input[type="checkbox"]:checked {
    background: var(--color-white);
    border: 2px solid var(--color-burgundy);
}

.theme-burgundy .dropdown-option input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 12px;
    background: var(--color-burgundy);
    border-radius: 0;
    transform: translate(-50%, -50%);
}

/* Бордовая тема для radio buttons в dropdown */
.theme-burgundy .dropdown-option input[type="radio"] {
    border: 2px solid var(--color-burgundy);
}

.theme-burgundy .dropdown-option input[type="radio"]:checked {
    background: var(--color-white);
    border: 2px solid var(--color-burgundy);
}

.theme-burgundy .dropdown-option input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    background: var(--color-burgundy);
    border-radius: 50%; /* Круглая точка внутри */
    transform: translate(-50%, -50%);
}

/* Адаптивные стили для dropdown */
@media screen and (max-width: 768px) {
    .dropdown-input {
        padding: 16px 20px;
        min-height: auto;
    }

    .dropdown-option {
        padding: 10px 12px 10px 16px; /* Меньше отступ справа для скролла */
    }

    .selected-tag {
        padding: 4px 10px;
    }
}

/* ============================================================
 * CF7-СОВМЕСТИМОСТЬ (Contact Form 7 внутри .contact-form-container)
 * CF7 оборачивает [text*] в <span.wpcf7-form-control-wrap>, а [acceptance]
 * в трёхслойную <span.wpcf7-form-control.wpcf7-acceptance>... — приводим
 * визуально к модульному виду из эталона.
 * ========================================================== */

.contact-form-container .wpcf7-form-control-wrap {
    display: block;
    width: 100%;
}

/* Убираем CF7-шный <p> и <br> вокруг полей */
.contact-form-container .form-field > p,
.contact-form-container .agreement-field > p,
.contact-form-container .required-fields-note > p,
.contact-form-container .contact-form-buttons > p {
    margin: 0;
    padding: 0;
}

.contact-form-container .form-field br,
.contact-form-container .agreement-field br {
    display: none;
}

.contact-form-container .wpcf7-not-valid-tip {
    color: var(--color-error);
    margin-top: 6px;
    font-size: var(--font-size-14);
    display: block;
}

/* Acceptance: распакуем 3 уровня wpcf7-обёрток */
/* .contact-form-container .wpcf7-acceptance / .agreement-field label / input[type=checkbox]
 * — глобально в forms.css. Здесь оставлен только цветовой override .wpcf7-list-item-label
 * (текст-плашка, специфично для модульной формы). */
.contact-form-container .agreement-field .wpcf7-list-item-label,
.contact-form-container .agreement-field .wpcf7-list-item-label a {
    color: var(--color-text-plashka);
}

/* Бордовый вариант */
.contact-form-container.theme-burgundy .agreement-field input[type="checkbox"] {
    border-color: var(--color-burgundy);
    accent-color: var(--color-burgundy);
}

.contact-form-container.theme-burgundy .agreement-field input[type="checkbox"]:checked::after {
    background: var(--color-burgundy);
}

/* Submit-кнопка: ширина по содержимому, центрируем; стили .btn применяются */
.contact-form-container .contact-form-buttons {
    margin-top: 8px;
}

.contact-form-container input[type="submit"].wpcf7-submit {
    /* class:btn class:btn-primary-green уже добавляют визуальные стили */
    cursor: pointer;
}

/* Response сообщение */
.contact-form-container .wpcf7-response-output {
    margin: 16px 0 0;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: var(--font-size-14);
    background: rgba(255, 255, 255, 0.85);
}

/* Скрываем дефолтные иконки/спиннер CF7 при необходимости */
.contact-form-container .wpcf7-spinner {
    margin-left: 10px;
}

/* CF7 input уже имеет class="text-p2" — но дополнительно гарантируем стиль */
.contact-form-container .wpcf7-form-control.text-p2 {
    font-family: var(--font-primary);
    font-size: var(--font-size-18);
    font-weight: var(--font-weight-regular);
    color: var(--color-text-main);
    line-height: var(--line-height-auto);
    letter-spacing: 0;
}

.contact-form-container .wpcf7-form-control.text-p2::placeholder {
    color: var(--color-text-gray);
    opacity: 1;
}

/* ============================================================
 * МОДАЛЬНАЯ ФОРМА (.dk-modal-form)
 * Открывается через `data-open-modular-form` (forms.js).
 * Содержит CF7-форму (.contact-form / .wpcf7-form).
 * Темы задаются `data-color-theme="green|burgundy"` на кнопке-триггере.
 * ============================================================ */
.dk-modal-form { position: fixed; inset: 0; z-index: 1100; display: none; align-items: center; justify-content: center; padding: 20px; }
.dk-modal-form.is-open { display: flex; }
.dk-modal-form__overlay { position: absolute; inset: 0; background: rgba(0, 0, 0, .55); backdrop-filter: blur(2px); }
.dk-modal-form__container {
    position: relative;
    background: var(--color-white);
    border-radius: 24px;
    padding: 36px 32px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .25);
}
.dk-modal-form__close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: 0;
    width: 36px;
    height: 36px;
    cursor: pointer;
    font-size: 24px;
    color: #999;
    border-radius: 50%;
    transition: background .2s;
}
.dk-modal-form__close:hover { background: #f0f0f0; color: #333; }
.dk-modal-form__title { font-size: 22px; font-weight: 600; margin-bottom: 8px; color: var(--color-text-main); }
.dk-modal-form__description { margin: 0 0 20px; color: var(--color-text-secondary); }
.dk-modal-form__form { margin-top: 12px; }
body.modal-open { overflow: hidden; }

/* Темы модалки */
.dk-modal-form--burgundy .dk-modal-form__title { color: var(--color-burgundy); }

.dk-modal-form--green .dk-modal-form__container {
    background: linear-gradient(180deg, #e5f3e8 0%, #8bbe8e 100%);
}
.dk-modal-form--green .dk-modal-form__title { color: var(--color-text-main); }
.dk-modal-form--green .dk-modal-form__description { color: var(--color-text-main); opacity: .85; }

/* Inline CF7-форма внутри модалки: поля и базовые элементы */
.dk-modal-form__form .contact-form .form-field,
.dk-modal-form__form .wpcf7-form .form-field { margin-bottom: 10px; }

.dk-modal-form__form .wpcf7-form input[type="text"],
.dk-modal-form__form .wpcf7-form input[type="tel"],
.dk-modal-form__form .wpcf7-form input[type="email"],
.dk-modal-form__form .wpcf7-form textarea {
    width: 100%;
    padding: 16px 20px;
    border: 1px solid var(--color-border-light);
    border-radius: 30px;
    background: var(--color-white);
    box-sizing: border-box;
    transition: border-color .2s;
    font-size: 15px;
    color: var(--color-text-main);
}
.dk-modal-form__form .wpcf7-form textarea { border-radius: 40px; resize: vertical; min-height: 60px; }

/* Единая ширина всех полей = ширина формы (2026-07-08).
   Обёртки .form-field / .form-row / wpcf7-wrap растягиваем на 100%, иначе
   input с size="40" ужимается по символам и поля выглядят уже textarea. */
.dk-modal-form__form .wpcf7-form .form-field,
.dk-modal-form__form .wpcf7-form .form-row,
.dk-modal-form__form .wpcf7-form .wpcf7-form-control-wrap {
    display: block;
    width: 100%;
}
.dk-modal-form__form .wpcf7-form input[type="text"],
.dk-modal-form__form .wpcf7-form input[type="tel"],
.dk-modal-form__form .wpcf7-form input[type="email"],
.dk-modal-form__form .wpcf7-form input[type="number"],
.dk-modal-form__form .wpcf7-form input[type="url"],
.dk-modal-form__form .wpcf7-form select {
    width: 100%;
    box-sizing: border-box;
}
.dk-modal-form__form .wpcf7-form input:focus,
.dk-modal-form__form .wpcf7-form textarea:focus { outline: 0; border-color: var(--color-primary); }
.dk-modal-form__form .wpcf7-form input::placeholder,
.dk-modal-form__form .wpcf7-form textarea::placeholder { color: var(--color-text-gray); }

.dk-modal-form__form .required-fields-note { margin: 0 0 14px; }
.dk-modal-form__form .required-fields-note p {
    margin: 0;
    font-style: italic;
    color: var(--color-text-secondary);
    font-size: 13px;
}

/* Согласия (CF7-acceptance) — белая плашка с зелёным accent, как на других формах сайта */
.dk-modal-form__form .agreement-field {
    background: var(--color-white);
    border-radius: 30px;
    padding: 16px 20px;
    margin-bottom: 12px;
}
.dk-modal-form__form .wpcf7-acceptance .wpcf7-list-item {
    margin: 0;
    display: block;
}
.dk-modal-form__form .wpcf7-acceptance label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: var(--font-size-14);
    color: var(--color-text-main);
    line-height: 1.4;
    padding: 0;
}
/* .dk-modal-form__form .wpcf7-acceptance input[type=checkbox] / a — глобально в forms.css */

/* Форма подписки (newsletter) в модалке использует обёртку .form-acceptance
   (а не .agreement-field), у которой нет плашки-обёртки с паддингом. Поэтому
   белую плашку рисует сам label — возвращаем ему паддинг (как на формах сайта),
   иначе текст лепится к краям и плашка выглядит тонкой. Скоуп именно
   .form-acceptance, чтобы не задваивать паддинг у форм на .agreement-field. */
.dk-modal-form__form .form-acceptance .wpcf7-acceptance label {
    padding: 16px 20px;
}

/* Submit кнопка — определяется темой модалки */
.dk-modal-form__form .contact-form-buttons { margin-top: 18px; }
.dk-modal-form__form .contact-form-submit,
.dk-modal-form__form .wpcf7-submit {
    width: 100%;
    background: var(--color-primary);
    color: var(--color-white);
    border: none;
    padding: 14px 20px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
}
.dk-modal-form__form .contact-form-submit:hover,
.dk-modal-form__form .wpcf7-submit:hover { background: var(--color-hover-green); }

/* ============================================================
 * Компактная раскладка модалки на ДЕСКТОПЕ — форма влезает в 1 экран
 * без вертикальной прокрутки (рекомендация подрядчика,
 * docs/analytics-goals-task.md, п.3.3 №3). Касается ТОЛЬКО .dk-modal-form
 * (попап на /event-list/ и т.п.); инлайн-формы на страницах не затрагиваются.
 * ============================================================ */
@media (min-width: 768px) {
    .dk-modal-form__container { padding: 28px; }
    .dk-modal-form__title { font-size: 20px; margin-bottom: 4px; }
    .dk-modal-form__description { margin-bottom: 12px; }
    .dk-modal-form__form { margin-top: 6px; }

    /* Двухколоночная сетка однострочных полей. */
    .dk-modal-form__form .wpcf7-form {
        display: flex;
        flex-wrap: wrap;
        gap: 8px 12px;
        align-items: flex-start;
    }
    .dk-modal-form__form .wpcf7-form > * { width: 100%; }      /* по умолчанию — на всю ширину */
    .dk-modal-form__form .wpcf7-form > p { margin: 0; }
    .dk-modal-form__form .wpcf7-form br { display: none; }     /* убираем autop-переносы, если есть */
    .dk-modal-form__form .wpcf7-form > .form-field {
        width: 100%;              /* все поля на всю ширину формы (2026-07-08) */
        margin-bottom: 0;
    }

    /* Компактнее по вертикали. */
    .dk-modal-form__form .wpcf7-form input[type="text"],
    .dk-modal-form__form .wpcf7-form input[type="tel"],
    .dk-modal-form__form .wpcf7-form input[type="email"] { padding: 11px 18px; }
    .dk-modal-form__form .wpcf7-form textarea { min-height: 52px; padding: 11px 18px; }
    .dk-modal-form__form .required-fields-note { margin-bottom: 8px; }
    .dk-modal-form__form .agreement-field { padding: 10px 16px; margin-bottom: 8px; }
    .dk-modal-form__form .contact-form-buttons { margin-top: 10px; }
    .dk-modal-form__form .contact-form-submit,
    .dk-modal-form__form .wpcf7-submit { padding: 12px 20px; }
}

.dk-modal-form--burgundy .dk-modal-form__form .contact-form-submit,
.dk-modal-form--burgundy .dk-modal-form__form .wpcf7-submit { background: var(--color-burgundy); }
.dk-modal-form--burgundy .dk-modal-form__form .contact-form-submit:hover,
.dk-modal-form--burgundy .dk-modal-form__form .wpcf7-submit:hover { background: var(--color-hover-burgundy); }

/* Бордовая тема: чекбокс и ссылки */
.dk-modal-form--burgundy .dk-modal-form__form .wpcf7-acceptance input[type="checkbox"],
.dk-modal-form--burgundy .dk-modal-form__form .wpcf7-acceptance input[type="checkbox"]:checked {
    border-color: var(--color-burgundy);
}
.dk-modal-form--burgundy .dk-modal-form__form .wpcf7-acceptance input[type="checkbox"]:checked::after {
    background: var(--color-burgundy);
}
.dk-modal-form--burgundy .dk-modal-form__form .wpcf7-acceptance a {
    color: var(--color-burgundy);
}

/* Статус формы (успех / ошибка / валидация) */
.dk-modal-form__form .form-status { margin-top: 14px; font-size: 14px; min-height: 1.2em; }
.dk-modal-form__form .form-status.is-success { color: var(--color-primary); }
.dk-modal-form__form .form-status.is-error { color: var(--color-error, #c33); }
.dk-modal-form__form .wpcf7-response-output {
    margin: 14px 0 0;
    border: 0;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 14px;
}
.dk-modal-form__form .wpcf7-not-valid-tip {
    display: block;
    color: var(--color-error, #c33);
    font-size: 13px;
    margin-top: 6px;
}
.dk-modal-form__form .form-error { display: block; color: var(--color-error, #c33); font-size: 13px; margin-top: 6px; }
.dk-modal-form__form .form-error.sf-hidden { display: none; }

/* Мобильные устройства */
@media screen and (max-width: 480px) {
    .dk-modal-form__container{padding: 28px;}
    .dk-modal-form__title{font-size: 18px;}
    .dk-modal-form__form .wpcf7-form input[type="text"],
    .dk-modal-form__form .wpcf7-form input[type="tel"],
    .dk-modal-form__form .wpcf7-form input[type="email"],
    .dk-modal-form__form .wpcf7-form textarea{
        padding: 12px 20px;
    }
}