/**
 * Shared sidebar styles for Nilea plugin
 * This file contains all sidebar-related styles used across different templates
 */

/* Sidebar Layout Structure */
.sidebar-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 1rem;
}

.nilea-sidebar {
    flex: 0 0 220px;
    margin-bottom: 2rem;
    position: relative;
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.nilea-content-area {
    flex: 1;
    min-width: 0; /* Ensures content doesn't overflow */
}

/* Sidebar Navigation */
.nilea-nav {
    width: 100%;
}

.nilea-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nilea-menu .menu-item {
    margin: 0px;
    margin-bottom: 10px;
}

.nilea-menu .menu-item:last-child {
    margin-bottom: 0;
}

.nilea-menu .menu-item a {
    display: block;
    padding: 8px 12px;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.nilea-menu .menu-item a:hover {
    background-color: #e9ecef;
    color: #0073aa;
}

.nilea-menu .menu-item.active a {
    background-color: #0073aa;
    color: white;
    font-weight: 500;
}

/* Sidebar Action Buttons */
.sidebar-actions {
    margin-top: 20px;
    text-align: left !important;
}

.sidebar-actions .button {
    width: 100%;
    padding: 8px 12px !important;
    margin: 15px 0 5px;
    font-weight: bold;
}

.sidebar-actions .dashicons {
    margin-right: 0.25rem;
    margin-top: 0.1rem;
}

/* Sidebar Section Headers */
.nilea-menu .menu-heading {
    display: block;
    font-weight: 600;
    padding: 8px 12px;
    margin: 15px 0 5px;
    border-bottom: 1px solid #ddd;
    color: #555;
}

.nilea-menu .submenu {
    list-style: none;
    padding-left: 15px;
    margin: 0;
}

/* Legacy class support for backward compatibility */
.department-layout,
.departments-layout,
.officer-layout,
.events-layout { 
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 1rem;
}

.department-sidebar,
.departments-sidebar,
.officer-sidebar,
.events-sidebar {
    flex: 0 0 220px;
    margin-bottom: 2rem;
    position: relative;
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.department-content-area,
.departments-content-area,
.officer-content-area,
.events-content-area {
    flex: 1;
    min-width: 0;
}

/* Full width content area for public (not logged-in) users */
.events-content-area-public {
    width: 100%;
    max-width: 100%;
}

/* Legacy navigation elements */
.department-nav,
.departments-nav,
.officer-nav,
.events-nav {
    width: 100%;
}

.department-menu,
.departments-menu,
.officer-menu,
.events-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.department-menu .menu-item,
.departments-menu .menu-item,
.officer-menu .menu-item,
.events-menu .menu-item {
    margin: 0px;
    margin-bottom: 10px;
}

.department-menu .menu-item:last-child,
.departments-menu .menu-item:last-child,
.officer-menu .menu-item:last-child,
.events-menu .menu-item:last-child {
    margin-bottom: 0;
}

.department-menu .menu-item a,
.departments-menu .menu-item a,
.officer-menu .menu-item a,
.events-menu .menu-item a {
    display: block;
    padding: 8px 12px;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.department-menu .menu-item a:hover,
.departments-menu .menu-item a:hover,
.officer-menu .menu-item a:hover,
.events-menu .menu-item a:hover {
    background-color: #e9ecef;
    color: #0073aa;
}

.department-menu .menu-item.active a,
.departments-menu .menu-item.active a,
.officer-menu .menu-item.active a,
.events-menu .menu-item.active a {
    background-color: #0073aa;
    color: white;
    font-weight: 500;
}

.department-menu .menu-heading,
.departments-menu .menu-heading,
.officer-menu .menu-heading,
.events-menu .menu-heading {
    display: block;
    font-weight: 600;
    padding: 8px 12px;
    margin: 15px 0 5px;
    border-bottom: 1px solid #ddd;
    color: #555;
}

.department-menu .submenu,
.departments-menu .submenu,
.officer-menu .submenu,
.events-menu .submenu {
    list-style: none;
    padding-left: 15px;
    margin: 0;
}
