/**
 * Collapsible Sidebar Styles
 * Provides consistent styling for accordion sections in the sidebar
 */

/* Sidebar Container - Sticky positioning */
.sidebar-container {
    position: sticky;
    top: 1rem;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    overflow-x: hidden;
}

/* Accordion Section */
.accordion-section {
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: box-shadow 0.2s ease;
}

.accordion-section:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Accordion Header */
.accordion-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: opacity 0.2s ease;
}

.accordion-header:hover {
    opacity: 0.8;
}

.accordion-header:focus {
    outline: 2px solid #3B82F6;
    outline-offset: 2px;
    border-radius: 0.25rem;
}

.accordion-header h2,
.accordion-header h3 {
    margin: 0;
    font-weight: 600;
    color: #1F2937;
}

/* Accordion Icon */
.accordion-icon {
    width: 1.25rem;
    height: 1.25rem;
    color: #6B7280;
    transition: transform 0.2s ease;
    flex-shrink: 0;
    margin-left: 0.5rem;
}

/* Accordion Content */
.accordion-content {
    margin-top: 1rem;
    transition: all 0.3s ease;
}

.accordion-content.hidden {
    display: none;
    opacity: 0;
}

/* Compact mode for collapsed sections */
.accordion-section.collapsed {
    padding: 1rem 1.5rem;
}

.accordion-section.collapsed .accordion-content {
    max-height: 0;
    overflow: hidden;
    margin-top: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .sidebar-container {
        position: relative;
        top: 0;
        max-height: none;
    }

    .accordion-section {
        margin-bottom: 1rem;
        padding: 1rem;
    }
}

/* Smooth scrollbar for sidebar */
.sidebar-container::-webkit-scrollbar {
    width: 6px;
}

.sidebar-container::-webkit-scrollbar-track {
    background: #F3F4F6;
    border-radius: 3px;
}

.sidebar-container::-webkit-scrollbar-thumb {
    background: #D1D5DB;
    border-radius: 3px;
}

.sidebar-container::-webkit-scrollbar-thumb:hover {
    background: #9CA3AF;
}
