/* =============================================================
   Bhanoo Donations – Popup Styles
   ============================================================= */

/* ── Overlay ── */
#bhanoo-donate-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.6);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 12px;
    backdrop-filter: blur(3px);
}
#bhanoo-donate-overlay.open { display: flex; }

/* ── Modal ── */
#bhanoo-donate-modal {
    background: #fff;
    border-radius: 16px;
    max-width: 560px;
    width: 100%;
    max-height: 94vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,.3);
    padding: 32px 28px 28px;
    animation: bdmIn .25s ease;
}
@keyframes bdmIn {
    from { opacity: 0; transform: translateY(-18px); }
    to   { opacity: 1; transform: translateY(0); }
}

#bhanoo-donate-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 26px;
    cursor: pointer;
    color: #888;
    line-height: 1;
}
#bhanoo-donate-close:hover { color: #e53935; }

/* ── Step indicator ── */
.bdm-steps {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
    gap: 0;
    padding-right: 36px; /* space for the × close button */
}
.bdm-step {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #bbb;
    white-space: nowrap;
}
.bdm-step span {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #eee;
    color: #aaa;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    flex-shrink: 0;
}
.bdm-step.active       { color: #0b3d91; }
.bdm-step.active span  { background: #0b3d91; color: #fff; }
.bdm-step.done span    { background: #1a9e4a; color: #fff; }
.bdm-step.done         { color: #1a9e4a; }
.bdm-step-line         { flex: 1; height: 2px; background: #eee; margin: 0 6px; }

/* ── Panels ── */
.bdm-panel h3 {
    font-size: 17px;
    font-weight: 700;
    color: #0b3d91;
    margin: 0 0 16px;
}

/* ── Form ── */
.bdm-row   { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.bdm-field { display: flex; flex-direction: column; gap: 4px; }
.bdm-field label { font-size: 12px; font-weight: 600; color: #555; }
.req { color: #e53935; }
.opt { font-weight: 400; color: #aaa; }

#bdm-form-1 input,
#bdm-form-1 select,
#bdm-form-1 textarea {
    padding: 9px 11px;
    border: 1.5px solid #dde2ef;
    border-radius: 8px;
    font-size: 13px;
    font-family: inherit;
    background: #f8f9fc;
    color: #222;
    outline: none;
    transition: border-color .2s;
    width: 100%;
    box-sizing: border-box;
}
#bdm-form-1 input:focus,
#bdm-form-1 select:focus,
#bdm-form-1 textarea:focus { border-color: #0b3d91; background: #fff; }
#bdm-form-1 .bdm-field { margin-bottom: 0; }

/* ── QR step ── */
.bdm-qr-wrap { text-align: center; padding: 8px 0 16px; }
.bdm-amount-badge {
    display: inline-block;
    background: #0b3d91;
    color: #fff;
    padding: 6px 20px;
    border-radius: 20px;
    font-size: 14px;
    margin-bottom: 14px;
}
.bdm-amount-badge strong { font-size: 20px; }
.bdm-qr-img {
    width: 200px;
    height: 200px;
    object-fit: contain;
    border: 6px solid #f0f4ff;
    border-radius: 12px;
    display: block;
    margin: 0 auto 12px;
}
.bdm-qr-placeholder {
    width: 200px;
    height: 200px;
    background: #f0f4ff;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: #666;
    margin: 0 auto 12px;
}
.bdm-upi-info {
    font-size: 13px;
    color: #444;
    background: #f0f4ff;
    padding: 8px 14px;
    border-radius: 8px;
    display: inline-block;
    margin-bottom: 10px;
    line-height: 1.8;
}
.bdm-scan-note { font-size: 12px; color: #888; margin: 6px 0 0; }

/* ── Upload area ── */
.bdm-upload-area {
    border: 2px dashed #c5d0e8;
    border-radius: 10px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    background: #f8f9fc;
    transition: border-color .2s;
    margin-bottom: 16px;
}
.bdm-upload-area:hover   { border-color: #0b3d91; }
.bdm-upload-icon         { font-size: 36px; margin-bottom: 6px; }
.bdm-upload-area p       { margin: 4px 0; font-size: 13px; color: #555; font-weight: 600; }

/* ── Buttons ── */
.bdm-btn-primary,
.bdm-btn-secondary {
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity .2s;
    font-family: inherit;
}
.bdm-btn-primary              { background: #1a9e4a; color: #fff; flex: 1; }
.bdm-btn-primary:hover        { opacity: .88; }
.bdm-btn-primary:disabled     { opacity: .6; cursor: not-allowed; }
.bdm-btn-secondary            { background: #f0f0f0; color: #555; }
.bdm-btn-secondary:hover      { background: #e0e0e0; }
.bdm-step-btns                { display: flex; gap: 10px; margin-top: 8px; }
#bdm-form-1 .bdm-btn-primary  { width: 100%; margin-top: 6px; }

/* ── Notices ── */
.bdm-notice {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 12px;
    font-weight: 500;
}
.bdm-notice.success { background: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7; }
.bdm-notice.error   { background: #ffebee; color: #c62828; border: 1px solid #ef9a9a; }

/* ── Mobile ── */
@media (max-width: 520px) {
    #bhanoo-donate-modal { padding: 24px 16px 20px; }
    .bdm-row             { grid-template-columns: 1fr; }
    .bdm-step            { font-size: 10px; }
}
