
.wpcf7-form {
  max-width: 480px;
  margin: 0 auto;
  padding: 40px 36px;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 20px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

 


    
 /* ==========================================
   УНИКАЛЬНЫЙ МОДАЛ — префикс ux-modal
   Не конфликтует с Bootstrap и другими темами
   ========================================== */

/* Контейнер */
.ux-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;

    display: flex;
    align-items: center;
    justify-content: center;

    visibility: hidden;
    opacity: 0;
    transition: visibility 0.25s, opacity 0.25s;
}

.ux-modal.active {
    visibility: visible;
    opacity: 1;
}

/* Оверлей (тёмный фон) */
.ux-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
}

/* Окно */
.ux-modal__window {
    position: relative;
    z-index: 2;

    width: min(520px, 92%);
    max-height: 90vh;            /* ← ограничение высоты */
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 20px 70px rgba(0, 0, 0, 0.35);

    display: flex;
    flex-direction: column;      /* чтобы скроллер тянулся */
}

/* Кнопка закрытия */
.ux-modal__close {
    position: absolute!important;
    top: 8px!important;
    right: 14px!important;
    z-index: 3!important;

    border: 0!important;
     background-color: none!important;
    background: none!important;
    font-size: 32px!important;
    line-height: 1;
    cursor: pointer;
    color: #555!important;
    padding: 4px 8px!important;

    /* Сброс на случай наследования от шаблона */
    all: revert-layer;
    background: none;
    border: 0;
    font-size: 32px!important;
    cursor: pointer!important;
    color: #555;
}

.ux-modal__close:hover {
    color: #000!important;
}

/* Скролл-контейнер */
.ux-modal__scroller {
    overflow-y: auto;
    overscroll-behavior: contain; /* не дёргает фон */
    padding: 35px;
    flex: 1 1 auto;

    /* Тонкий скроллбар */
    scrollbar-width: thin;
    scrollbar-color: #ccc transparent;
}

/* Заголовок */
.ux-modal__title {
    text-align: center;
    margin: 0 0 25px;
    font-size: 22px;
    font-weight: 600;
    color: #222;

    /* Сброс */
    all: revert-layer;
    text-align: center;
    margin: 0 0 25px;
    font-size: 22px;
    font-weight: 600;
    color: #222;
}

/* ==========================================
   СБРОС И СТИЛИ ДЛЯ CF7 ВНУТРИ МОДАЛА
   Чтобы шаблон не просачивался
   ========================================== */



.ux-modal .wpcf7-response-output {
    margin: 15px 0 0;
    padding: 10px;
    border-radius: 6px;
    font-size: 14px;
}

/* ==========================================
   МОБИЛЬНАЯ АДАПТАЦИЯ
   ========================================== */
@media (max-width: 480px) {
    .ux-modal__window {
        width: calc(100% - 20px);  /* отступ по 10px с каждой стороны */
        max-height: 85vh;
        border-radius: 10px;
    }

    .ux-modal__scroller {
        padding: 20px 16px;
    }

    .ux-modal__title {
        font-size: 18px;
        margin-bottom: 18px;
    }

    .ux-modal__close {
        top: 4px;
        right: 8px;
        font-size: 28px;
    }
}


     </style> 
    <style>
/* ========================================
   Минималистичный стиль для Contact Form 7
   ======================================== */

/* --- Сброс обёрток CF7 --- */
.wpcf7-form p {
  margin: 0 0 16px 0;
  padding: 0;
}


/* Все инпуты — чистый сброс */
  .wpcf7-form input[type="text"],
  .wpcf7-form input[type="tel"],
  .wpcf7-form input[type="email"],
  .wpcf7-form textarea {
    all: revert-layer;           /* сбрасываем всё от шаблона */

    display: block;
    width: 100%;
    padding: 14px 16px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    font-family: inherit;
    color: #333;
    background: #fff;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

  .wpcf7-form input[type="text"]:focus,
  .wpcf7-form input[type="tel"]:focus,
  .wpcf7-form input[type="email"]:focus,
  .wpcf7-form textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.15);
}

/* Кнопка отправки — жёсткий сброс Bootstrap */
  .wpcf7-form .wpcf7-submit,
  .wpcf7-form input[type="submit"],
  .wpcf7-form button[type="submit"] {
    all: revert-layer;           /* убиваем btn, btn-primary и всё от шаблона */

    display: block;
    width: 100%;
    padding: 14px 24px;
    margin-top: 5px;
    border: 0;
    border-radius: 6px;
    background: #007bff;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    text-align: center;
    transition: background 0.2s;
    box-sizing: border-box;
}

  .wpcf7-form.wpcf7-submit:hover,
  .wpcf7-form input[type="submit"]:hover,
  .wpcf7-form button[type="submit"]:hover {
    background: #0056b3;
}

/* Сообщения CF7 */
  .wpcf7-form .wpcf7-not-valid-tip {
    font-size: 13px;
    margin-top: -10px;
    margin-bottom: 10px;
    color: #dc3545;
}
 
 .wpcf7-form input::placeholder,
  .wpcf7-form textarea::placeholder {
  color: #9e9e9e;
  font-size: 15px;
}

  

/* --- Состояние ошибки --- */
  .wpcf7-form input.wpcf7-not-valid,
  .wpcf7-form textarea.wpcf7-not-valid {
  border-bottom-color: #e03e3e;
}

/* --- Подсказки валидации --- */
  .wpcf7-form .wpcf7-not-valid-tip {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: #e03e3e;
  line-height: 1.4;
}

/* --- SmartCaptcha --- */
  .wpcf7-form .smart-captcha {
  margin: 8px 0 16px;
  height: auto !important;
 
}

  .wpcf7-form .smart-captcha iframe {
  border-radius: 4px;
}


/* --- Чекбокс --- */
.wpcf7-form .popup__checkBox {
  margin: 0 0 24px 0;
}

.wpcf7-form .popup__checkBox .wpcf7-list-item {
  margin: 0;
}

.wpcf7-form .popup__checkBox .wpcf7-list-item label {
  display: inline-flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 13px;
  line-height: 1.5;
  color: #5a5a5a;
  position: relative;
  user-select: none;
}

/* Скрываем нативный чекбокс */
.wpcf7-form .popup__checkBox input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

/* Кастомный квадратик */
.wpcf7-form .popup__checkBox .popup__style-mark,
.wpcf7-form .popup__checkBox input[type="checkbox"] + .wpcf7-list-item-label .popup__style-mark {
     flex-shrink: 0;
    width: 20px;
    height: 20px;
    border: 1.5px solid #c4c4c4;
    border-radius: 3px;
    background: #fff;
    position: relative;
    display: inline-block;
    top: 4px;
    transition: background 0.2s ease, border-color 0.2s ease;
}

/* Галочка при :checked */
.wpcf7-form .popup__checkBox input[type="checkbox"]:checked + .wpcf7-list-item-label .popup__style-mark,
.wpcf7-form .popup__checkBox input[type="checkbox"]:checked ~ .popup__style-mark {
  background: #222;
  border-color: #222;
}

.wpcf7-form .popup__checkBox input[type="checkbox"]:checked + .wpcf7-list-item-label .popup__style-mark::after,
.wpcf7-form .popup__checkBox input[type="checkbox"]:checked ~ .popup__style-mark::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 6px;
  height: 11px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Состояние ошибки чекбокса */
.wpcf7-form .popup__checkBox input[type="checkbox"].wpcf7-not-valid + .wpcf7-list-item-label .popup__style-mark,
.wpcf7-form .popup__checkBox input[type="checkbox"].wpcf7-not-valid ~ .popup__style-mark {
  border-color: #e03e3e;
}

/* --- Ссылка «политикой конфиденциальности» --- */
.wpcf7-form .popup__checkBox .link-simple {
  color: #222;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
  transition: opacity 0.2s ease;
}

.wpcf7-form .popup__checkBox .link-simple:hover {
  opacity: 0.6;
}

/* --- Кнопка отправки --- */
.wpcf7-form .wpcf7-submit {
  display: inline-block;
  width: 100%;
  padding: 14px 32px;
  font-size: 15px;
  font-family: inherit;
  font-weight: 500;
  letter-spacing: 0.3px;
  color: #fff;
  background: #1a1a1a;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.15s ease;
  text-align: center;
  box-sizing: border-box;
}

.wpcf7-form .wpcf7-submit:hover {
  background: #333;
}

.wpcf7-form .wpcf7-submit:active {
  transform: scale(0.98);
}

/* --- Спиннер --- */
.wpcf7-form .wpcf7-spinner {
  display: none;
}

/* --- Сообщение-ответ формы --- */
.wpcf7-form .wpcf7-response-output {
  margin: 20px 0 0 0;
  padding: 12px 16px;
  font-size: 13px;
  line-height: 1.5;
  border-radius: 6px;
  border: 1px solid;
}

/* Успех */
.wpcf7-form .wpcf7-response-output.wpcf7-mail-sent-ok,
.wpcf7-form .wpcf7-response-output.wpcf7-mail-sent-ng {
  color: #1a7a2a;
  background: #edf9ef;
  border-color: #b8e0c0;
}

/* Ошибка валидации */
.wpcf7-form .wpcf7-response-output.wpcf7-validation-errors {
  color: #b3261e;
  background: #fef2f2;
  border-color: #f5c6c6;
}

/* --- Скрытые поля --- */
.wpcf7-form .hidden-fields-container {
  display: none;
}

 