/* ============================================
   Форма обмена по шагам (Таблица 6) — bitfm.io
   Подключается только при «Тип таблицы: Таблица 6».
   Поверх exchange-form.css: окно оформления превращается
   в обычный блок страницы, шаги переключает exchange-steps.js
   ============================================ */

/* окно → блок на странице */
.bf-ex-steps .bf-ex-popup {
    position: static;
    z-index: auto;
}
.bf-ex-steps .bf-ex-popup.active {
    display: block;
}
.bf-ex-steps .bf-ex-popup-overlay,
.bf-ex-steps .bf-ex-popup-header {
    display: none;
}
.bf-ex-steps .bf-ex-popup-content {
    max-width: none;
    max-height: none;
    overflow: visible;
    border-radius: 30px;
    background: #f3f7fc;
    box-shadow: 0 4px 4px rgba(31, 33, 36, .01);
    padding: 30px;
}
.bf-ex-steps .bf-ex-popup-body {
    padding: 0;
    overflow: visible;
}
.bf-ex-steps .bf-ex-popup-footer {
    padding: 0;
    border-top: 0;
}
.bf-ex-steps.bf-steps-open .bf-ex-main {
    display: none;
}

/* шапка шагов */
.bf-ex-step-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 18px;
}
.bf-ex-step-back {
    flex: none;
    width: 42px;
    height: 42px;
    border: 1px solid #d5dfeb;
    border-radius: 12px;
    background: #fff;
    color: #1f2124;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .2s, border-color .2s;
}
.bf-ex-step-back:hover {
    background: #eaf3ff;
    border-color: #148EFF;
}
.bf-ex-stepper {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.bf-ex-stepper li {
    display: flex;
    align-items: center;
    gap: 8px;
    font: 700 14px 'Nunito', sans-serif;
    color: #6b8199;
    margin: 0;
    padding: 0;
}
.bf-ex-stepper li::before {
    display: none;
}
.bf-ex-stepper li + li::before {
    content: '';
    display: block;
    width: 28px;
    height: 2px;
    background: #d5dfeb;
    margin-right: 2px;
}
.bf-ex-stepper li span {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #d5dfeb;
    color: #fff;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.bf-ex-stepper li.done span {
    background: #00E094;
}
.bf-ex-stepper li.on {
    color: #1f2124;
}
.bf-ex-stepper li.on span {
    background: #148EFF;
    box-shadow: 0 0 0 4px rgba(20, 142, 255, .18);
}

/* сводка «Отдаёте → Получаете» */
.bf-ex-step-summary {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 16px;
    margin: 0 0 20px;
    padding: 12px 16px;
    border-radius: 14px;
    background: #e5f1ff;
}
.bf-ex-step-sum-item {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.bf-ex-step-sum-label {
    font: 12px 'Nunito', sans-serif;
    color: #6b8199;
}
.bf-ex-step-sum-val {
    font: 600 16px 'JetBrains Mono', monospace;
    color: #000;
    word-break: break-word;
}
.bf-ex-step-sum-arrow {
    flex: none;
    color: #6b8199;
}
.bf-ex-step-change {
    margin-left: auto;
    border: 0;
    background: transparent;
    color: #148EFF;
    font: 700 14px 'Nunito', sans-serif;
    cursor: pointer;
    padding: 6px 0;
}
.bf-ex-step-change:hover {
    text-decoration: underline;
}
.bf-ex-step-title {
    margin: 0 0 18px;
    font: 500 24px 'JetBrains Mono', sans-serif;
    color: #000;
}

/* шаг 3: сводка заявки */
.bf-ex-step-review {
    margin: 0 0 18px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid #e4e8ee;
}
.bf-ex-step-review:empty {
    display: none;
}
.bf-ex-review-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 11px 16px;
    border-bottom: 1px solid #eef2f7;
    font: 14px 'Nunito', sans-serif;
}
.bf-ex-review-row:last-child {
    border-bottom: 0;
}
.bf-ex-review-row > span:first-child {
    color: #6b8199;
    flex: none;
    max-width: 45%;
}
.bf-ex-review-row > span:last-child {
    color: #000;
    font-weight: 700;
    text-align: right;
    word-break: break-word;
    min-width: 0;
}

/* что видно на каком шаге */
.bf-ex-step-actions {
    display: none;
    padding-top: 6px;
}
.bf-ex-step-next {
    display: block;
    width: 100%;
    height: 50px;
    border: 0;
    border-radius: 8px;
    background: #00E094;
    color: #fff;
    font: 600 18px/50px 'Nunito', sans-serif;
    cursor: pointer;
    transition: background .4s;
}
.bf-ex-step-next:hover {
    background: #1F2124;
}
/* шаг 2: поля + «Продолжить» */
.bf-ex-steps[data-step="2"] .bf-ex-step-actions {
    display: block;
}
.bf-ex-steps[data-step="2"] .bf-ex-step-review,
.bf-ex-steps[data-step="2"] .bf-ex-popup-captcha,
.bf-ex-steps[data-step="2"] .bf-ex-popup-check,
.bf-ex-steps[data-step="2"] .bf-ex-popup-footer {
    display: none;
}
/* шаг 3: сводка, капча, согласие, «Создать заявку» */
.bf-ex-steps[data-step="3"] .bf-ex-popup-fields {
    display: none;
}

@media (max-width: 700px) {
    .bf-ex-steps .bf-ex-popup-content {
        padding: 20px 16px;
        margin: 0;
        border-radius: 20px;
    }
    .bf-ex-step-title {
        font-size: 20px;
    }
    .bf-ex-step-head {
        gap: 10px;
    }
    .bf-ex-stepper {
        flex-wrap: nowrap;
        gap: 12px;
    }
    .bf-ex-stepper li {
        font-size: 13px;
        gap: 5px;
        white-space: nowrap;
    }
    .bf-ex-stepper li + li::before {
        display: none;
    }
    .bf-ex-step-sum-arrow {
        display: none;
    }
    .bf-ex-step-summary {
        flex-direction: column;
        align-items: flex-start;
    }
    .bf-ex-step-change {
        margin-left: 0;
    }
    .bf-ex-review-row {
        flex-direction: column;
        gap: 2px;
    }
    .bf-ex-review-row > span:first-child {
        max-width: none;
    }
    .bf-ex-review-row > span:last-child {
        text-align: left;
    }
}
