/* Sidebar styles */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 50px;
    background-color: #fff;
    color: #008080;
    transition: width 0.2s ease;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: none; /* Removed the box shadow */
    border-right: 1px solid #e0e0e0; /* Added thin border for visual separation */
}

.sidebar.expanded {
    width: 250px;
}

.sidebar-toggle {
    position: absolute;
    right: 0;
    top: 10px;
    background-color: #ffffff;
    color: #f4f4f4;
    border: none;
    width: 22px; /* Updated to match the collapsed state width */
    height: 34px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 2px;
    transition: background-color 0.2s ease, width 0.2s ease, right 0.2s ease;
}

/* Hover effect for sidebar toggle button - square with light gray background */
.sidebar-toggle:hover {
    background-color: #f0f0f0; /* Light gray background */
    width: 34px; /* Make it square */
    right: -6px; /* Adjust position to keep it centered (half of the width difference) */
}

/* Add more padding to the toggle button when sidebar is collapsed */
.sidebar:not(.expanded) .sidebar-toggle {
    margin: 0 14px; /* Increased horizontal margin to center in wider sidebar */
}

/* Add right margin to the toggle button when sidebar is expanded */
.sidebar.expanded .sidebar-toggle {
    right: 10px; /* Add space between the button and the right border */
}

/* Adjust hover position for expanded sidebar */
.sidebar.expanded .sidebar-toggle:hover {
    right: 4px; /* 10px - 6px to keep it centered when width increases */
}

.sidebar-header {
    padding: 15px;
    font-size: 16px;
    font-weight: bold;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    white-space: nowrap;
}

.sidebar-content {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    white-space: nowrap;
}

/* Hide content when sidebar is collapsed */
.sidebar:not(.expanded) .sidebar-header,
.sidebar:not(.expanded) .sidebar-content {
    opacity: 0;
    visibility: hidden;
}

/* Adjust main content when sidebar changes state */
.page-wrapper {
    transition: padding-left 0.3s ease;
    padding-left: 50px; /* Increased from 20px to 50px */
    width: calc(100% - 50px); /* Adjusted to account for wider sidebar */
    box-sizing: border-box;
    background-color: #fff; /* Match the background color with the sidebar */
}

.page-wrapper.sidebar-expanded {
    padding-left: 250px;
    width: 100%; /* Keep the full width */
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .sidebar {
        width: 50px; /* Increased from 20px to 50px */
    }
    
    .sidebar.expanded {
        width: 250px;
    }
}

/* Sidebar history list styling */
.sidebar-history-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-history-item {
    padding: 10px;
    /*border-bottom: 1px solid #e0e0e0;*/
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.sidebar-history-item:hover {
    background-color: #f0f0f0;
}

.sidebar-history-item:last-child {
    border-bottom: none;
}

.sidebar-item-goal {
    font-weight: 500;
    margin-bottom: 4px;
    color: #333;
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.sidebar-item-date {
    font-size: 12px;
    color: #777;
}

.sidebar-item {
    padding: 10px;
    color: #777;
    font-style: italic;
}
