/* Evobrain Pay Custom Styles */

/* Logo and background enhancements */
.logo-img {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    transition: all 0.3s ease;
}

.logo-img:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

/* Background image fallback */
body {
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Ensure background works on all devices */
@media (max-width: 768px) {
    body {
        background-attachment: scroll;
    }
}

/* Additional utility classes */
.font-monospace {
    font-family: 'Courier New', Courier, monospace;
}

.bg-opacity-10 {
    background-color: rgba(var(--bs-primary-rgb), 0.1) !important;
}

/* Loading animations */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.loading-pulse {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Custom button styles */
.btn {
    border-radius: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn:hover {
    transform: translateY(-1px);
}

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

/* Form enhancements */
.form-control:focus {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(228, 44, 43, 0.15);
}

/* Card hover effects */
.pay-card {
    transition: all 0.3s ease;
}

.pay-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.3);
}

/* Success/Error states */
.is-valid {
    border-color: var(--evobrain-success) !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2310b981' d='m2.3 6.73.94-.94 1.88-1.88'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.is-invalid {
    border-color: var(--evobrain-danger) !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23ef4444'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath d='m5.8 4.6 1.4 1.4 1.4-1.4'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

/* Alert enhancements */
.alert {
    border-left: 4px solid;
    border-radius: 12px;
}

.alert-success {
    border-left-color: var(--evobrain-success);
}

.alert-danger {
    border-left-color: var(--evobrain-danger);
}

.alert-warning {
    border-left-color: var(--evobrain-warning);
}

.alert-info {
    border-left-color: var(--evobrain-primary);
}

/* Payment method cards */
.payment-method {
    transition: all 0.3s ease;
    cursor: pointer;
}

.payment-method:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.payment-method.active {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(228, 44, 43, 0.2);
}

/* Summary styling */
.payment-summary {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid var(--evobrain-border);
}

.payment-item {
    transition: all 0.2s ease;
}

.payment-item:hover {
    background: rgba(228, 44, 43, 0.05);
    border-radius: 8px;
    padding: 8px 12px;
    margin: 0 -12px;
}

/* Icon animations */
.fa-spin {
    animation: fa-spin 2s infinite linear;
}

@keyframes fa-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive improvements */
@media (max-width: 576px) {
    .pay-header {
        padding: 20px 15px;
    }
    
    .pay-body {
        padding: 25px 15px;
    }
    
    .btn-lg {
        padding: 12px 20px;
        font-size: 1rem;
    }
    
    .payment-method {
        padding: 15px;
    }
    
    .payment-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --evobrain-light: #1f2937;
        --evobrain-border: #374151;
    }
    
    .pay-card {
        background: #1f2937;
        color: #f9fafb;
    }
    
    .form-control {
        background: #374151;
        border-color: #4b5563;
        color: #f9fafb;
    }
    
    .form-control:focus {
        background: #4b5563;
        border-color: var(--evobrain-primary);
        color: #f9fafb;
    }
    
    .payment-summary {
        background: linear-gradient(135deg, #374151 0%, #4b5563 100%);
        border-color: #4b5563;
    }
}

/* Print styles */
@media print {
    body {
        background: white !important;
    }
    
    .pay-container {
        min-height: auto !important;
        padding: 0 !important;
    }
    
    .pay-card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
    
    .btn {
        display: none !important;
    }
}

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

/* Focus indicators */
.btn:focus,
.form-control:focus,
.payment-method:focus {
    outline: 2px solid #e42c2b;
    outline-offset: 2px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .pay-card {
        border: 2px solid #000;
    }
    
    .btn-primary {
        background: #000;
        border-color: #000;
    }
    
    .btn-primary:hover {
        background: #333;
        border-color: #333;
    }
}
