/**
 * PayX Payment Gateway Styles
 * Modern, responsive design for payment forms and processing pages
 */

/* Payment Form Styles */
#payx-payment-form {
    margin: 20px 0;
}

#payx-payment-form fieldset {
    border: none;
    padding: 0;
    margin: 0;
}

#payx-payment-form .form-row {
    margin-bottom: 15px;
}

#payx-payment-form .form-row label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

#payx-payment-form .form-row input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #fff;
}

#payx-payment-form .form-row input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

#payx-payment-form .form-row input.error {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

#payx-payment-form .form-row input.valid {
    border-color: #27ae60;
    box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.1);
}

/* Card Type Icons */
.payx-card-type-icons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.payx-card-type-icon {
    width: 40px;
    height: 25px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.3;
    transition: opacity 0.3s ease;
}

.payx-card-type-icon.active {
    opacity: 1;
}

.payx-card-type-icon.visa {
    background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iMjUiIHZpZXdCb3g9IjAgMCA0MCAyNSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjQwIiBoZWlnaHQ9IjI1IiByeD0iNCIgZmlsbD0iIzAwNTY5NiIvPgo8dGV4dCB4PSIyMCIgeT0iMTYiIGZvbnQtZmFtaWx5PSJBcmlhbCIgZm9udC1zaXplPSIxNCIgZm9udC13ZWlnaHQ9ImJvbGQiIGZpbGw9IndoaXRlIiB0ZXh0LWFuY2hvcj0ibWlkZGxlIj5WSVNBPC90ZXh0Pgo8L3N2Zz4K');
}

.payx-card-type-icon.mastercard {
    background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iMjUiIHZpZXdCb3g9IjAgMCA0MCAyNSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjQwIiBoZWlnaHQ9IjI1IiByeD0iNCIgZmlsbD0iI0VCMzE0MCIvPgo8Y2lyY2xlIGN4PSIxNSIgY3k9IjEyLjUiIHI9IjciIGZpbGw9IiNGRkY1RjUiLz4KPGNpcmNsZSBjeD0iMjUiIGN5PSIxMi41IiByPSI3IiBmaWxsPSIjRkZCNzAwIi8+Cjwvc3ZnPgo=');
}

.payx-card-type-icon.amex {
    background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iMjUiIHZpZXdCb3g9IjAgMCA0MCAyNSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjQwIiBoZWlnaHQ9IjI1IiByeD0iNCIgZmlsbD0iIzAwN0FBRCIvPgo8dGV4dCB4PSIyMCIgeT0iMTYiIGZvbnQtZmFtaWx5PSJBcmlhbCIgZm9udC1zaXplPSIxNCIgZm9udC13ZWlnaHQ9ImJvbGQiIGZpbGw9IndoaXRlIiB0ZXh0LWFuY2hvcj0ibWlkZGxlIj5BTUVYPC90ZXh0Pgo8L3N2Zz4K');
}

/* Processing Page Styles */
.payment-container {
    position: relative;
    overflow: hidden;
}

.payment-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    z-index: 1;
}

/* Animations */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.payment-container {
    animation: fadeInUp 0.6s ease-out;
}

.order-info {
    animation: slideIn 0.8s ease-out;
}

.processing-animation {
    animation: pulse 2s ease-in-out infinite;
}

/* Status Messages */
.status-message {
    font-weight: 500;
    transition: all 0.3s ease;
}

.status-message.updating {
    opacity: 0.7;
    transform: translateY(-5px);
}

/* Verification Form */
.verification-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    border-left: 4px solid #667eea;
    animation: slideIn 0.5s ease-out;
}

.verification-input {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 2px;
    text-align: center;
}

.verification-input:focus {
    transform: scale(1.02);
}

/* Buttons */
.submit-btn {
    position: relative;
    overflow: hidden;
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.submit-btn:hover::before {
    left: 100%;
}

.submit-btn:active {
    transform: translateY(0);
}

/* Progress Bar */
.progress-bar {
    position: relative;
    overflow: hidden;
}

.progress-fill {
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Tips Section */
.tips {
    position: relative;
    overflow: hidden;
}

.tips::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #2196f3, #1976d2);
}

.tips h3 {
    position: relative;
    z-index: 1;
}

.tips ul {
    position: relative;
    z-index: 1;
}

.tips li {
    position: relative;
    padding-left: 20px;
}

.tips li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #2196f3;
    font-weight: bold;
}

/* Success/Error Messages */
.success-message,
.error-message {
    animation: fadeInUp 0.5s ease-out;
}

.success-message {
    background: linear-gradient(135deg, #4caf50, #45a049);
    color: white;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
}

.error-message {
    background: linear-gradient(135deg, #f44336, #d32f2f);
    color: white;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
}

/* Notifications */
.payx-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 1000;
    animation: slideIn 0.3s ease-out;
}

.payx-notification-info {
    background: linear-gradient(135deg, #2196f3, #1976d2);
}

.payx-notification-success {
    background: linear-gradient(135deg, #4caf50, #45a049);
}

.payx-notification-error {
    background: linear-gradient(135deg, #f44336, #d32f2f);
}

.payx-notification-warning {
    background: linear-gradient(135deg, #ff9800, #f57c00);
}

/* Responsive Design */
@media (max-width: 768px) {
    .payment-container {
        margin: 10px;
        padding: 20px;
    }
    
    h1 {
        font-size: 24px;
    }
    
    .order-total {
        font-size: 20px;
    }
    
    .verification-input {
        font-size: 16px;
    }
    
    .tips ul {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .payment-container {
        padding: 15px;
    }
        
    h1 {
        font-size: 20px;
    }
    
    .order-total {
        font-size: 18px;
    }
    
    .spinner {
        width: 40px;
        height: 40px;
    }
}

/* Loading States */
.loading {
    pointer-events: none;
    opacity: 0.7;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .payment-container {
        border: 2px solid #000;
    }
    
    .form-row input {
        border: 2px solid #000;
    }
    
    .submit-btn {
        border: 2px solid #000;
    }
}

/* Print styles */
@media print {
    .payment-container {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .processing-animation,
    .tips,
    .verification-section {
        display: none;
    }
}
