/* ══════════════════════════════════════════════════
   WebToolz Payment v3 — Cache-Busted Classes
   ══════════════════════════════════════════════════ */

:root {
    --green:      #1B7A52;
    --green-dark: #155f40;
    --text:       #111827;
    --sub:        #6b7280;
    --border:     #e5e7eb;
    --bg:         #f2f2f2;
    --teal:       #3aafa9;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    color: var(--text);
}

/* ── Card ──────────────────────────────────────────── */
.card-v3 {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,.13);
    width: 100%;
    max-width: 360px;
    overflow: hidden;
    animation: fadeIn-v3 .35s ease both;
}

@keyframes fadeIn-v3 {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Header ────────────────────────────────────────── */
.card-header-v3 {
    background: var(--green);
    padding: .85rem 1.1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
}

.hdr-left-v3 {
    display: flex;
    align-items: center;
    gap: .6rem;
}

.hdr-logo-v3 {
    width: 36px; height: 36px;
    border-radius: 7px;
    background: rgba(255,255,255,.18);
    display: block;
    flex-shrink: 0;
}

.hdr-title-v3 {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: .01em;
}

.hdr-invoice-v3 {
    font-size: .7rem;
    color: rgba(255,255,255,.8);
    background: rgba(255,255,255,.18);
    border-radius: 20px;
    padding: .18rem .55rem;
    font-weight: 600;
    font-family: 'SFMono-Regular', Consolas, monospace;
    flex-shrink: 0;
}

/* ── Body ──────────────────────────────────────────── */
.card-body-v3 {
    padding: 1.1rem 1.25rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .65rem;
}

.product-name-v3 {
    font-size: .82rem;
    font-weight: 600;
    color: var(--sub);
    text-align: center;
}

.pay-label-v3 {
    font-size: .85rem;
    font-weight: 600;
    color: var(--text);
    text-align: center;
}

/* ── QR ────────────────────────────────────────────── */
.qr-box-v3 {
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 8px;
    background: #fff;
    box-shadow: 0 1px 6px rgba(0,0,0,.07);
    display: inline-block;
}

#qr-img {
    display: block;
    border-radius: 6px;
    image-rendering: pixelated;
}

/* ── Amount breakdown ──────────────────────────────── */
.amount-breakdown-v3 {
    width: 100%;
    background: #f9f9f9;
    border: 1px solid var(--border);
    border-radius: 9px;
    padding: .55rem .85rem;
    display: flex;
    flex-direction: column;
    gap: .3rem;
}

.ab-row-v3 {
    display: flex;
    justify-content: space-between;
    font-size: .76rem;
    color: var(--sub);
}

.ab-row-v3 span:last-child { font-weight: 600; color: var(--text); }

.ab-total-v3 {
    padding-top: .3rem;
    margin-top: .05rem;
    border-top: 1px dashed var(--border);
    font-weight: 700;
}

.ab-total-v3 span          { font-size: .82rem; font-weight: 700; color: var(--text); }
.ab-total-v3 span:last-child { color: var(--green); font-size: .88rem; }

/* ── Scan instruction ──────────────────────────────── */
.scan-text-v3 {
    font-size: .78rem;
    color: var(--sub);
    text-align: center;
    line-height: 1.5;
}

/* ── UPI apps image ────────────────────────────────── */
.upi-apps-img-v3 {
    max-width: 240px;
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* ── UPI ID copy row ───────────────────────────────── */
.upi-copy-row-v3 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    background: #f9f9f9;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: .55rem .8rem;
    width: 100%;
}

.upi-id-label-v3 {
    flex: 1;
    font-size: .76rem;
    color: var(--sub);
    font-weight: 500;
    word-break: break-all;
}

.copy-btn-v3 {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    background: var(--green);
    color: #fff;
    border: none;
    border-radius: 7px;
    padding: .3rem .65rem;
    font-size: .72rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    transition: background .18s, transform .1s;
}

.copy-btn-v3:hover  { background: var(--green-dark); }
.copy-btn-v3:active { transform: scale(.95); }
.copy-btn-v3.copied-v3 { background: #059669; }

.ripple-v3 {
    position: absolute;
    width: 80px; height: 80px;
    border-radius: 50%;
    background: rgba(255,255,255,.35);
    transform: scale(0);
    top: 50%; left: 50%;
    margin: -40px 0 0 -40px;
    pointer-events: none;
    animation: ripple-v3 .5s linear;
}
@keyframes ripple-v3 { to { transform: scale(3); opacity: 0; } }

/* ── Footer status (waiting + timer) ───────────────── */
.footer-status-v3 {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .35rem;
    padding-top: .15rem;
    width: 100%;
}

.waiting-v3 {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .76rem;
    color: var(--sub);
}

.lottie-waiting-v3 {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
}

.timer-line-v3 {
    font-size: .74rem;
    color: var(--sub);
    text-align: center;
}

.timer-val-v3 {
    font-weight: 700;
    color: var(--green);
    transition: color .3s;
}
.timer-val-v3.warn-v3   { color: #d97706; }
.timer-val-v3.danger-v3 { color: #dc2626; animation: timerBlink-v3 .8s ease-in-out infinite alternate; }

@keyframes timerBlink-v3 {
    to { opacity: .6; }
}

/* ── State sections (shared) ───────────────────────── */
.state-wrap-v3 {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: .6rem;
    padding: 2.5rem 1.5rem 2rem;
    text-align: center;
}

/* ── Lottie containers ─────────────────────────────── */
.lottie-success-v3 {
    width: 110px;
    height: 110px;
}

.lottie-expired-v3 {
    width: 120px;
    height: 120px;
}

/* ── Success (Thank You!) ──────────────────────────── */
.state-title-success-v3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--teal);
    margin-top: .15rem;
}

.state-sub-success-v3 {
    font-size: .82rem;
    color: var(--sub);
    line-height: 1.5;
}

.state-redirect-v3 {
    font-size: .72rem;
    color: #9ca3af;
    margin-top: .25rem;
}

/* ── Already Paid ──────────────────────────────────── */
.already-paid-wrap-v3 {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .6rem;
    padding: 2rem 1.5rem 1.5rem;
    text-align: center;
}

.already-paid-title-v3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text);
    margin-top: .1rem;
}

.already-paid-sub-v3 {
    font-size: .82rem;
    color: var(--sub);
    margin-bottom: .15rem;
}

.paid-details-v3 {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .3rem;
    margin-top: .15rem;
}

.paid-amount-v3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}

.paid-amount-v3 .rupee-v3 {
    color: var(--text);
}

.paid-date-v3 {
    font-size: .85rem;
    font-weight: 500;
    color: var(--sub);
}

.go-back-v3 {
    display: inline-block;
    margin-top: .6rem;
    font-size: .85rem;
    font-weight: 600;
    color: #5b21b6;
    text-decoration: none;
    transition: color .2s;
}

.go-back-v3:hover {
    color: #7c3aed;
    text-decoration: underline;
}

/* ── Expired ───────────────────────────────────────── */
.expired-title-v3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #dc2626;
}

.expired-sub-v3 {
    font-size: .82rem;
    color: var(--sub);
    line-height: 1.5;
}

/* ── Mobile ────────────────────────────────────────── */
@media (max-width: 400px) {
    body              { padding: .75rem; align-items: flex-start; padding-top: 1rem; }
    .card-v3          { max-width: 100%; border-radius: 10px; }
    .card-body-v3     { padding: .9rem 1rem .9rem; gap: .55rem; }
    #qr-img           { width: 178px !important; height: 178px !important; }
    .upi-apps-img-v3  { max-width: 200px; }
    .lottie-success-v3 { width: 90px; height: 90px; }
    .lottie-expired-v3 { width: 100px; height: 100px; }
}
