/**
 * 圖鑑頁面側邊欄樣式
 * Catalog Sidebar Styles
 */

/* ===== 側邊欄主容器 ===== */
.catalog-sidebar {
    padding: 10px 15px 10px 10px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    scrollbar-gutter: stable;
    overflow-x: hidden;
    border-radius: 14px;
    background: var(--bs-body-bg);
    border: 1px solid rgba(0, 0, 0, 0.08);
    padding-bottom: 12px;
}

/* Firefox 支援 */
#catalogSidebar {
    scrollbar-width: thin;
    scrollbar-color: rgba(128, 128, 128, 0.4) transparent;
    padding: 5px 15px 5px 5px;
}

/* Webkit (Chrome, Edge, Safari) 自定義滾動條 */
#catalogSidebar::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

#catalogSidebar::-webkit-scrollbar-track {
    background: transparent;
}

#catalogSidebar::-webkit-scrollbar-thumb {
    background-color: rgba(128, 128, 128, 0.4);
    border-radius: 99px;
    border: 2px solid transparent;
    background-clip: content-box;
}

#catalogSidebar::-webkit-scrollbar-thumb:hover {
    background-color: rgba(128, 128, 128, 0.6);
}

/* ===== 側邊欄標題 ===== */
.sidebar-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--bs-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===== 側邊欄作品類型 ===== */
#sidebarEntityTypeContainer {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sidebar-entity-type {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-bottom: 8px;
    width: 106.19px;
    height: 55.8px;
    padding: 4px;
    border: 2px solid rgba(0, 0, 0, 0.14);
    border-radius: 8px;
    opacity: 0.5;
    transition: opacity 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
    background-color: rgba(0, 0, 0, 0.03);
    box-sizing: border-box;
    background-clip: padding-box;
    overflow: hidden;
}

.sidebar-entity-type:hover,
.sidebar-entity-type.active {
    opacity: 1;
    border-color: var(--bs-primary);
}

.sidebar-entity-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 6px;
}

.sidebar-entity-text {
    font-weight: 600;
    font-size: 0.9rem;
    text-align: center;
}

/* ===== 側邊欄套組區塊 ===== */
.sidebar-sets-container {
    /* 移除內層滾動，讓外層統一滾動 */
}

.sidebar-series-section {
    margin-bottom: 12px;
}

.sidebar-series-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--bs-secondary);
    padding: 6px 0;
    border-bottom: 1px solid var(--bs-border-color);
    margin-bottom: 6px;
}

.sidebar-set-item {
    display: flex;
    align-items: center;
    padding: 6px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 0.82rem;
}

.sidebar-set-item:hover {
    background-color: rgba(0, 0, 0, 0.04);
}

.sidebar-set-item.active {
    background-color: rgba(var(--bs-primary-rgb), 0.15);
    color: var(--bs-primary);
    font-weight: 600;
}

.sidebar-set-icon {
    width: 20px;
    height: 15px;
    object-fit: contain;
    margin-right: 6px;
    flex-shrink: 0;
}

.sidebar-set-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== 類型過濾按鈕（側邊欄版） ===== */
.sidebar-type-btn {
    padding: 4px 8px;
    font-size: 0.72rem;
    border-radius: 4px;
    margin: 2px;
}
