/**
 * Mobile Sidebar Menu Styles
 */

/* Sidebar Menu Container */
.mobile-sidebar-menu {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100vh;
    background: white;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    transition: left 0.3s ease;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.mobile-sidebar-menu.active {
    left: 0;
}

/* Sidebar Header */
.sidebar-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    min-height: 60px;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-logo .custom-logo {
    max-height: 40px;
    width: auto;
}

.sidebar-logo .sidebar-site-title {
    margin: 0;
}

.sidebar-logo .sidebar-site-title a {
    color: white;
    text-decoration: none;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -1px;
    font-style: italic;
}

.sidebar-close {
    background: transparent;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.sidebar-close:hover {
    transform: rotate(90deg);
}

/* Sidebar Navigation */
.sidebar-navigation {
    flex: 1;
    padding: 20px 0;
    overflow-y: auto;
}

.sidebar-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-navigation ul li {
    border-bottom: 1px solid #f0f0f0;
}

.sidebar-navigation ul li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--transition);
}

.sidebar-navigation ul li a:hover {
    background: #f9fafb;
    color: var(--primary-color);
    padding-left: 25px;
}

/* Submenu indicator */
.sidebar-navigation ul li.menu-item-has-children > a::after {
    content: '\f078';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 12px;
    color: #9eb1c1;
}

.sidebar-navigation ul ul {
    display: none;
    background: #f9fafb;
}

.sidebar-navigation ul li.menu-item-has-children.active > ul {
    display: block;
}

.sidebar-navigation ul ul li a {
    padding-left: 40px;
    font-size: 13px;
    font-weight: 500;
    text-transform: none;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 20px;
    border-top: 1px solid #f0f0f0;
    background: #f9fafb;
    margin-top: auto;
}

/* Social Icons */
.sidebar-social {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 20px;
}

.sidebar-social a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    color: var(--text-dark);
    border-radius: 50%;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.sidebar-social a:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* Footer Menu */
.sidebar-footer-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.sidebar-footer-menu ul li a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 12px;
    transition: var(--transition);
}

.sidebar-footer-menu ul li a:hover {
    color: var(--primary-color);
}

/* Sidebar Overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 99998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Admin bar overlay adjustment */
.admin-bar .sidebar-overlay {
    top: 32px;
    height: calc(100% - 32px);
}

@media screen and (max-width: 782px) {
    .admin-bar .sidebar-overlay {
        top: 46px;
        height: calc(100% - 46px);
    }
}

/* Dark Mode */
body.dark-mode .mobile-sidebar-menu {
    background: #16171b;
}

body.dark-mode .sidebar-menu-header {
    background: #1d1e21;
}

body.dark-mode .sidebar-navigation ul li {
    border-bottom-color: #3a3d4a;
}

body.dark-mode .sidebar-navigation ul li a {
    color: white;
}

body.dark-mode .sidebar-navigation ul li a:hover {
    background: #1d1e21;
}

body.dark-mode .sidebar-navigation ul ul {
    background: #1d1e21;
}

body.dark-mode .sidebar-footer {
    background: #16171b;
    border-top-color: #3a3d4a;
}

body.dark-mode .sidebar-social a {
    background: #2a2d3a;
    color: white;
}

body.dark-mode .sidebar-social a:hover {
    background: var(--primary-color);
}

/* Admin bar adjustments */
.admin-bar .mobile-sidebar-menu {
    height: calc(100vh - 32px);
    top: 32px;
}

@media screen and (max-width: 782px) {
    .admin-bar .mobile-sidebar-menu {
        height: calc(100vh - 46px);
        top: 46px;
    }
}

/* Hide on desktop */
@media (min-width: 769px) {
    .mobile-sidebar-menu,
    .sidebar-overlay {
        display: none;
    }
}
