/* ===== Overlay ===== */
#bpg-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.75);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}

/* ===== Modal box ===== */
.bpg-modal {
    background: #1a1f2e;
    color: #fff;
    border-radius: 14px;
    padding: 32px 26px 26px;
    width: 100%;
    max-width: 420px;
    position: relative;
    box-shadow: 0 16px 60px rgba(0,0,0,.65);
}

.bpg-modal h2 {
    text-align: center;
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 8px;
}

.bpg-modal > p {
    text-align: center;
    color: #9aa0b2;
    font-size: .92rem;
    margin: 0 0 20px;
    line-height: 1.5;
}

/* ===== Book info strip (inside choose step) ===== */
.bpg-book-info {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #252b3b;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 20px;
}
.bpg-book-info img {
    width: 52px;
    height: 68px;
    object-fit: cover;
    border-radius: 5px;
    flex-shrink: 0;
}
.bpg-book-info-text strong { display:block; font-size:.95rem; }
.bpg-book-info-text span   { color:#9aa0b2; font-size:.85rem; }

/* ===== Buttons ===== */
.bpg-btn {
    display: block;
    width: 100%;
    border: none;
    border-radius: 10px;
    padding: 15px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 12px;
    transition: opacity .15s;
    text-align: center;
}
.bpg-btn:hover { opacity: .88; }
.bpg-bank-btn  { background: #29b6f6; color: #fff; }
.bpg-ps-btn    { background: #f7a21b; color: #fff; }
.bpg-submit-btn{ background: #29b6f6; color: #fff; margin-top: 10px; }

/* ===== Download Now button on the page ===== */
.bpg-dl-btn {
    display: inline-block;
    background: #27ae60;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 13px 28px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s;
    letter-spacing: .02em;
}
.bpg-dl-btn:hover { background: #1e8449; }

/* ===== Secure tag ===== */
.bpg-secure {
    text-align: center;
    font-size: .78rem;
    color: #555d72;
    margin: 4px 0 0;
}

/* ===== Close & Back ===== */
.bpg-x {
    position: absolute;
    top: 12px; right: 14px;
    background: #2d3347;
    border: none;
    color: #bbb;
    width: 30px; height: 30px;
    border-radius: 50%;
    font-size: 1rem;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}
.bpg-x:hover { background:#3d4460; color:#fff; }

.bpg-back {
    background: none;
    border: none;
    color: #7ec8f5;
    font-size: .85rem;
    cursor: pointer;
    padding: 0 0 14px;
    display: block;
}
.bpg-back:hover { text-decoration: underline; }

/* ===== Bank card ===== */
.bpg-bank-card {
    background: #fff;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 16px;
    color: #1a1a2e;
}
.bpg-row  { margin-bottom: 12px; }
.bpg-row:last-child { margin-bottom: 0; }
.bpg-lbl  { display: block; font-size: .67rem; color: #888; letter-spacing: .07em; font-weight: 700; margin-bottom: 3px; }

.bpg-acct-line { display:flex; align-items:center; gap:10px; }
.bpg-acct-num  { color: #e67e22; font-size: 1.05rem; font-weight: 700; }

.bpg-copy {
    border: 1px solid #ccc;
    background: #f5f5f5;
    border-radius: 5px;
    padding: 3px 10px;
    font-size: .72rem;
    cursor: pointer;
    color: #333;
}
.bpg-copy:hover { background: #e0e0e0; }

/* ===== WhatsApp box ===== */
.bpg-wa-box {
    background: #252b3b;
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 16px;
}
.bpg-step2-tag {
    background: #e74c3c;
    color: #fff;
    font-size: .68rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 4px;
    letter-spacing: .05em;
    display: inline-block;
    margin-bottom: 8px;
}
.bpg-wa-box p { font-size: .85rem; color: #9aa0b2; margin: 0 0 10px; }
.bpg-wa-required { border: 1px solid rgba(231,76,60,.35); }
.bpg-wa-btn {
    display: block;
    border: 1.5px solid #25d366;
    color: #25d366;
    border-radius: 8px;
    text-align: center;
    padding: 10px;
    font-size: .85rem;
    font-weight: 600;
    text-decoration: none;
}
.bpg-wa-btn:hover { background: rgba(37,211,102,.1); color: #25d366; }

/* ===== Name section ===== */
.bpg-name-section { margin-top: 4px; }
.bpg-name-section label,
.bpg-email-section label {
    display: block;
    font-size: .83rem;
    color: #9aa0b2;
    margin-bottom: 6px;
}
.bpg-name-section input[type=text],
.bpg-email-section input[type=text],
.bpg-email-section input[type=email] {
    width: 100%;
    padding: 10px 12px;
    border-radius: 7px;
    border: 1px solid #3b4257;
    background: #252b3b;
    color: #fff;
    font-size: .92rem;
    box-sizing: border-box;
}

/* ===== Messages ===== */
.bpg-msg { font-size: .85rem; margin-top: 10px; text-align: center; line-height: 1.5; }
.bpg-msg.ok  { color: #4caf50; }
.bpg-msg.err { color: #f44336; }

/* ===== Download links ===== */
#bpg-dl-links a {
    display: block;
    background: #27ae60;
    color: #fff;
    text-align: center;
    padding: 14px;
    border-radius: 8px;
    font-weight: 700;
    margin-bottom: 8px;
    text-decoration: none;
    font-size: 1rem;
}
#bpg-dl-links a:hover { background: #1e8449; }

@media(max-width:480px){
    .bpg-modal { padding: 24px 16px 18px; }
}

/* ===== Waiting / polling screen ===== */
#bpg-step-waiting { text-align: center; }
#bpg-step-waiting p { text-align: center; }

.bpg-spinner {
    width: 44px; height: 44px;
    border: 4px solid #2d3347;
    border-top-color: #29b6f6;
    border-radius: 50%;
    animation: bpg-spin 0.9s linear infinite;
    margin: 18px auto;
}
@keyframes bpg-spin { to { transform: rotate(360deg); } }

.bpg-wait-note { font-size: .8rem !important; color: #555d72 !important; }

/* ===== Cover strip inside modal ===== */
.bpg-cover-strip { text-align: center; margin-bottom: 14px; }
.bpg-cover-strip img {
    max-height: 120px;
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0,0,0,.4);
}

/* ===== Done screen ===== */
#bpg-step-done { text-align: center; }
