/* Custom premium styles, variables and theme support */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    
    /* Default Light Theme colors (off-white mockup style) */
    --bg-color: #f5f5f5;
    --text-primary: #1e293b;
    --text-secondary: #334155;
    --text-muted: #475569;
    --text-dim: #64748b;
    
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(0, 0, 0, 0.08);
    --glass-hover-bg: rgba(255, 255, 255, 0.95);
    --glass-hover-border: rgba(99, 102, 241, 0.35);
    
    --subtle-bg: rgba(0, 0, 0, 0.02);
    --input-bg: #ffffff;
    --input-border: rgba(0, 0, 0, 0.12);
    
    --text-white-override: #0f172a;
    --border-subtle: rgba(0, 0, 0, 0.06);
    --scrollbar-track: #f1f5f9;
    --scrollbar-thumb: rgba(0, 0, 0, 0.15);
}

html.dark {
    /* Dark Theme colors (original theme) */
    --bg-color: #0b0f19;
    --text-primary: #f3f4f6;
    --text-secondary: #e5e7eb;
    --text-muted: #d1d5db;
    --text-dim: #9ca3af;
    
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-hover-bg: rgba(255, 255, 255, 0.06);
    --glass-hover-border: rgba(99, 102, 241, 0.4);
    
    --subtle-bg: rgba(255, 255, 255, 0.05);
    --input-bg: rgba(0, 0, 0, 0.3);
    --input-border: rgba(255, 255, 255, 0.1);
    
    --text-white-override: #ffffff;
    --border-subtle: rgba(255, 255, 255, 0.05);
    --scrollbar-track: #0b0f19;
    --scrollbar-thumb: rgba(255, 255, 255, 0.1);
}

/* Reset and base document overrides */
body {
    font-family: var(--font-body);
    background-color: var(--bg-color) !important;
    color: var(--text-primary) !important;
    overflow-x: hidden;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
}

/* Overriding Tailwind background classes */
.bg-darkBg {
    background-color: var(--bg-color) !important;
}

.bg-gradient-glow {
    background-image: radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.04) 0%, transparent 60%) !important;
}

/* Glassmorphism styling */
.glass-card {
    background: var(--glass-bg) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid var(--glass-border) !important;
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.02) !important;
}

html.dark .glass-card {
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.4) !important;
}

.glass-card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card-hover:hover {
    background: var(--glass-hover-bg) !important;
    border-color: var(--glass-hover-border) !important;
    box-shadow: 0 12px 30px -10px rgba(99, 102, 241, 0.15) !important;
    transform: translateY(-2px);
}

/* Smaller border-radii globally (as requested) */
.rounded-3xl { border-radius: 12px !important; }
.rounded-2xl { border-radius: 10px !important; }
.rounded-xl { border-radius: 8px !important; }
.rounded-lg { border-radius: 6px !important; }
.rounded-md { border-radius: 4px !important; }

/* Dynamic container width (80% on large screens) */
@media (min-width: 1024px) {
    .max-w-7xl {
        max-width: 80% !important;
        width: 80% !important;
    }
}

/* Glowing text shadows */
.text-glow-indigo {
    text-shadow: 0 0 10px rgba(99, 102, 241, 0.3);
}

.text-glow-emerald {
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
}

/* Overriding Tailwind Text colors safely */
.text-white:not(.fa-solid):not(.fa-regular):not(.fa-brands):not(.fa):not(button):not(.btn-neon):not(.active-pill):not([class*="bg-indigo"]):not([class*="from-indigo"]):not([class*="bg-emerald"]):not([class*="bg-red"]) {
    color: var(--text-white-override) !important;
}
.btn-neon, .btn-neon * {
    color: #ffffff !important;
}
.text-gray-100 { color: var(--text-primary) !important; }
.text-gray-200 { color: var(--text-secondary) !important; }
.text-gray-300 { color: var(--text-muted) !important; }
.text-gray-400 { color: var(--text-dim) !important; }
.text-gray-500 { color: var(--text-dim) !important; }

/* Overriding background and borders */
.bg-black\/20 { background-color: var(--subtle-bg) !important; }
.bg-black\/30 { background-color: var(--input-bg) !important; }
.bg-white\/5 { background-color: var(--subtle-bg) !important; }
.border-white\/5 { border-color: var(--border-subtle) !important; }
.border-white\/10 { border-color: var(--border-subtle) !important; }

/* Input box overrides for visibility */
input, select, textarea {
    background-color: var(--input-bg) !important;
    border-color: var(--input-border) !important;
    color: var(--text-primary) !important;
}

input:focus, select:focus, textarea:focus {
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1) !important;
}

input::placeholder, textarea::placeholder {
    color: var(--text-dim) !important;
    opacity: 0.7;
}

/* Custom Scrollbar theme overrides */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
}

::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.5);
}

/* Calendar Day styling overrides */
.calendar-day-active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(16, 185, 129, 0.15));
    border: 1px solid rgba(99, 102, 241, 0.4);
}

/* Neon buttons */
.btn-neon {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-neon::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: all 0.6s ease;
}

.btn-neon:hover::after {
    left: 100%;
}

/* Desktop Font Scaling and Pop-up Scrollbar fixes */
@media (min-width: 1024px) {
    .text-\[9px\] { font-size: 11px !important; }
    .text-\[10px\] { font-size: 12px !important; }
    .text-\[11px\] { font-size: 13px !important; }
    .text-xs { font-size: 13px !important; }
    .text-sm { font-size: 15px !important; }
    
    input, select, textarea {
        font-size: 13px !important;
    }
}
