.bpf-lock {
    overflow: hidden;
}

.bpf-popup {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.bpf-popup-hidden {
    display: none;
}

.bpf-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(9, 19, 33, 0.72);
}

.bpf-panel {
    position: relative;
    width: min(920px, 100%);
    max-height: min(88vh, 900px);
    overflow: auto;
    background: #ffffff;
    color: #172033;
    border-radius: 8px;
    box-shadow: 0 24px 80px rgba(9, 19, 33, 0.35);
    padding: 30px;
}

.bpf-inline .bpf-panel {
    max-height: none;
    box-shadow: none;
    border: 1px solid #d9e2ef;
}

.bpf-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: #edf2f7;
    color: #172033;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}

.bpf-close:hover,
.bpf-close:focus {
    background: #dbe5f0;
}

.bpf-copy {
    padding-right: 34px;
}

.bpf-copy h2 {
    margin: 0 0 12px;
    font-size: clamp(24px, 4vw, 36px);
    line-height: 1.15;
    color: #0f335c;
    letter-spacing: 0;
}

.bpf-description {
    margin-bottom: 22px;
    color: #344258;
    font-size: 15px;
    line-height: 1.65;
}

.bpf-description p {
    margin: 0 0 12px;
}

.bpf-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.bpf-field {
    min-width: 0;
}

.bpf-field-textarea,
.bpf-field-radio,
.bpf-field-checkbox,
.bpf-message,
.bpf-submit {
    grid-column: 1 / -1;
}

.bpf-field label {
    display: block;
    margin-bottom: 7px;
    font-weight: 700;
    color: #172033;
    font-size: 14px;
}

.bpf-field label span {
    color: #b42318;
}

.bpf-field input[type="text"],
.bpf-field input[type="email"],
.bpf-field input[type="tel"],
.bpf-field textarea,
.bpf-field select {
    width: 100%;
    min-height: 44px;
    border: 1px solid #c8d3df;
    border-radius: 6px;
    background: #ffffff;
    color: #172033;
    padding: 10px 12px;
    font: inherit;
    box-sizing: border-box;
}

.bpf-field textarea {
    min-height: 110px;
    resize: vertical;
}

.bpf-field input:focus,
.bpf-field textarea:focus,
.bpf-field select:focus {
    border-color: #1f6fbf;
    outline: 3px solid rgba(31, 111, 191, 0.18);
}

.bpf-choice-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.bpf-choice-list label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    margin: 0;
    padding: 9px 12px;
    border: 1px solid #c8d3df;
    border-radius: 6px;
    background: #f8fafc;
    font-weight: 600;
}

.bpf-choice-list input {
    margin: 0;
}

.bpf-error input,
.bpf-error textarea,
.bpf-error select,
.bpf-error .bpf-choice-list label {
    border-color: #b42318;
}

.bpf-field-error {
    margin: 6px 0 0;
    color: #b42318;
    font-size: 13px;
}

.bpf-message {
    min-height: 22px;
    font-weight: 700;
}

.bpf-message-success {
    color: #087443;
}

.bpf-message-error {
    color: #b42318;
}

.bpf-submit {
    justify-self: start;
    min-width: 150px;
    min-height: 46px;
    border: 0;
    border-radius: 6px;
    background: #0f5fa8;
    color: #ffffff;
    padding: 12px 22px;
    font-weight: 800;
    cursor: pointer;
}

.bpf-submit:hover,
.bpf-submit:focus {
    background: #0b4e8b;
}

.bpf-submit:disabled {
    cursor: wait;
    opacity: 0.7;
}

@media (max-width: 720px) {
    .bpf-popup {
        padding: 12px;
        align-items: flex-start;
    }

    .bpf-panel {
        max-height: calc(100vh - 24px);
        padding: 22px;
    }

    .bpf-copy {
        padding-right: 26px;
    }

    .bpf-form {
        grid-template-columns: 1fr;
    }

    .bpf-choice-list {
        display: grid;
        grid-template-columns: 1fr;
    }
}
