/* =========================================================
   Попап с Bitrix веб-формой — corruption-popup.css
   Подключать: /local/templates/climatstar.ru/css/corruption-popup.css
   ========================================================= */

/* ── Overlay ─────────────────────────────────────────────── */
.bx-overlay {
    display: none;
    position: fixed;
    inset: 0;                    /* top/right/bottom/left: 0 */
    background: rgba(0, 0, 0, .55);
    z-index: 9000;
    overflow-y: auto;
    padding: 20px;
    box-sizing: border-box;
    /* центрируем диалог */
    -webkit-justify-content: center;
            justify-content: center;
    -webkit-align-items: flex-start;
            align-items: flex-start;
}

.bx-overlay.bx-overlay--open {
    display: -webkit-flex;
    display: flex;
}

/* Запрет прокрутки страницы под попапом */
.bx-no-scroll {
    overflow: hidden;
}

/* ── Dialog box ──────────────────────────────────────────── */
.bx-overlay__dialog {
    position: relative;
    background: #fff;
    border-radius: 8px;
    padding: 40px 44px 36px;
    width: 100%;
    max-width: 560px;
    margin: auto;
    box-shadow: 0 8px 40px rgba(0, 0, 0, .18);
    box-sizing: border-box;
}

/* ── Close button ────────────────────────────────────────── */
.bx-overlay__close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: none;
    border: none;
    padding: 4px 8px;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    color: #888;
    transition: color .2s;
}
.bx-overlay__close:hover,
.bx-overlay__close:focus {
    color: #333;
    outline: 2px solid currentColor;
}

/* ── Title ───────────────────────────────────────────────── */
.bx-overlay__title {
    margin: 0 32px 24px 0;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
    color: #1a1a1a;
}

/* ── Loader & error ──────────────────────────────────────── */
.bx-overlay__loader {
    text-align: center;
    padding: 32px 0;
    color: #777;
    font-size: 14px;
}

.bx-overlay__error {
    color: #c00;
    font-size: 14px;
}

/* == Форма ================================================= */

/* Общая обёртка поля */
.bx-f {
    margin-bottom: 16px;
}

/* Метка */
.bx-f > label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

/* Пометка "обязательное" */
.bx-f--req > label::after {
    content: ' *';
    color: #d32f2f;
}

/* Текстовые поля, select */
.bx-f input[type="text"],
.bx-f input[type="email"],
.bx-f input[type="date"],
.bx-f textarea,
.bx-f select {
    width: 100%;
    padding: 10px 13px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    background: #fff;
    box-sizing: border-box;
    transition: border-color .2s, box-shadow .2s;
    -webkit-appearance: none;
}
.bx-f input[type="text"]:focus,
.bx-f input[type="email"]:focus,
.bx-f input[type="date"]:focus,
.bx-f textarea:focus,
.bx-f select:focus {
    border-color: #107bb1;
    box-shadow: 0 0 0 3px rgba(0, 128, 226, 0.15);
    outline: none;
}

.bx-f textarea {
    resize: vertical;
    min-height: 90px;
}

.bx-f select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23666'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

/* Radio / Checkbox группы */
.bx-radio-group,
.bx-checkbox-group {
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
            flex-direction: column;
    gap: 8px;
}

.bx-opt-label {
    display: -webkit-inline-flex;
    display: inline-flex;
    -webkit-align-items: flex-start;
            align-items: flex-start;
    gap: 9px;
    font-size: 14px;
    cursor: pointer;
    line-height: 1.4;
}
.bx-opt-label input {
    margin-top: 2px;
    -webkit-flex-shrink: 0;
            flex-shrink: 0;
    accent-color: #107bb1;
}

/* Согласие на ПД */
.bx-f--consent {
    border-top: 1px solid #eee;
    padding-top: 16px;
    margin-top: 4px;
}
.bx-f--consent .bx-opt-label {
    font-size: 13px;
    color: #555;
}
.bx-f--consent a {
    color: #107bb1;
    text-decoration: underline;
}

/* Кнопка отправки */
.bx-f-submit {
    margin-top: 20px;
}

/* ── Сообщения ───────────────────────────────────────────── */
.bx-f-msg {
    margin-top: 14px;
}

.bx-f-errors {
    list-style: none;
    margin: 0;
    padding: 12px 14px;
    background: #fff2f2;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    color: #c00;
    font-size: 13px;
    line-height: 1.6;
}
.bx-f-errors li + li {
    margin-top: 4px;
}

.bx-f-success {
    padding: 20px;
    text-align: center;
    font-size: 15px;
    color: #2e7d32;
    background: #f1f8f1;
    border: 1px solid #c3e6c3;
    border-radius: 6px;
}

/* ── Адаптив ─────────────────────────────────────────────── */
@media (max-width: 600px) {
    .bx-overlay__dialog {
        padding: 28px 20px 24px;
    }
    .bx-overlay__title {
        font-size: 17px;
    }
}
