/* ==========================================================================
   PAYMENT PORTAL STYLESHEET
   ========================================================================== */

:root {
    --bg-page: #08080f;
    --bg-card: #13131f;
    --border-color: rgba(255, 255, 255, 0.08);
    --text-primary: #f0f0f5;
    --text-secondary: #8f8f9e;
    
    /* Bank System Colors */
    --secure-green: #00d285;
    --timer-amber: #ffb300;
    --sbp-pink: #d11a59;
    --sbp-blue: #0084c7;
    --sbp-yellow: #f5b016;
}

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

body {
    background: radial-gradient(circle at 50% 50%, #151525 0%, var(--bg-page) 100%);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.checkout-wrapper {
    width: 100%;
    max-width: 520px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ==========================================================================
   CHECKOUT CARD
   ========================================================================== */
.checkout-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5), 0 0 40px rgba(0, 242, 254, 0.03);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Secure Header */
.checkout-header {
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
}

.secure-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--secure-green);
    font-weight: 700;
    letter-spacing: 1px;
}

.secure-icon {
    font-size: 0.95rem;
    filter: drop-shadow(0 0 5px var(--secure-green));
    animation: lockPulse 2s infinite alternate;
}

@keyframes lockPulse {
    from { opacity: 0.7; }
    to { opacity: 1; }
}

.timer-box {
    text-align: right;
    color: var(--text-secondary);
}

.timer-box strong {
    color: var(--timer-amber);
    font-family: monospace;
    font-size: 0.95rem;
    margin-left: 5px;
    font-weight: bold;
}

/* Order summary */
.order-panel {
    padding: 25px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(180deg, rgba(255,255,255,0.01) 0%, transparent 100%);
}

.merchant-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(0, 242, 254, 0.1);
    border: 1px solid rgba(0, 242, 254, 0.2);
    color: #00f2fe;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.3rem;
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.15);
}

.merchant-details h2 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 2px;
}

.order-id {
    font-size: 0.75rem;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
}

.order-amount-wrapper {
    text-align: right;
}

.amount-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.amount-value {
    font-size: 1.7rem;
    font-weight: 800;
    color: #fff;
    margin: 2px 0;
    font-family: 'Outfit', sans-serif;
}

.currency-desc {
    font-size: 0.65rem;
    color: var(--secure-green);
    font-weight: 600;
    text-transform: uppercase;
}

/* SBP System Branding Box */
.payment-method-container {
    padding: 25px;
    background: rgba(0, 0, 0, 0.15);
}

.method-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.sbp-logo-section {
    display: flex;
    flex-direction: column;
}

.sbp-brand {
    font-family: 'Outfit', sans-serif;
    font-weight: 900;
    font-size: 1.4rem;
    letter-spacing: 1px;
    background: linear-gradient(90deg, var(--sbp-pink) 0%, var(--sbp-blue) 50%, var(--sbp-yellow) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    line-height: 1;
}

.sbp-text {
    font-size: 0.65rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

.payment-badge {
    background: rgba(0, 210, 133, 0.1);
    border: 1px solid rgba(0, 210, 133, 0.3);
    color: var(--secure-green);
    font-size: 0.65rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 30px;
    letter-spacing: 0.5px;
}

/* QR Code Section */
.qr-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.qr-instructions {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
    margin-bottom: 25px;
    max-width: 85%;
}

.qr-code-wrapper {
    position: relative;
    width: 256px;
    height: 256px;
    background: #ffffff;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.6), 0 0 15px rgba(255,255,255,0.05);
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.qr-code-img {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 6px;
}

/* Scanning red laser line animation */
.laser-scanner {
    position: absolute;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, transparent, #ff0844 20%, #ff0844 80%, transparent);
    box-shadow: 0 0 12px #ff0844, 0 0 4px #ff0844;
    z-index: 10;
    animation: scanningLaser 2.5s ease-in-out infinite;
}

@keyframes scanningLaser {
    0% { top: 6%; }
    50% { top: 92%; }
    100% { top: 6%; }
}

/* Error fallback styling if offline */
.qr-fallback {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 15px;
    color: #12121f;
    padding: 20px;
}

.qr-fallback i {
    font-size: 4rem;
    color: #ff0844;
}

.qr-fallback span {
    font-size: 0.8rem;
    font-weight: 600;
}

/* Pulse Waiting Loader */
.payment-spinner-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 25px;
}

.pulse-loader {
    width: 10px;
    height: 10px;
    background-color: var(--secure-green);
    border-radius: 50%;
    position: relative;
}

.pulse-loader::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background-color: var(--secure-green);
    border-radius: 50%;
    animation: sbpPulse 1.8s infinite ease-out;
}

@keyframes sbpPulse {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 0.8; }
    100% { transform: translate(-50%, -50%) scale(3.5); opacity: 0; }
}

.waiting-text {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* Secure certifications footer */
.checkout-footer {
    background: rgba(0, 0, 0, 0.25);
    border-top: 1px solid var(--border-color);
    padding: 20px 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.bank-logos {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    opacity: 0.5;
}

.logo-item {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 5px;
}

.logo-item i {
    font-size: 0.95rem;
}

.help-info {
    text-align: center;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.35);
    line-height: 1.4;
    max-width: 90%;
}

/* Return home link */
.back-link-wrapper {
    text-align: center;
}

.back-to-site {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s ease;
}

.back-to-site:hover {
    color: #fff;
}

/* ==========================================================================
   RESPONSIVE DESIGN (SMALL DEVICS)
   ========================================================================== */
@media (max-width: 480px) {
    .checkout-header {
        padding: 12px 15px;
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    
    .timer-box {
        text-align: center;
    }

    .order-panel {
        padding: 15px;
        flex-direction: column;
        gap: 15px;
        text-align: center;
        align-items: center;
    }
    
    .merchant-info {
        flex-direction: column;
        text-align: center;
    }
    
    .order-amount-wrapper {
        text-align: center;
    }
    
    .payment-method-container {
        padding: 15px;
    }
    
    .qr-code-wrapper {
        width: 200px;
        height: 200px;
        padding: 8px;
    }
}
