/**
 * Razorpay Pro Payment Gateway - Modal Styles
 */

/* Modal Container */
#rzpProModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: none;
}

/* Overlay */
.rzp-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
    animation: rzpFadeIn 0.3s ease-out;
}

/* Modal Box */
.rzp-modal-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #ffffff;
    border-radius: 20px;
    width: 90%;
    max-width: 440px;
    padding: 0;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: rzpSlideIn 0.3s ease-out;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    z-index: 1000000;
}

/* Close Button */
.rzp-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #f5f5f5;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    line-height: 1;
    color: #666;
    transition: all 0.2s ease;
    z-index: 10;
    padding: 0;
}

.rzp-close-btn:hover {
    background: #e0e0e0;
    color: #333;
    transform: rotate(90deg);
}

/* Modal Content */
.rzp-modal-content {
    padding: 50px 40px 40px 40px;
}

/* Modal Title */
.rzp-modal-title {
    text-align: center;
    margin: 0 0 30px 0;
    font-size: 24px;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
}

/* Form Groups */
.rzp-form-group {
    margin-bottom: 20px;
}

.rzp-form-group:last-of-type {
    margin-bottom: 30px;
}

/* Form Inputs */
.rzp-form-input {
    width: 100%;
    padding: 18px 20px;
    border: 2px solid #f0f0f0;
    border-radius: 12px;
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
    background: #fafafa;
    font-family: inherit;
}

.rzp-form-input:focus {
    border-color: #FF4046;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(255, 64, 70, 0.1);
}

.rzp-form-input::placeholder {
    color: #999;
}

/* Error Messages */
.rzp-form-error {
    color: #FF4046;
    font-size: 14px;
    margin-top: 5px;
    display: none;
    font-weight: 500;
}

/* Pay Button */
.rzp-pay-button,
#rzpPayButton {
    width: 100%;
    padding: 18px;
    background: #FF4046;
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(255, 64, 70, 0.3);
    font-family: inherit;
}

.rzp-pay-button:hover:not(:disabled),
#rzpPayButton:hover:not(:disabled) {
    background: #e6393f;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(255, 64, 70, 0.4);
}

.rzp-pay-button:active:not(:disabled),
#rzpPayButton:active:not(:disabled) {
    transform: translateY(0);
}

.rzp-pay-button:disabled,
#rzpPayButton:disabled {
    cursor: not-allowed;
    opacity: 0.6;
    transform: none !important;
}

/* Animations */
@keyframes rzpFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes rzpSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
    .rzp-modal-container {
        width: 95%;
        max-width: none;
        margin: 20px auto;
    }
    
    .rzp-modal-content {
        padding: 40px 30px 30px 30px;
    }
    
    .rzp-modal-title {
        font-size: 20px;
        margin-bottom: 25px;
    }
    
    .rzp-form-input {
        padding: 16px 18px;
        font-size: 16px;
    }
    
    .rzp-pay-button,
    #rzpPayButton {
        padding: 16px;
        font-size: 16px;
    }
    
    .rzp-close-btn {
        top: 15px;
        right: 15px;
        width: 28px;
        height: 28px;
        font-size: 20px;
    }
}

/* Loading State */
.rzp-pay-button.loading,
#rzpPayButton.loading {
    position: relative;
    color: transparent;
}

.rzp-pay-button.loading::after,
#rzpPayButton.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: rzpSpin 0.8s linear infinite;
}

@keyframes rzpSpin {
    to {
        transform: rotate(360deg);
    }
}

/* Accessibility */
.rzp-form-input:focus-visible,
.rzp-pay-button:focus-visible,
#rzpPayButton:focus-visible,
.rzp-close-btn:focus-visible {
    outline: 2px solid #FF4046;
    outline-offset: 2px;
}

/* Print - Hide modal when printing */
@media print {
    #rzpProModal {
        display: none !important;
    }
}
