/**
 * MahaHunt Social - Premium CSS Styling System
 */

/* 1. Root Variable Palette */
:root {
    --bg-app: #f8fafc;
    --bg-sidebar: #ffffff;
    --bg-card: #ffffff;
    --border-color: #e2e8f0;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    
    --primary-color: #6366f1; /* Indigo */
    --primary-hover: #4f46e5;
    --secondary-color: #3b82f6; /* Blue */
    --accent-color: #10b981; /* Emerald Success */
    --warning-color: #f59e0b; /* Amber */
    --danger-color: #ef4444; /* Rose Fail */
    
    --card-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
    --card-shadow-hover: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.08);
    --sidebar-width: 280px;
    --transition-smooth: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Mode Variable Overrides */
[data-bs-theme="dark"] {
    --bg-app: #0f172a; /* Slate 900 */
    --bg-sidebar: #1e293b; /* Slate 800 */
    --bg-card: #1e293b;
    --border-color: #334155; /* Slate 700 */
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1; /* Slate 300 */
    --text-muted: #64748b; /* Slate 500 */
    
    --card-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.3);
    --card-shadow-hover: 0 10px 20px -3px rgb(0 0 0 / 0.5), 0 4px 6px -4px rgb(0 0 0 / 0.5);
}

/* 2. Global Reset and Typo */
body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-app);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    transition: var(--transition-smooth);
}

/* 3. Grid Structure */
.app-container {
    display: flex;
    min-height: 100vh;
    position: relative;
}

.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    transition: var(--transition-smooth);
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    background-color: var(--bg-app);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
}

/* Mobile Sidebar Toggle Support */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.show {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0 !important;
    }
}

/* 4. Navigation UI elements */
.logo-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition-smooth);
}

.nav-item:hover {
    background-color: rgba(99, 102, 241, 0.08);
    color: var(--primary-color);
}

.nav-item.active {
    background-color: var(--primary-color);
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

.nav-item i {
    font-size: 1.15rem;
}

/* Top Navbar Style */
.navbar {
    background-color: var(--bg-sidebar);
    border-bottom: 1px solid var(--border-color) !important;
    transition: var(--transition-smooth);
}

/* Utility buttons */
.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    background-color: var(--bg-card);
    color: var(--text-secondary);
    transition: var(--transition-smooth);
}

.btn-icon:hover {
    background-color: rgba(99, 102, 241, 0.08);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

/* 5. Custom Premium Cards */
.card-premium {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    transition: var(--transition-smooth);
    overflow: hidden;
}

.card-premium:hover {
    box-shadow: var(--card-shadow-hover);
}

.hover-lift:hover {
    transform: translateY(-4px);
}

/* Statistics gradients */
.stat-card-gradient {
    position: relative;
    overflow: hidden;
}

.stat-card-gradient::after {
    content: '';
    position: absolute;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, rgba(255, 255, 255, 0) 70%);
    top: -50px;
    right: -50px;
}

/* Text utility size overrides */
.text-xs { font-size: 0.8rem; }
.text-xxs { font-size: 0.72rem; }
.text-sm { font-size: 0.875rem; }

/* 6. Post Composer Layouts */
.platform-selector-pill {
    cursor: pointer;
    border: 2px solid var(--border-color);
    padding: 10px 16px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    transition: var(--transition-smooth);
}

.platform-selector-pill:hover {
    border-color: var(--primary-color);
    background-color: rgba(99, 102, 241, 0.05);
}

.platform-checkbox:checked + .platform-selector-pill {
    border-color: var(--primary-color);
    background-color: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
}

/* 7. Social Live Previews replicas */
.preview-pane-sticky {
    position: sticky;
    top: 24px;
}

.social-mock-card {
    background-color: #ffffff;
    color: #0f172a;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    max-width: 420px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.mock-platform-header {
    border-bottom: 1px solid #f1f5f9;
}

/* Meta Facebook Skin Mockup */
.skin-facebook .mock-header-avatar {
    width: 40px;
    height: 40px;
    background-color: #1877f2;
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.skin-facebook .mock-action-bar {
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}

/* Meta Instagram Skin Mockup */
.skin-instagram {
    border-radius: 12px;
}

.skin-instagram .mock-header-avatar {
    width: 32px;
    height: 32px;
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
    border-radius: 50%;
    padding: 2px;
}

.skin-instagram .mock-header-avatar img {
    border: 2px solid white;
    border-radius: 50%;
}

.skin-instagram .mock-image-container {
    width: 100%;
    aspect-ratio: 1/1;
    background-color: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    border-top: 1px solid #f1f5f9;
    border-bottom: 1px solid #f1f5f9;
    overflow: hidden;
}

/* LinkedIn Skin Mockup */
.skin-linkedin .mock-header-avatar {
    width: 44px;
    height: 44px;
    background-color: #0077b5;
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Twitter Skin Mockup */
.skin-twitter {
    background-color: #000000 !important;
    color: #ffffff !important;
    border-color: #2f3336 !important;
}

.skin-twitter .mock-header-avatar {
    width: 40px;
    height: 40px;
    background-color: #1d9bf0;
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.skin-twitter .mock-platform-header {
    border-bottom: none !important;
}

/* 8. Media drag-and-drop zone */
.upload-dropzone {
    border: 2px dashed var(--border-color);
    padding: 40px 20px;
    border-radius: 16px;
    cursor: pointer;
    background-color: rgba(99, 102, 241, 0.02);
    text-align: center;
    transition: var(--transition-smooth);
}

.upload-dropzone:hover {
    border-color: var(--primary-color);
    background-color: rgba(99, 102, 241, 0.05);
}

/* 9. Light-card utility */
.bg-light-card {
    background-color: rgba(0, 0, 0, 0.02);
}

[data-bs-theme="dark"] .bg-light-card {
    background-color: rgba(255, 255, 255, 0.03);
}

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

::-webkit-scrollbar-track {
    background: transparent;
}

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

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}
