/* ═══════════════════════════════════════════════════════════
   ABA PayWay QR — Modal  (matches QR_Card_Mockup design)
   ═══════════════════════════════════════════════════════════ */

/* ── Dark overlay ─────────────────────────────────────────── */
#op-aba-payway-overlay {
    position: fixed;
    inset: 0;
    background: rgba(11, 24, 51, 0.90);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 24px;
    box-sizing: border-box;
}

/* ── Grey panel ───────────────────────────────────────────── */
#op-aba-payway-panel {
    position: relative;
    background: #E8E9EC;
    border-radius: 24px;
    padding: 38px 28px 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    max-width: 440px;
    width: 100%;
    box-sizing: border-box;
    border: 6px solid #ffffff;
}

/* ── X close button (top-right of panel) ─────────────────── */
.op-aba-close-x {
    position: absolute;
   /* align-self: flex-start; */
    top: 10px;
    left: 90%;
    background: none;
    border: none;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #555;
    font-size: 17px;
    border-radius: 50%;
    padding: 0;
    line-height: 1;
    transition: background 0.15s;
}
.op-aba-close-x:hover { background: rgba(0,0,0,0.10); }


/* ── QR area (position:relative for expired overlay) ─────── */
.op-aba-qr-area {
    position: relative;
    display: inline-flex;
}

/* ── White 6px protected border around gateway PNG ──────────
   #FFFFFF border, 18px radius, 6px thickness (per guideline)
   ─────────────────────────────────────────────────────────── */
.op-aba-qr-protect {
    background: #E8E9EC;
    border-radius: 18px;
    padding: 6px;
    display: inline-flex;
    line-height: 0;
}

/* Gateway base64 PNG — PayWay is responsible for card design */
.op-khqr-gateway-img {
    display: block;
 /*   width: 300px; */
    max-width: 100%;
    height: auto;
    border-radius: 12px;
}

/* Local canvas fallback */
.op-khqr-canvas {
    display: block;
    width: 280px;
    max-width: 100%;
    height: auto;
    image-rendering: pixelated;
}

/* ── Scan hint text ───────────────────────────────────────── */
.op-aba-scan-hint {
    font-size: 13px;
    color: #888;
    text-align: center;
    line-height: 1.5;
    margin: 0;
}

/* ── Expired overlay (over the QR protect box) ───────────── */
.op-khqr-expired-overlay {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(52, 64, 84, 0.60);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-radius: 18px;
    z-index: 5;
}
.op-aba-qr-area.is-expired .op-khqr-expired-overlay { display: flex; }
.op-khqr-expired-box {
    text-align: center;
    background: rgba(255,255,255,0.96);
    border-radius: 18px;
    padding: 20px 24px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.18);
}
.op-khqr-expired-title {
    font-size: 18px;
    font-weight: 800;
    color: #101828;
    margin-bottom: 12px;
}
.op-khqr-restart {
    appearance: none;
    border: 0;
    border-radius: 10px;
    background: #0f8f5f;
    color: #fff;
    padding: 10px 20px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    width: 100%;
}

/* ── Countdown pill — OUTSIDE grey panel, in overlay ─────── */
.op-aba-countdown-outer {
    display: flex;
    align-items: center;
    justify-content: center;
}

.op-khqr-countdown {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    /*border: 1.5px solid #dcdcdc; */
    border-radius: 999px;
    padding: 2px 9px;
    color: #222;
    font-size: 15px;
    letter-spacing: 1px;
    font-variant-numeric: tabular-nums;
}

.op-khqr-countdown.is-warning {
    color: #b42318;
    border-color: #f9c0bb;
    background: #fff5f4;
}

/* Spinner icon inside countdown */
.op-aba-spinner {
    width: 22px;
    height: 22px;
    animation: opAbaSpin 1s linear infinite;
    flex-shrink: 0;
}

@keyframes opAbaSpin {
    to { transform: rotate(360deg); }
}

/* ── Loading state ────────────────────────────────────────── */
.op-aba-loading {
    font-size: 14px;
    color: #666;
    text-align: center;
    padding: 20px 0;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 480px) {
    #op-aba-payway-panel { padding: 32px 18px 22px; border-radius: 18px; }
    .op-khqr-gateway-img { width: 250px; }
    .op-khqr-canvas      { width: 230px; }
    .op-khqr-countdown   { font-size: 17px; padding: 8px 18px; }
}
