/* HaninNet Shared CSS - 공통으로 사용되는 스타일들 */

/* Navigation Styles */
.category-nav {
    position: sticky;
    top: 0px; /* 변경된 값 */
    z-index: 30;
    background: white;
    border-bottom: 1px solid #e5e7eb;
}

/* Filter Item Styles - Events & Jobs */
.filter-item {
    transition: all 0.2s ease;
}

.filter-item:hover {
    background-color: rgba(59, 130, 246, 0.1);
}

.filter-item.active {
    background-color: #3b82f6;
    color: white;
}

/* Category Item Styles - Resources */
.category-item {
    transition: all 0.2s ease;
}

.category-item:hover {
    background-color: rgba(59, 130, 246, 0.1);
}

.category-item.active {
    background-color: #3b82f6;
    color: white;
}

/* Sidebar Category Styles - Community */
.sidebar-category {
    transition: all 0.2s ease;
}

.sidebar-category:hover {
    background-color: rgba(59, 130, 246, 0.1);
}

.sidebar-category.active {
    background-color: rgba(59, 130, 246, 0.2);
    border-right: 3px solid #3b82f6;
}

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

.card-hover:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.03);
}

/* Common Card Styles */
.post-card, .job-card, .event-card, .resource-card {
    transition: all 0.2s ease;
}

.post-card:hover, .job-card:hover, .event-card:hover, .resource-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* Loading Spinner */
.loading-spinner {
    text-center: true;
    padding: 2rem 0;
}

.loading-spinner i {
    font-size: 2rem;
    color: #3b82f6;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 0;
}

.empty-state i {
    font-size: 4rem;
    color: #d1d5db;
    margin-bottom: 1.5rem;
}

/* Search Shadow */
.search-shadow {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Chat Sidebar Layout */
.chat-sidebar {
    width: 240px;
    min-height: calc(100vh - 64px);
    overflow-y: auto;
}

.main-content {
    width: calc(100% - 240px);
}

/* Sidebar scrollbar styling */
.chat-sidebar::-webkit-scrollbar {
    width: 4px;
}

.chat-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.chat-sidebar::-webkit-scrollbar-thumb {
    background: rgba(156, 163, 175, 0.5);
    border-radius: 2px;
}

.chat-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(156, 163, 175, 0.8);
}

/* Firefox scrollbar */
.chat-sidebar {
    scrollbar-width: thin;
    scrollbar-color: rgba(156, 163, 175, 0.5) transparent;
}

@media (max-width: 768px) {
    #sidebar.chat-sidebar {
        width: 80% !important;
        max-width: 300px !important;
        position: fixed !important;
        left: -100% !important;
        transition: left 0.3s ease !important;
        z-index: 40 !important;
        background: white !important;
        height: 100vh !important;
        top: 0 !important;
        box-shadow: 2px 0 10px rgba(0,0,0,0.3) !important;
    }
    
    /* Force initial closed state */
    #sidebar.chat-sidebar:not(.open) {
        left: -100% !important;
    }
    
    #sidebar.chat-sidebar.open {
        left: 0 !important;
    }
    
    .main-content {
        width: 100% !important;
    }
    
    /* Sidebar backdrop will be handled by JavaScript */
}

/* Mobile menu animations */
.mobile-menu-open {
    display: block !important;
}

#mobile-menu-panel {
    transform: translateX(100%) !important;
    transition: transform 0.3s ease-in-out !important;
}

.mobile-menu-open #mobile-menu-panel {
    transform: translateX(0) !important;
}

/* Force mobile menu styles */
@media (max-width: 768px) {
    #mobile-menu {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        z-index: 99999 !important;
        background: rgba(0,0,0,0.5) !important;
    }
    
    #mobile-menu-panel {
        position: absolute !important;
        top: 0 !important;
        right: 0 !important;
        height: 100vh !important;
        width: 320px !important;
        max-width: 90vw !important;
        background: white !important;
        box-shadow: -2px 0 10px rgba(0,0,0,0.3) !important;
        transform: translateX(100%) !important;
        transition: transform 0.3s ease-in-out !important;
    }
    
    #mobile-menu.mobile-menu-open #mobile-menu-panel {
        transform: translateX(0) !important;
    }
}