/* Redpay Payment Gateway Frontend Styles */

/* Payment form container */
#redpay-payment-form {
    background: #f9f9f9;
    padding: 20px;
    border: 1px solid #e1e1e1;
    border-radius: 5px;
    margin: 15px 0;
}

/* Redpay notice */
.redpay-notice {
    font-size: 14px;
    color: #333;
    margin-bottom: 15px;
    padding: 10px;
    background: #e7f4ff;
    border-left: 3px solid #007cba;
    border-radius: 3px;
}

/* Security info */
.redpay-security-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #666;
    margin-top: 10px;
}

.redpay-security-info .dashicons {
    color: #46b450;
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Loading overlay */
.redpay-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    color: white;
}

.redpay-loading-overlay p {
    margin-top: 20px;
    font-size: 16px;
    font-weight: 500;
}

/* Spinner animation */
.redpay-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #007cba;
    animation: redpay-spin 1s ease-in-out infinite;
}

@keyframes redpay-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Processing state */
.redpay-processing {
    pointer-events: none;
    opacity: 0.6;
}

/* Error styling */
.wc-redpay-payment-gateway-error {
    background: #fff;
    border-left: 4px solid #dc3232;
    padding: 10px 15px;
    margin: 10px 0;
    border-radius: 0 4px 4px 0;
}

.wc-redpay-payment-gateway-error p {
    margin: 0;
    color: #dc3232;
    font-weight: 500;
}

/* Success styling */
.wc-redpay-payment-gateway-success {
    background: #fff;
    border-left: 4px solid #46b450;
    padding: 10px 15px;
    margin: 10px 0;
    border-radius: 0 4px 4px 0;
}

.wc-redpay-payment-gateway-success p {
    margin: 0;
    color: #46b450;
    font-weight: 500;
}

/* Thank you page styling */
.redpay-thank-you {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    margin: 20px 0;
}

.redpay-thank-you h3 {
    color: #46b450;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 20px;
}

.redpay-thank-you p {
    margin-bottom: 10px;
    color: #333;
}

/* Payment method title and description */
.payment_method_redpay_payment_gateway label {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.payment_method_redpay_payment_gateway img {
    max-height: 28px;
    max-width: 100px;
    height: auto;
    width: auto;
    vertical-align: middle;
    object-fit: contain;
}

/* Redpay branding */
.redpay-branding {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e1e1e1;
    font-size: 12px;
    color: #666;
}

.redpay-branding svg {
    width: 16px;
    height: 16px;
    fill: #007cba;
}

/* Button enhancements */
.woocommerce-checkout .place-order {
    position: relative;
}

.woocommerce-checkout .place-order:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    #redpay-payment-form {
        padding: 15px;
        margin: 10px 0;
    }
    
    .redpay-notice {
        font-size: 13px;
        padding: 8px;
    }
    
    .redpay-loading-overlay p {
        font-size: 14px;
        text-align: center;
        padding: 0 20px;
    }
    
    .redpay-spinner {
        width: 40px;
        height: 40px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    #redpay-payment-form {
        border-color: #000;
    }
    
    .redpay-notice {
        background: #fff;
        border-color: #000;
        color: #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .redpay-spinner {
        animation: none;
    }
    
    @keyframes redpay-spin {
        to {
            transform: none;
        }
    }
}

/* Focus styles for accessibility */
.payment_method_redpay_payment_gateway input[type="radio"]:focus + label {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .redpay-loading-overlay {
        display: none;
    }
}