/* QPay QR Modal */

#yqpay-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

#yqpay-modal-box {
    background: #ffffff;
    border-radius: 16px;
    padding: 32px 28px;
    text-align: center;
    width: 340px;
    max-width: 94vw;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: yqpay-pop 0.2s ease;
}

@keyframes yqpay-pop {
    from { transform: scale(0.9); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}

#yqpay-modal-header h2 {
    margin: 8px 0 4px;
    font-size: 20px;
    font-weight: 700;
    color: #111827;
}

#yqpay-modal-header p {
    margin: 0 0 12px;
    font-size: 13px;
    color: #6b7280;
}

.yqpay-amount {
    font-size: 26px;
    font-weight: 800;
    color: #1a56db;
    margin: 0 0 16px;
}

#yqpay-qr-wrap {
    background: #f9fafb;
    border-radius: 12px;
    padding: 16px;
    display: inline-block;
    margin-bottom: 16px;
}

#yqpay-qr-img {
    display: block;
    width: 220px;
    height: 220px;
    object-fit: contain;
    transition: opacity 0.4s;
}

#yqpay-status-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
    min-height: 24px;
}

#yqpay-status-text {
    font-size: 14px;
    color: #6b7280;
}

/* Spinner */
#yqpay-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #d1d5db;
    border-top-color: #1a56db;
    border-radius: 50%;
    animation: yqpay-spin 0.7s linear infinite;
    flex-shrink: 0;
}

@keyframes yqpay-spin {
    to { transform: rotate(360deg); }
}

#yqpay-close-btn {
    background: #f3f4f6;
    color: #374151;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
}

#yqpay-close-btn:hover {
    background: #e5e7eb;
}

/* Success state */
#yqpay-modal-box.yqpay-paid #yqpay-modal-box {
    border: 2px solid #22c55e;
}

/* QPay trigger button in POS */
#yqpay-trigger-btn:hover {
    background: #1e40af !important;
}
