/* =========================================================
   Попап с Bitrix веб-формой — стильный дизайн
   ========================================================= */

/* ── Overlay ─────────────────────────────────────────────── */
.bx-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .65);
    backdrop-filter: blur(4px);
    z-index: 9000;
    overflow-y: auto;
    padding: 20px;
    box-sizing: border-box;
    -webkit-justify-content: center;
            justify-content: center;
    -webkit-align-items: center;
            align-items: center;
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.bx-overlay.bx-overlay--open {
    display: -webkit-flex;
    display: flex;
}

/* Запрет прокрутки страницы под попапом */
.bx-no-scroll {
    overflow: hidden;
}

/* ── Dialog box ──────────────────────────────────────────── */
.bx-overlay__dialog {
    position: relative;
    background: #ffffff;
    border-radius: 16px;
    padding: 40px 36px 36px;
    width: 94%;
    max-width: 540px;
    margin: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
    box-sizing: border-box;
    animation: slideUp 0.3s ease-out;
}

/* Форма ID=6 на десктопе шире */
.bx-overlay__dialog:has(#form-6) {
    max-width: 70vw;
}

@media (max-width: 768px) {
    .bx-overlay__dialog:has(#form-6) {
        max-width: 94%;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Close button ────────────────────────────────────────── */
.bx-overlay__close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: #2d2d2d;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    color: #ffffff;
    transition: all .2s ease;
}
.bx-overlay__close:hover,
.bx-overlay__close:focus {
    background: #1a1a1a;
    transform: scale(1.05);
    outline: none;
}

/* ── Title ───────────────────────────────────────────────── */
.bx-overlay__title {
    margin: 0 50px 8px 0;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
    color: #1a1a1a;
    letter-spacing: -0.5px;
}

/* ── Subtitle (описание формы) ───────────────────────────── */
.bx-overlay__body > p:first-child {
    margin: 0 0 18px 0;
    font-size: 14px;
    color: #666;
    line-height: 1.4;
}

/* ── Loader & error ──────────────────────────────────────── */
.bx-overlay__loader {
    text-align: center;
    padding: 48px 0;
    color: #999;
    font-size: 15px;
}

.bx-overlay__error {
    color: #d32f2f;
    font-size: 14px;
    padding: 16px;
    background: #ffebee;
    border-radius: 8px;
    border-left: 4px solid #d32f2f;
}

/* == Форма ================================================= */

/* Общая обёртка поля */
.bx-f {
    margin-bottom: 14px;
}

/* Метка */
.bx-f > label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #2d2d2d;
}

/* Пометка "обязательное" */
.bx-f--req > label::after {
    content: ' *';
    color: #e74c3c;
    font-weight: 700;
}

/* Текстовые поля, select */
.bx-f input[type="text"],
.bx-f input[type="email"],
.bx-f input[type="tel"],
.bx-f input[type="date"],
.bx-f input[type="number"],
.bx-f textarea,
.bx-f select {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    color: #2d2d2d;
    background: #fafafa;
    box-sizing: border-box;
    transition: all .25s ease;
    -webkit-appearance: none;
    appearance: none;
    font-family: inherit;
}
.bx-f input[type="text"]:hover,
.bx-f input[type="email"]:hover,
.bx-f input[type="tel"]:hover,
.bx-f input[type="date"]:hover,
.bx-f input[type="number"]:hover,
.bx-f textarea:hover,
.bx-f select:hover {
    border-color: #bdbdbd;
    background: #fff;
}
.bx-f input[type="text"]:focus,
.bx-f input[type="email"]:focus,
.bx-f input[type="tel"]:focus,
.bx-f input[type="date"]:focus,
.bx-f input[type="number"]:focus,
.bx-f textarea:focus,
.bx-f select:focus {
    border-color: #00b894;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(0, 184, 148, .1);
    outline: none;
}

.bx-f input[type="tel"][data-tel-input] {
    letter-spacing: .2px;
}

.bx-f input[type="tel"][data-tel-input]::placeholder {
    color: #9aa3ab;
}

.bx-f textarea {
    resize: vertical;
    min-height: 80px;
}

.bx-f select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 6 5-6' stroke='%232d2d2d' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 44px;
    cursor: pointer;
}
select#f_PRICE_FOR {
    padding: 0 10px;
    margin: 0 0 0 10px;
}

/* Radio / Checkbox группы */
.bx-radio-group,
.bx-checkbox-group {
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
            flex-direction: column;
    gap: 12px;
}

.bx-opt-label {
    display: -webkit-inline-flex;
    display: inline-flex;
    -webkit-align-items: flex-start;
            align-items: flex-start;
    gap: 12px;
    font-size: 14px;
    cursor: pointer;
    line-height: 1.5;
    color: #555;
    transition: color .2s;
}
.bx-opt-label:hover {
    color: #2d2d2d;
}
.bx-opt-label input[type="radio"],
.bx-opt-label input[type="checkbox"] {
    margin-top: 3px;
    -webkit-flex-shrink: 0;
            flex-shrink: 0;
    width: 20px;
    height: 20px;
    accent-color: #00b894;
    cursor: pointer;
}

/* Согласия на обработку данных */
.checkbox_wrap {
    margin-bottom: 8px;
}

.checkbox_wrap .checkbox {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    accent-color: #00b894;
    cursor: pointer;
    vertical-align: middle;
}

.checkbox_wrap label {
    font-size: 12px;
    line-height: 1.4;
    color: #666;
    cursor: pointer;
    display: inline-flex;
    align-items: flex-start;
    gap: 8px;
}

.checkbox_wrap label a {
    color: #00b894;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color .2s;
}

.checkbox_wrap label a:hover {
    border-bottom-color: #00b894;
}

.checkbox_wrap.user-consent__double {
    margin-top: 24px;
    padding-top: 10px;
    border-top: 1px solid #e0e0e0;
}

/* Старое оформление согласий (резерв) */
.bx-f--consent {
    border-top: 1px solid #e0e0e0;
    padding-top: 20px;
    margin-top: 8px;
}
.bx-f--consent .bx-opt-label {
    font-size: 13px;
    color: #666;
}
.bx-f--consent a {
    color: #00b894;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color .2s;
}
.bx-f--consent a:hover {
    border-bottom-color: #00b894;
}

/* Кнопка отправки */
.bx-f-submit {
    margin-top: 20px;
}

.bx-f-submit .btn,
.bx-f-submit input[type="submit"],
.bx-f-submit button[type="submit"] {
    width: 100%;
    padding: 12px 24px;
    background: #00b894;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all .25s ease;
    box-shadow: 0 4px 12px rgba(0, 184, 148, .3);
    text-transform: none;
}

.bx-f-submit .btn:hover,
.bx-f-submit input[type="submit"]:hover,
.bx-f-submit button[type="submit"]:hover {
    background: #00a382;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 184, 148, .4);
}

.bx-f-submit .btn:active,
.bx-f-submit input[type="submit"]:active,
.bx-f-submit button[type="submit"]:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 184, 148, .3);
}

.bx-f-submit .btn:disabled,
.bx-f-submit input[type="submit"]:disabled,
.bx-f-submit button[type="submit"]:disabled {
    background: #bdbdbd;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ── Кнопка раскрытия дополнительных параметров (форма ID=6) ─ */
.btn-toggle-additional {
    width: 100%;
    padding: 10px 20px;
    margin: 16px 0 14px 0;
    background: #2d2d2d;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all .25s ease;
    box-shadow: 0 4px 12px rgba(45, 45, 45, .2);
}

.btn-toggle-additional:hover {
    background: #1a1a1a;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(45, 45, 45, .3);
}

.btn-toggle-additional:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(45, 45, 45, .2);
}

.btn-toggle-additional.active {
    background: #00b894;
}

.btn-toggle-additional.active:hover {
    background: #00a382;
}

/* Дополнительные параметры (скрытая секция) */
.additional-params {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 2px solid #e0e0e0;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Переключатель Аренда/Продажа (форма ID=6) ────────────── */
.deal-type-switcher {
    display: -webkit-flex;
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.deal-type-btn {
    -webkit-flex: 1;
            flex: 1;
    padding: 10px 16px;
    background: #ffffff;
    color: #2d2d2d;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all .25s ease;
}

.deal-type-btn:hover {
    border-color: #00b894;
    color: #00b894;
}

.deal-type-btn.active {
    background: #00b894;
    color: #ffffff;
    border-color: #00b894;
}

/* ── Основные поля формы ID=6 в 2 ряда ──────────────────── */
.main-fields-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 16px;
}

.main-fields-grid .bx-f {
    margin-bottom: 0 !important;
}
.main-fields-grid .bx-f-full-width {
    grid-column: 1 / -1;
}
@media (max-width: 600px) {
    .main-fields-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

/* ── Блок слайдеров ─────────────────────────────────────────  */
.slider-block {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 16px;
}

.slider-field {
    margin-bottom: 0 !important;
}

.slider-field label {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
}

.slider-label-row {
    display: -webkit-flex;
    display: flex;
    -webkit-justify-content: space-between;
            justify-content: space-between;
    -webkit-align-items: center;
            align-items: center;
    margin-bottom: 8px;
}

.slider-label-row label {
    margin-bottom: 0;
}

.price-unit-select {
    padding: 6px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 13px;
    color: #666;
    background: #fafafa;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23666' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 28px;
}

.slider-inputs {
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
            align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}

.slider-input-from,
.slider-input-to {
    width: 100px;
    padding: 8px 10px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 13px;
    color: #2d2d2d;
    background: #fafafa;
    text-align: center;
    transition: all .25s ease;
}

.slider-separator {
    font-size: 16px;
    font-weight: 600;
    color: #999;
    -webkit-user-select: none;
    user-select: none;
}

.slider-input-from:focus,
.slider-input-to:focus {
    border-color: #00b894;
    background: #fff;
    outline: none;
}

/* Слайдер (двойной ползунок) */
.range-slider {
    position: relative;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    margin: 16px 0;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
}

.range-slider-track {
    position: absolute;
    height: 100%;
    background: #00b894;
    border-radius: 3px;
    pointer-events: none;
}

.range-slider-thumb {
    position: absolute;
    width: 20px;
    height: 20px;
    background: #00b894;
    border: 3px solid #ffffff;
    border-radius: 50%;
    top: 50%;
    -webkit-transform: translate(-50%, -50%);
            transform: translate(-50%, -50%);
    cursor: -webkit-grab;
    cursor: grab;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .2);
    -webkit-transition: -webkit-transform .15s ease;
    transition: -webkit-transform .15s ease;
    transition: transform .15s ease;
    transition: transform .15s ease, -webkit-transform .15s ease;
    z-index: 2;
}

.range-slider-thumb:hover {
    -webkit-transform: translate(-50%, -50%) scale(1.15);
            transform: translate(-50%, -50%) scale(1.15);
    box-shadow: 0 3px 12px rgba(0, 184, 148, .4);
}

.range-slider-thumb:active {
    cursor: -webkit-grabbing;
    cursor: grabbing;
    -webkit-transform: translate(-50%, -50%) scale(1.2);
            transform: translate(-50%, -50%) scale(1.2);
    box-shadow: 0 4px 16px rgba(0, 184, 148, .5);
}

/* ── Расположение (кнопки выбора) ───────────────────────────  */
.location-block {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 2px solid #e0e0e0;
}

.location-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2d2d2d;
}

.location-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 10px;
}

.location-btn {
    padding: 8px 12px;
    background: #2d2d2d;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all .25s ease;
}

.location-btn:hover {
    background: #1a1a1a;
    transform: translateY(-1px);
}

.location-btn:active {
    transform: translateY(0);
}

.location-btn.active {
    background: #00b894;
}

.location-selected {
    min-height: 32px;
    padding: 8px;
    background: #f5f5f5;
    border-radius: 6px;
    font-size: 12px;
    color: #666;
    display: none;
}

.location-selected.has-items {
    display: block;
}

.location-tag {
    display: inline-block;
    padding: 4px 10px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    margin: 3px;
    font-size: 12px;
    color: #2d2d2d;
}

.location-tag-remove {
    margin-left: 6px;
    color: #999;
    cursor: pointer;
    font-weight: bold;
}

.location-tag-remove:hover {
    color: #e74c3c;
}

/* ── Модальное окно выбора (Округ) ───────────────────────── */
.location-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .5);
    z-index: 9500;
    display: -webkit-flex;
    display: flex;
    -webkit-justify-content: center;
            justify-content: center;
    -webkit-align-items: center;
            align-items: center;
    padding: 20px;
    animation: fadeIn 0.2s ease-out;
}

.location-modal-dialog {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    max-width: 450px;
    width: 100%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .3);
    animation: slideUp 0.3s ease-out;
}

.location-modal-header {
    display: -webkit-flex;
    display: flex;
    -webkit-justify-content: space-between;
            justify-content: space-between;
    -webkit-align-items: center;
            align-items: center;
    margin-bottom: 20px;
}

.location-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #2d2d2d;
}

.location-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
            align-items: center;
    -webkit-justify-content: center;
            justify-content: center;
    border-radius: 6px;
    transition: all .2s ease;
}

.location-modal-close:hover {
    background: #f5f5f5;
    color: #333;
}

.location-modal-body {
    margin-bottom: 20px;
}

.location-modal-footer {
    display: -webkit-flex;
    display: flex;
    gap: 12px;
    -webkit-justify-content: flex-end;
            justify-content: flex-end;
}

.btn-modal-cancel,
.btn-modal-ok {
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all .25s ease;
}

.btn-modal-cancel {
    background: #f5f5f5;
    color: #666;
}

.btn-modal-cancel:hover {
    background: #e0e0e0;
    color: #333;
}

.btn-modal-ok {
    background: #00b894;
    color: #ffffff;
}

.btn-modal-ok:hover {
    background: #00a382;
    transform: translateY(-1px);
}
/* ── Скроллируемое тело модалки ──────────────────────────────── */
.location-modal-scrollable {
    max-height: 60vh;
    overflow-y: auto;
}

.location-modal-scrollable::-webkit-scrollbar {
    width: 8px;
}

.location-modal-scrollable::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-radius: 4px;
}

.location-modal-scrollable::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.location-modal-scrollable::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* ── Loader ──────────────────────────────────────────────────── */
.location-loader {
    font-size: 16px;
    color: #666;
}

/* ── Metro модальное окно ────────────────────────────────────── */
.metro-lines-container {
    padding: 8px 0;
}

.metro-line-group {
    margin-bottom: 24px;
}

.metro-line-group:last-child {
    margin-bottom: 0;
}

.metro-line-title {
    font-size: 15px;
    font-weight: 600;
    color: #2d2d2d;
    margin: 0 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #e0e0e0;
}

.metro-stations-list {
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
            flex-direction: column;
    gap: 8px;
}

.metro-station-label {
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
            align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: background .2s ease;
}

.metro-station-label:hover {
    background: #f5f5f5;
}

.metro-station-label input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
}

.metro-station-marker {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    -webkit-flex-shrink: 0;
            flex-shrink: 0;
}

.metro-station-name {
    font-size: 14px;
    color: #2d2d2d;
}

/* ── Цвета линий метро ───────────────────────────────────────── */
.metro-1 { background: #ED1B35; } /* Сокольническая */
.metro-2 { background: #44B85C; } /* Замоскворецкая */
.metro-3 { background: #0078BF; } /* Арбатско-Покровская */
.metro-4 { background: #19C1F3; } /* Филёвская */
.metro-5 { background: #894E35; } /* Кольцевая */
.metro-6 { background: #F58631; } /* Калужско-Рижская */
.metro-7 { background: #8E479C; } /* Таганско-Краснопресненская */
.metro-8 { background: #FFCB31; } /* Калининская */
.metro-9 { background: #A1A2A3; } /* Серпуховско-Тимирязевская */
.metro-10 { background: #B3D445; } /* Люблинско-Дмитровская */
.metro-11 { background: #79CDCD; } /* Большая кольцевая */
.metro-12 { background: #ACBFE1; } /* Бутовская */
.metro-14 { background: #DE64A1; } /* Центральная */
.metro-15 { background: #D596D6; } /* Некрасовская */
.metro-d1 { background: #E47523; } /* МЦД-1 */
.metro-d2 { background: #DD2E82; } /* МЦД-2 */

/* ── Алфавитная группировка (Район, Улица) ───────────────────── */
.alphabet-container {
    padding: 8px 0;
}

.alphabet-group {
    margin-bottom: 20px;
}

.alphabet-group:last-child {
    margin-bottom: 0;
}

.alphabet-letter {
    font-size: 18px;
    font-weight: 700;
    color: #00b894;
    margin: 0 0 10px 0;
    padding-bottom: 6px;
    border-bottom: 2px solid #00b894;
}

.alphabet-items-list {
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
            flex-direction: column;
    gap: 6px;
}

.alphabet-item-label {
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
            align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: background .2s ease;
}

.alphabet-item-label:hover {
    background: #f5f5f5;
}

.alphabet-item-label input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
}

.alphabet-item-name {
    font-size: 14px;
    color: #2d2d2d;
}

/* ── Поиск улиц ──────────────────────────────────────────────── */
.street-search-box {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e0e0e0;
}

.street-search-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: border-color .2s ease;
}

.street-search-input:focus {
    outline: none;
    border-color: #00b894;
}
/* ── Сообщения ───────────────────────────────────────────── */
.bx-f-msg {
    margin-top: 20px;
}

.bx-f-errors {
    list-style: none;
    margin: 0;
    padding: 16px 18px;
    background: #ffebee;
    border: 2px solid #ef5350;
    border-radius: 10px;
    color: #c62828;
    font-size: 14px;
    line-height: 1.6;
}
.bx-f-errors li + li {
    margin-top: 6px;
}
.bx-f-errors li::before {
    content: '• ';
    color: #ef5350;
    font-weight: bold;
}

.bx-f-success {
    padding: 24px;
    text-align: center;
    font-size: 16px;
    font-weight: 500;
    color: #2e7d32;
    background: #e8f5e9;
    border: 2px solid #66bb6a;
    border-radius: 12px;
    animation: successPulse 0.5s ease-out;
}

@keyframes successPulse {
    0% {
        transform: scale(0.95);
        opacity: 0;
    }
    50% {
        transform: scale(1.02);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ── Адаптив ─────────────────────────────────────────────── */
@media (max-width: 600px) {
    .bx-overlay {
        padding: 12px;
        align-items: flex-start;
    }
    
    .bx-overlay__dialog {
        padding: 24px 20px 24px;
        border-radius: 12px;
        margin-top: 20px;
    }
    
    .bx-overlay__title {
        font-size: 20px;
        margin-right: 40px;
    }
    
    .bx-overlay__close {
        width: 36px;
        height: 36px;
        font-size: 20px;
    }
    
    .bx-f input[type="text"],
    .bx-f input[type="email"],
    .bx-f input[type="tel"],
    .bx-f input[type="date"],
    .bx-f input[type="number"],
    .bx-f textarea,
    .bx-f select {
        padding: 10px 12px;
        font-size: 16px; /* предотвращает зум на iOS */
    }
    
    .bx-f-submit .btn,
    .bx-f-submit input[type="submit"],
    .bx-f-submit button[type="submit"] {
        padding: 12px 24px;
    }
    
    /* Адаптив для формы ID=6 */
    .slider-block {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .slider-inputs {
        gap: 6px;
    }
    
    .slider-input-from,
    .slider-input-to {
        width: 90px;
        padding: 8px 6px;
        font-size: 13px;
    }
    
    .slider-separator {
        font-size: 14px;
    }
    
    .location-buttons {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .deal-type-switcher {
        gap: 8px;
    }
    
    .price-unit-select {
        font-size: 12px;
        padding: 4px 8px;
    }
}
