/* Library Sidebar Styles */

.library-content {
    padding: 0.75rem;
}

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

/* Library Categories */
.library-category {
    margin-bottom: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-color);
}

.category-title {
    padding: 0.75rem 1rem;
    background-color: var(--bg-light);
    cursor: pointer;
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s;
    user-select: none;
}

.category-title:hover {
    background-color: #eef2ff;
}

.category-title::after {
    content: '▼';
    font-size: 0.7rem;
    color: var(--text-light);
    transition: transform 0.3s ease;
}

.library-category:not(.expanded) .category-title::after {
    transform: rotate(-90deg);
}

/* Category List */
.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.library-category.expanded .category-list {
    max-height: 1500px;
}

/* Library Items */
.library-item {
    border-top: 1px solid var(--border-color);
}

.library-item:first-child {
    border-top: none;
}

.library-item a {
    display: flex;
    align-items: center;
    padding: 0.625rem 1rem;
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.85rem;
    line-height: 1.4;
    transition: all 0.2s ease;
    background: var(--bg-color);
}

.library-item a:hover {
    background-color: var(--bg-light);
    color: var(--primary-color);
    padding-left: 1.25rem;
}

/* Translated Badge */
.translated-badge {
    font-size: 0.7rem;
    color: var(--accent-color);
    font-weight: 600;
    margin-left: 0.5rem;
    white-space: nowrap;
}

/* ===== RESPONSIVE STYLES ===== */

@media (max-width: 992px) {
    .library-close-btn {
        display: block;
    }
}

@media (max-width: 768px) {
    .library-content {
        padding: 0.5rem;
    }
    
    .library-category {
        margin-bottom: 0.5rem;
    }
    
    .category-title {
        padding: 0.625rem 0.875rem;
        font-size: 0.875rem;
        min-height: 44px;
    }
    
    .library-item a {
        padding: 0.625rem 0.875rem;
        font-size: 0.825rem;
        min-height: 44px;
    }
    
    .translated-badge {
        font-size: 0.65rem;
    }
}

@media (max-width: 480px) {
    .library-content {
        padding: 0.375rem;
    }
    
    .category-title {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }
    
    .library-item a {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
}
