/* Sidebar Menu Styles */
html {
    scroll-behavior: smooth;
}

.hidden {
    display: none;
}

.sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 250px;
    height: 100%;
    background-color: #F5F5DC;
    padding-top: 60px;
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    z-index: 5;
    transition: all 0.3s ease;
}

.sidebar-hidden {
    right: -250px;
}

.sidebar-toggle {
    position: fixed;
    top: 15px;
    right: 15px;
    background-color: #F5F5DC;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.sidebar-toggle:hover {
    background-color: #eeeacf;
}

.sidebar-header {
    padding: 10px 15px;
    border-bottom: 1px solid #e2e2c9;
    margin-bottom: 10px;
}

.sidebar-header h3 {
    margin: 0 0 10px 0;
    font-size: 1.2rem;
    color: #333;
}

.sidebar-search {
    margin-top: 10px;
}

.search-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.sidebar-search-input {
    width: 100%;
    padding: 8px 10px;
    padding-right: 30px;
    border: 1px solid #e2e2c9;
    border-radius: 4px;
    font-size: 0.9rem;
    background-color: #fff;
    transition: border-color 0.2s ease;
}

.sidebar-search-input:focus {
    outline: none;
    border-color: #c9c9a3;
    box-shadow: 0 0 3px rgba(201, 201, 163, 0.5);
}

.clear-search-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #999;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

.clear-search-btn:hover {
    color: #666;
    background-color: #f0f0e0;
}

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

.sidebar-menu li {
    padding: 0;
}

.sidebar-divider {
    height: 1px;
    background-color: #e2e2c9;
    margin: 10px 15px;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.sidebar-icon {
    width: 16px;
    height: 16px;
    margin-right: 10px;
    object-fit: contain;
    transition: transform 0.2s ease;
}

.sidebar-menu li a:hover {
    background-color: #eeeacf;
    border-left-color: #c9c9a3;
}

.sidebar-menu li a:hover .sidebar-icon {
    transform: scale(1.1);
}

.sidebar-menu li a.active {
    background-color: #eeeacf;
    border-left-color: #a3a379;
    font-weight: 500;
}

.sidebar-menu li a.active .sidebar-icon {
    transform: scale(1.1);
}

/* Adjust main content when sidebar is visible */
.content-with-sidebar {
    transition: margin-right 0.3s ease;
}

.sidebar-visible .content-with-sidebar {
    margin-right: 250px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .sidebar {
        width: 250px;
    }
    
    .sidebar-hidden {
        right: -250px;
    }
    
    .sidebar-visible .content-with-sidebar {
        margin-right: 0;
    }
    
    .sidebar-toggle {
        top: 10px;
        right: 10px;
        z-index: 20;
    }
    
    .sidebar {
        padding-top: 50px;
        z-index: 15;
    }
    
    /* Add overlay when sidebar is visible on mobile */
    .sidebar-visible::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 5;
    }
}