/* 1. UPI Payment Box Container */
.rmp-payment-box {
    background: #ffffff;
    border: 2px solid #e5e5e5;
    border-radius: 12px;
    padding: 20px;
    margin-top: 15px;
}

.rmp-instructions {
    background: #f8f8f8;
    border-left: 4px solid #0a8754;
    padding: 12px;
    margin-bottom: 20px;
    line-height: 1.6;
}

.rmp-amount {
    background: #eefaf2;
    color: #0a8754;
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
}

/* Fluid outer container limited to max 300px */
#rmp-dynamic-qr {
    text-align: center;
    margin: 20px auto;
    width: 100%;
    max-width: 300px;
}

/* 2. Style the active QR code (Removes !important from display) */
#rmp-dynamic-qr img,
#rmp-dynamic-qr canvas {
    display: block;                     /* No !important here so the plugin can hide the duplicate */
    margin: auto !important;
    width: 100% !important;            /* Responsive fluid width */
    max-width: 300px !important;        /* Limit max size */
    height: auto !important;
    aspect-ratio: 1 / 1 !important;     /* Ensures it is always a perfect square */
    flex-shrink: 0 !important;          /* Solves the iOS/Safari collapsing layout bug */
    border: 2px solid #dddddd;
    border-radius: 10px;
    background: #ffffff;
    padding: 10px;
    box-sizing: border-box;
}

#rmp_upi_display {
    width: 100%;
    padding: 10px;
    font-weight: bold;
    text-align: center;
    border: 1px solid #cccccc;
    border-radius: 6px;
    box-sizing: border-box;
}

.rmp-payment-box .button {
    margin-top: 10px;
    width: 100%;
}

@media (max-width: 480px) {
    #rmp-dynamic-qr {
        max-width: 260px;
    }
    
    #rmp-dynamic-qr img,
    #rmp-dynamic-qr canvas {
        max-width: 260px !important;
    }

    .rmp-amount {
        font-size: 20px;
    }
}

