/* Sidebar styles */
.sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    width: 85%;
    max-width: 300px;
    height: 100%;
    background-color: white;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
    transition: left 0.3s ease;
    z-index: 1000;
    border-right: 1px solid #ddd;
    display: flex;
    flex-direction: column;
    overflow-y: auto; /* Enable scrolling if content is too tall */
}

.sidebar.active {
    left: 0;
}

.sidebar-header {
    padding: 12px 15px;
    border-bottom: 1px solid #ddd;
    font-size: 20px;
    font-weight: bold;
    display: flex;
    align-items: center;
}

/* Media queries for responsive sidebar */
@media screen and (max-width: 480px) {
    .sidebar {
        width: 75%; /* Narrower on very small screens */
    }
    
    .sidebar-header {
        padding: 10px;
        font-size: 18px;
    }
}

.sidebar-menu {
    flex: 1;
    overflow-y: auto;
}

.sidebar-menu-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 15px;
    border-bottom: 1px solid #eee;
    text-decoration: none;
    color: #000;
    font-size: 16px;
}

.sidebar-menu-item:hover {
    background-color: #f5f5f5;
}

.sidebar-menu-item:active {
    background-color: #e8e8e8; /* Better touch feedback */
}

.sidebar-menu-item .arrow {
    color: #999;
}

.sidebar-footer {
    border-top: 1px solid #ddd;
    padding: 12px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0; /* Prevent footer from shrinking */
}

.sidebar-footer img {
    height: 36px;
}

.sidebar-footer .footer-text {
    font-size: 13px;
    text-align: right;
}

@media screen and (max-width: 480px) {
    .sidebar-menu-item {
        padding: 12px;
        font-size: 15px;
    }
    
    .sidebar-footer {
        padding: 10px;
    }
    
    .sidebar-footer img {
        height: 32px;
    }
    
    .sidebar-footer .footer-text {
        font-size: 12px;
    }
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
    -webkit-tap-highlight-color: transparent; /* Remove tap highlight on mobile */
}

.overlay.active {
    display: block;
}

/* Improve touch targets */
.menu {
    cursor: pointer;
    min-width: 24px;
    min-height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}