/* EDD Stripe PromptPay Styles */

/* Payment form styles */
#edd-stripe-promptpay-form {
    margin: 20px 0;
}

.edd-stripe-promptpay-info {
    background: #e7f3ff;
    border-left: 4px solid #0073aa;
    padding: 15px;
    margin: 15px 0;
    border-radius: 3px;
}

.edd-stripe-promptpay-info p {
    margin: 0;
    color: #0073aa;
}

/* QR Code container */
#edd-stripe-promptpay-qr-container {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
}

.edd-stripe-promptpay-qr-wrapper h4 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 18px;
}

#edd-stripe-promptpay-qr-code {
    margin: 20px 0;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed #ddd;
    border-radius: 8px;
    background: #f9f9f9;
}

.qr-placeholder {
    text-align: center;
    color: #666;
}

.qr-placeholder p {
    margin: 5px 0;
}

.qr-placeholder small {
    font-size: 12px;
    color: #999;
}

/* Instructions */
.edd-stripe-promptpay-instructions {
    text-align: left;
    background: #f0f8ff;
    padding: 15px;
    border-radius: 5px;
    margin: 20px 0;
    border-left: 4px solid #0073aa;
}

.edd-stripe-promptpay-instructions {
    line-height: 1.6;
    color: #333;
}

/* Loading indicator */
.edd-stripe-promptpay-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
    color: #666;
}

.edd-stripe-promptpay-loading .spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success state */
.edd-stripe-promptpay-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 20px;
    border-radius: 5px;
    text-align: center;
}

.edd-stripe-promptpay-success h4 {
    color: #155724;
    margin: 0 0 10px 0;
    font-size: 18px;
}

/* Error state */
.edd-stripe-promptpay-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 20px;
    border-radius: 5px;
    text-align: center;
}

.edd-stripe-promptpay-error h4 {
    color: #721c24;
    margin: 0 0 10px 0;
    font-size: 18px;
}

.edd-stripe-promptpay-error button {
    background: #dc3545;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
}

.edd-stripe-promptpay-error button:hover {
    background: #c82333;
}

/* Timeout state */
.edd-stripe-promptpay-timeout {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 20px;
    border-radius: 5px;
    text-align: center;
}

.edd-stripe-promptpay-timeout h4 {
    color: #856404;
    margin: 0 0 10px 0;
    font-size: 18px;
}

.edd-stripe-promptpay-timeout button {
    background: #ffc107;
    color: #212529;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
}

.edd-stripe-promptpay-timeout button:hover {
    background: #e0a800;
}

/* Responsive styles */
@media (max-width: 768px) {
    #edd-stripe-promptpay-qr-container {
        padding: 15px;
        margin: 15px 0;
    }
    
    .edd-stripe-promptpay-qr-wrapper h4 {
        font-size: 16px;
    }
    
    #edd-stripe-promptpay-qr-code {
        min-height: 150px;
    }
    
    .edd-stripe-promptpay-instructions {
        padding: 10px;
        font-size: 14px;
    }
}

/* Admin styles */
.edd-admin-box .edd-stripe-promptpay-info {
    background: #f0f8ff;
    border-left: 4px solid #0073aa;
    padding: 15px;
    margin: 10px 0;
}

/* Gateway selection styles */
#edd-gateway-option-stripe_promptpay + label:before {
    content: "🇹🇭 ";
    margin-right: 5px;
}

/* Hide credit card fields when PromptPay is selected */
body.edd-gateway-stripe_promptpay #edd-card-number-wrap,
body.edd-gateway-stripe_promptpay #edd-card-cvc-wrap,
body.edd-gateway-stripe_promptpay #edd-card-exp-wrap,
body.edd-gateway-stripe_promptpay #edd-card-name-wrap {
    display: none !important;
}

#edd-stripe-promptpay-form .promptpay-logo {
	width: 100px;
	vertical-align: middle;
}

#edd_checkout_user_info  legend {
	display: none;
}