/* KwikUPI Modal Styles - Polished v1.3.9 */
#kwikupi-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    opacity: 0;
    transition: opacity 0.4s ease;
}

#kwikupi-modal-overlay.active {
    opacity: 1;
}

#kwikupi-modal {
    background: #ffffff;
    width: 90%;
    max-width: 380px; /* Slimmer */
    border-radius: 28px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    transform: translateY(30px) scale(0.95);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
    position: relative;
}

#kwikupi-modal-overlay.active #kwikupi-modal {
    transform: translateY(0) scale(1);
}

.kwikupi-header {
    background: #4f46e5;
    padding: 20px 24px; /* Matches JS compact header */
    text-align: center;
    color: #ffffff;
}

.kwikupi-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
    color: #ffffff !important;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.kwikupi-header p {
    margin: 4px 0 0;
    font-size: 12px;
    opacity: 0.85;
    font-weight: 500;
}

.kwikupi-body {
    padding: 24px 24px 20px; /* Matches JS compact body */
    text-align: center;
    position: relative;
    min-height: 350px;
}

.kwikupi-amount-label {
    font-size: 10px;
    color: #94a3b8;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 2px;
}

.kwikupi-amount {
    font-size: 38px;
    font-weight: 900;
    color: #1e293b;
    margin-bottom: 20px;
    letter-spacing: -0.04em;
    line-height: 1;
}

.kwikupi-qr-container {
    background: #f8fafc;
    padding: 20px;
    border-radius: 24px;
    display: inline-block;
    border: 1px solid #f1f5f9;
    margin-bottom: 20px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
    width: 100%;
}

.kwikupi-qr-container canvas, 
.kwikupi-qr-container img {
    max-width: 180px;
    height: auto;
    display: inline-block;
    margin: 0 auto;
}

.kwikupi-scan-text {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 12px;
}

.kwikupi-upi-icons {
    display: flex;
    justify-content: center;
    gap: 16px;
    align-items: center;
}

.kwikupi-upi-icons img {
    height: 16px;
    width: auto;
    opacity: 1;
    transition: all 0.3s ease;
}

/* Success State Overlay */
.kwikupi-success-state {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.kwikupi-success-state.active {
    opacity: 1;
    visibility: visible;
}

.kwikupi-success-icon {
    width: 70px;
    height: 70px;
    background: #10b981;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin-bottom: 16px;
    box-shadow: 0 10px 25px -5px rgba(16, 185, 129, 0.4);
    transform: scale(0.6);
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.kwikupi-success-state.active .kwikupi-success-icon {
    transform: scale(1);
}

.kwikupi-success-text {
    font-size: 20px;
    font-weight: 800;
    color: #064e3b;
    letter-spacing: -0.01em;
}

.kwikupi-footer {
    padding: 16px 24px;
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
    text-align: center;
}

.kwikupi-btn-intent {
    display: flex;
    background: #4f46e5;
    color: white !important;
    padding: 14px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
}

.kwikupi-btn-intent:hover {
    background: #4338ca;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.3);
}

.kwikupi-close {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 12px;
    cursor: pointer;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: color 0.2s ease;
}

.kwikupi-close:hover {
    color: #ef4444;
}

@media (max-width: 480px) {
    #kwikupi-modal {
        width: 92%;
        border-radius: 24px;
        max-width: none;
    }
}
