/* Custom Styling for WaleedAbdo Platform */

/* 1. Global Font and Icon Fixes */
body, html, p, h1, h2, h3, h4, h5, h6, a, span:not(.fa):not([class*="fa-"]), button, input, select, textarea {
    font-family: 'Cairo', sans-serif !important;
}

.fa, .fas, .far, .fal, .fab, .fa-solid, .fa-regular, .fa-brands, [class*="fa-"] {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands", "FontAwesome" !important;
}

/* 2. Custom Card Base */
.custom-card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 1.25rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

/* Dark Mode Overrides */
html.dark .custom-card, .dark .custom-card {
    background-color: #1e293b !important;
    border-color: #334155 !important;
    color: #f8fafc !important;
}

html.dark body, .dark body {
    background-color: #0f172a !important;
    color: #f8fafc !important;
}

html.dark .custom-card h1, html.dark .custom-card h2, html.dark .custom-card h3, 
html.dark .custom-card h4, html.dark .custom-card h5, html.dark .custom-card h6 {
    color: #ffffff !important;
}

html.dark .custom-card p, html.dark .custom-card span {
    color: #cbd5e1;
}

html.dark input, html.dark select, html.dark textarea {
    background-color: #0f172a !important;
    border-color: #334155 !important;
    color: #ffffff !important;
}

/* 3. Preloader Styling */
#preloader {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100vh !important;
    background: radial-gradient(circle at center, #0f1220 0%, #06070a 100%) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 999999 !important;
    opacity: 1 !important;
    visibility: visible !important;
    transition: opacity 0.6s cubic-bezier(0.25, 1, 0.5, 1), visibility 0.6s !important;
}

#preloader.isdone {
    opacity: 0 !important;
    visibility: hidden !important;
}

.pre-inner {
    text-align: center !important;
}

.pre-logo {
    height: 75px !important;
    width: auto !important;
    object-fit: contain !important;
    margin: 0 auto 30px !important;
    filter: drop-shadow(0 0 20px rgba(0, 199, 217, 0.3)) !important;
    animation: preLogoPulse 2.2s ease-in-out infinite !important;
}

.pre-spinner-container {
    position: relative !important;
    width: 60px !important;
    height: 60px !important;
    margin: 0 auto 20px !important;
}

.pre-ring-glow {
    position: absolute !important;
    width: 100% !important;
    height: 100% !important;
    border-radius: 50% !important;
    border: 3px solid rgba(255, 255, 255, 0.02) !important;
    border-top-color: #00c7d9 !important;
    border-right-color: rgba(0, 199, 217, 0.2) !important;
    animation: preSpinGlow 0.9s cubic-bezier(0.5, 0.1, 0.5, 0.9) infinite !important;
    box-shadow: 0 0 15px rgba(0, 199, 217, 0.15) !important;
    top: 0 !important;
    left: 0 !important;
}

.pre-ring-inner {
    position: absolute !important;
    width: 70% !important;
    height: 70% !important;
    top: 15% !important;
    left: 15% !important;
    border-radius: 50% !important;
    border: 2px solid rgba(255, 255, 255, 0.01) !important;
    border-bottom-color: #0088cc !important;
    animation: preSpinGlow 1.4s linear infinite reverse !important;
}

.pre-text {
    color: #6c7a9c !important;
    font-family: 'Tajawal', sans-serif !important;
    font-size: 13.5px !important;
    font-weight: 500 !important;
    margin-top: 15px !important;
    text-shadow: 0 2px 4px rgba(0,0,0,0.4) !important;
    animation: preTextFade 1.6s ease-in-out infinite !important;
}

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

@keyframes preLogoPulse {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 15px rgba(0, 199, 217, 0.3));
    }
    50% {
        transform: scale(1.04);
        filter: drop-shadow(0 0 30px rgba(0, 199, 217, 0.6));
    }
}

@keyframes preTextFade {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; color: #fff !important; }
}
