/* responsive-fixes.css - Premium Mobile Enhancements for Explyra */

/* General Mobile Optimizations */
@media (max-width: 768px) {
    body {
        font-size: 14px;
        -webkit-tap-highlight-color: transparent;
    }

    /* Container Padding */
    #content-area {
        padding: 1rem !important;
        padding-bottom: 5rem !important;
        /* Extra space for floating buttons */
    }

    /* Card Stacking */
    .grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    .sm\:grid-cols-2,
    .md\:grid-cols-3,
    .lg\:grid-cols-4 {
        grid-template-columns: 1fr !important;
    }

    /* Table Responsiveness */
    .data-grid-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin-bottom: 1rem;
        border-radius: 12px;
        border: 1px solid rgba(0, 0, 0, 0.05);
    }

    .data-grid {
        min-width: 700px;
        /* Force scroll */
    }

    /* Admin Sidebar Fixes */
    #admin-sidebar {
        width: 280px !important;
        z-index: 999;
        box-shadow: 20px 0 50px rgba(0, 0, 0, 0.2);
        transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    }

    #admin-sidebar.sidebar-visible {
        transform: translateX(0) !important;
    }

    /* Employee Sidebar Fixes */
    #main-sidebar {
        position: fixed !important;
        left: 0;
        top: 0;
        height: 100vh;
        width: 280px !important;
        z-index: 999;
        transform: translateX(-100%);
        transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        display: flex !important;
        background: white !important;
    }

    .dark #main-sidebar {
        background: #000 !important;
    }

    #main-sidebar.mobile-visible {
        transform: translateX(0);
        box-shadow: 20px 0 50px rgba(0, 0, 0, 0.3);
    }

    /* Floating Action Button for Mobile */
    .mobile-fab {
        position: fixed;
        bottom: 2rem;
        right: 1.5rem;
        width: 3.5rem;
        height: 3.5rem;
        border-radius: 50%;
        background: #1546C0;
        color: white;
        display: flex;
        items-center: center;
        justify-content: center;
        box-shadow: 0 10px 25px rgba(21, 70, 192, 0.4);
        z-index: 40;
        transition: all 0.2s;
    }

    .mobile-fab:active {
        transform: scale(0.9) translateY(2px);
    }

    /* Stats Cards */
    .stat-card,
    .vercel-card {
        padding: 1.25rem !important;
        border-radius: 20px !important;
        margin-bottom: 0.5rem;
    }

    /* Chat UI Mobile Enhancements */
    #chat-main-container {
        height: calc(100svh - 64px) !important;
        overflow: hidden !important;
    }

    #chat-user-list {
        width: 100% !important;
        padding-bottom: 2rem;
    }

    #chat-main-area {
        position: fixed !important;
        inset: 0 !important;
        z-index: 100;
        background: white !important;
        transform: translateX(100%);
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        display: flex;
        flex-direction: column;
    }

    .dark #chat-main-area {
        background: #000 !important;
    }

    #chat-main-area.active {
        transform: translateX(0);
    }

    /* Chat Bubbles */
    .chat-bubble {
        max-width: 85% !important;
        border-radius: 18px !important;
        padding: 0.75rem 1rem !important;
        font-size: 14px !important;
    }

    /* Header Padding */
    header {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    /* Modal Content */
    .modal-content,
    [id*="modal-"][id$="-content"] {
        width: 100% !important;
        height: 100% !important;
        max-width: none !important;
        max-height: none !important;
        margin: 0 !important;
        border-radius: 0 !important;
    }

    /* Sub-nav horizontal scroll */
    #emp-view-tabs {
        display: flex;
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 0.5rem;
        padding-left: 1rem;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    #emp-view-tabs::-webkit-scrollbar {
        display: none;
    }
}

/* Sidebar Toggle Overlay */
#mobile-sidebar-overlay {
    transition: opacity 0.3s ease, visibility 0.3s;
}

#mobile-sidebar-overlay:not(.hidden) {
    display: block !important;
    opacity: 1 !important;
}

/* Premium Transitions */
.animate-fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}