/* Слой затемнения */
html {
    scroll-behavior: smooth;
}

.body-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10; /* Должен быть ниже поиска (999), но выше контента */
    
    /* Твои параметры */
    background: rgba(0, 0, 0, 0.25); /* opacity: 0.25 */
    backdrop-filter: blur(8px);      /* размытие фона */
    -webkit-backdrop-filter: blur(8px); /* поддержка Safari */
    
    /* Состояние по умолчанию */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Когда активен */
.body-overlay.is-active {
    opacity: 1;
    visibility: visible;
}

/* Dropdown: оверлей остаётся для клика, без затемнения */
.body-overlay.is-active.is-dropdown {
    opacity: 0;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

/* Блокировка скролла на body */
body.lock-scroll {
    overflow: hidden;
}

.form-group {
    margin-bottom: 32px;
}



/* Основной контейнер-оверлей */


.success-overlay {
    position: fixed; /* Относительно окна, а не футера */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Цвет #1C1C1C в формате RGBA с прозрачностью 0.25 */
    background: rgba(28, 28, 28, 0.25); 
    backdrop-filter: blur(8px); 
    -webkit-backdrop-filter: blur(8px); /* Для поддержки в Safari */
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 999999; /* Максимальный приоритет */
}

/* Окно с сообщением */
.form-success-message {
    background: #1a1a1a;
    border-radius: 16px;
    padding: 40px;
    text-align: center;
    position: relative;
    max-width: 656px;
    width: 100%;
}

/* Заголовок и текст */
.form-success-message .order-form__title {
    color: #fff;
    margin-bottom: 4px;
    text-align: left;
    font-size: 42px;
    line-height: 44px;
    font-weight: 500;
}

.form-success-message .order-form__subtitle {
    color: #FFFFFF99;
    margin-bottom: 40px;
    text-align: left;
    font-size: 18px;
    line-height: 24px;
}

/* Красная кнопка */
.form-success-message .btn-submit {
    background: #FD1F2D;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 18px;
    width: 100%;
    font-size: 20px;
    font-weight: 500;
    line-height: 24px;
    height: 69px;
    cursor: pointer;
    transition: 0.3s;
}

.form-success-message .btn-submit:hover {
    background: #e63538;
}

/* Иконка крестика */
.close-modal-icon {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    line-height: 0;
}

.close-modal-icon svg {
    width: 60px; /* Размер как на макете */
    height: 60px;
}



/* Оверлей */
.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(28, 28, 28, 0.25);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none; /* Скрыто */
    justify-content: center;
    align-items: center;
    z-index: 99999;
}

/* Окно */
.modal-content {
    background: #1C1C1C;
    width: 100%;
    max-width: 636px;
    padding: 60px 40px;
    border-radius: 16px;
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

.order-form__title {
    color: #fff;
    font-size: 42px;
    margin-bottom: 4px;
    line-height: 44px;
    font-weight: 500;
}

.order-form__subtitle {
    color: #FFFFFF99;
    font-size: 18px;
    margin-bottom: 40px;
}

/* Поля */
.form-group {
    text-align: left;
}

.form-label {
    display: block;
    color: #FFFFFF99;
    font-size: 14px;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    background: transparent !important;
    border: none;
    border-bottom: 1px solid #333;
    padding: 12px 0;
    color: #fff;
    font-size: 18px;
    outline: none;
    border-radius: 0;
}

.form-input:focus {
    border-bottom-color: #ff3b3f;
}


.form-input:-webkit-autofill,
.form-input:-webkit-autofill:hover, 
.form-input:-webkit-autofill:focus, 
.form-input:-internal-autofill-selected {
    /* Текст оставляем белым */
    -webkit-text-fill-color: #fff !important;
    
    /* Вместо фона используем внутреннюю тень цвета вашего окна (#1C1C1C) */
    box-shadow: inset 0 0 0 1000px #1C1C1C !important;
    -webkit-box-shadow: inset 0 0 0 1000px #1C1C1C !important;
    
    /* Убираем стандартную анимацию появления желтого фона */
    transition: background-color 5000s ease-in-out 0s;
}

/* 2. Для полной уверенности при активном вводе */
.form-input:focus {
    background-color: transparent !important;
    outline: none !important;
}

/* 3. Фикс для iOS (Safari), чтобы не было тени сверху внутри инпута */
.form-input {
    -webkit-appearance: none;
    appearance: none;
}

/* Кнопка */
.btn-submit {
    background: #FD1F2D;
    color: #fff;
    width: 100%;
    padding: 20px;
    border: none;
    border-radius: 8px;
    font-size: 20px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 10px;
    transition: 0.3s;
}

.btn-submit:hover { background: #e63538; }

.modal-close-icon {
    position: absolute;
    top: 15px; right: 15px;
    background: none; border: none;
    cursor: pointer;
}

.form-privacy {
    color: #FFFFFF99;
    font-size: 14px;
    margin-top: 12px;
    line-height: 20px;
    text-align: center;
}

.form-privacy a {
    text-decoration: underline;
}


/* Полностью скрываем стандартные сообщения CF7 */
.wpcf7-response-output {
    display: none !important;
}



@media (max-width: 800px) {
	.wpcf7-form .form-group {
    margin-bottom: 20px;
}
.modal-content {
    margin: 0 20px;
}
}




/* =========================
   СОГЛАСИЯ В ФОРМАХ
   ========================= */

.form-consents {
    margin: 16px 0 18px;
}

/* Отступы, которые CF7/WordPress может добавить вокруг acceptance */
.form-consents > p {
    margin: 0 0 10px;
    padding: 0;
}

.form-consents > p:last-child {
    margin-bottom: 0;
}

/* Обёртки Contact Form 7 */
.form-consents .wpcf7-form-control-wrap,
.form-consents .wpcf7-form-control,
.form-consents .wpcf7-list-item {
    display: block;
    width: 100%;
    margin: 0;
}

/* Сам пункт согласия */
.form-consents .wpcf7-list-item {
    margin: 0;
}

/* Label */
.form-consents label {
    display: flex;
    align-items: flex-start;
    gap: 9px;
	max-width: 400px;
    width: 100%;
    margin: 0;
    padding: 0;

    color: rgba(255, 255, 255, 0.72);
    font-size: 12px;
    line-height: 1.45;
    font-weight: 400;

    cursor: pointer;
}

/* Checkbox */
.form-consents input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;

    flex: 0 0 17px;

    width: 17px;
    height: 17px;

    margin: 1px 0 0;
    padding: 0;

    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 3px;

    background: transparent;

    cursor: pointer;

    position: relative;
    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

/* Наведение */
.form-consents input[type="checkbox"]:hover {
    border-color: rgba(255, 255, 255, 0.8);
}

/* Выбранный checkbox */
.form-consents input[type="checkbox"]:checked {
    background: #ff6b00;
    border-color: #ff6b00;
}

/* Галочка */
.form-consents input[type="checkbox"]:checked::after {
    content: "";

    position: absolute;
    left: 5px;
    top: 2px;

    width: 4px;
    height: 8px;

    border: solid #fff;
    border-width: 0 2px 2px 0;

    transform: rotate(45deg);
}

/* Фокус с клавиатуры */
.form-consents input[type="checkbox"]:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.22);
}

/* Текст */
.form-consents .wpcf7-list-item-label {
    display: block;
    flex: 1;

    min-width: 0;
}

/* Ссылки */
.form-consents a {
    color: #fff;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;

    transition: opacity 0.2s ease;
}

.form-consents a:hover {
    opacity: 0.7;
}

/* Ошибка обязательного согласия */
.form-consents .wpcf7-not-valid-tip {
    margin: 5px 0 0 26px;

    color: #ff8a70;
    font-size: 11px;
    line-height: 1.35;
}

/* =========================
   ЕСЛИ ФОРМА НА СВЕТЛОМ ФОНЕ
   ========================= */

.form-light .form-consents label,
.form-white .form-consents label {
    color: rgba(0, 0, 0, 0.65);
}

.form-light .form-consents input[type="checkbox"],
.form-white .form-consents input[type="checkbox"] {
    border-color: rgba(0, 0, 0, 0.3);
    background: transparent;
}

.form-light .form-consents input[type="checkbox"]:hover,
.form-white .form-consents input[type="checkbox"]:hover {
    border-color: rgba(0, 0, 0, 0.55);
}

.form-light .form-consents a,
.form-white .form-consents a {
    color: inherit;
}

/* =========================
   МОБИЛЬНЫЕ
   ========================= */

@media (max-width: 767px) {

    .form-consents {
        margin: 14px 0 16px;
    }

    .form-consents label {
		text-align: left;
        gap: 8px;
        font-size: 11px;
        line-height: 1.45;
    }

    .form-consents input[type="checkbox"] {
        flex-basis: 16px;
        width: 16px;
        height: 16px;
    }

    .form-consents input[type="checkbox"]:checked::after {
        left: 4px;
        top: 2px;

        width: 4px;
        height: 7px;
    }

    .form-consents .wpcf7-not-valid-tip {
        margin-left: 24px;
    }
}

