/**
 * Bookmark Center Pro - Sidebar Styles
 * Modern sidebar with proper tabs and labels
 * 
 * @package BookmarkCenterPro
 * @version 3.0.0
 */

/* ========================================
   Sidebar Header
======================================== */
.bcp-sidebar-header {
    padding: var(--bcp-space-5);
    border-bottom: 1px solid var(--bcp-border-subtle);
    background: var(--bcp-bg-elevated);
}

.bcp-sidebar-logo {
    display: flex;
    align-items: center;
    gap: var(--bcp-space-3);
    text-decoration: none;
    color: var(--bcp-text);
}

.bcp-sidebar-logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--bcp-primary) 0%, var(--bcp-primary-dark) 100%);
    border-radius: var(--bcp-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--bcp-shadow-primary);
}

.bcp-sidebar-logo-icon svg {
    width: 22px;
    height: 22px;
    color: white;
}

.bcp-sidebar-logo-text {
    font-size: var(--bcp-text-lg);
    font-weight: 700;
    color: var(--bcp-text);
}

.bcp-sidebar-logo-text span {
    color: var(--bcp-primary);
}

/* Toggle Button */
.bcp-sidebar-toggle {
    position: absolute;
    left: -16px;
    top: 24px;
    width: 32px;
    height: 32px;
    background: var(--bcp-bg-elevated);
    border: 1px solid var(--bcp-border);
    border-radius: var(--bcp-radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--bcp-transition-normal);
    z-index: 10;
}

.bcp-sidebar-toggle:hover {
    background: var(--bcp-primary);
    border-color: var(--bcp-primary);
    color: white;
}

.bcp-sidebar-toggle svg {
    width: 16px;
    height: 16px;
    transition: var(--bcp-transition-normal);
}

.bcp-sidebar.collapsed .bcp-sidebar-toggle svg {
    transform: rotate(180deg);
}

/* ========================================
   Sidebar Tabs Navigation
======================================== */
.bcp-sidebar-tabs {
    display: flex;
    padding: var(--bcp-space-3);
    gap: var(--bcp-space-2);
    background: var(--bcp-bg-sidebar);
    border-bottom: 1px solid var(--bcp-border-subtle);
}

.bcp-sidebar-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--bcp-space-2);
    padding: var(--bcp-space-3);
    font-size: var(--bcp-text-sm);
    font-weight: 500;
    color: var(--bcp-text-muted);
    background: transparent;
    border: none;
    border-radius: var(--bcp-radius-md);
    cursor: pointer;
    transition: var(--bcp-transition-normal);
}

.bcp-sidebar-tab:hover {
    color: var(--bcp-text);
    background: var(--bcp-bg-hover);
}

.bcp-sidebar-tab.active {
    color: var(--bcp-primary);
    background: var(--bcp-primary-bg);
}

.bcp-sidebar-tab svg {
    width: 18px;
    height: 18px;
}

.bcp-sidebar-tab-label {
    display: none;
}

@media (min-width: 1200px) {
    .bcp-sidebar-tab-label {
        display: inline;
    }
}

/* ========================================
   Sidebar Search
======================================== */
.bcp-sidebar-search {
    padding: var(--bcp-space-4);
    border-bottom: 1px solid var(--bcp-border-subtle);
}

.bcp-sidebar-search-input {
    width: 100%;
    padding: var(--bcp-space-3) var(--bcp-space-4);
    padding-right: 40px;
    font-size: var(--bcp-text-sm);
    color: var(--bcp-text);
    background: var(--bcp-input-bg);
    border: 1px solid var(--bcp-input-border);
    border-radius: var(--bcp-radius-md);
    transition: var(--bcp-transition-normal);
}

.bcp-sidebar-search-input::placeholder {
    color: var(--bcp-text-muted);
}

.bcp-sidebar-search-input:focus {
    outline: none;
    border-color: var(--bcp-primary);
    box-shadow: 0 0 0 3px var(--bcp-primary-glow);
}

.bcp-sidebar-search-wrapper {
    position: relative;
}

.bcp-sidebar-search-icon {
    position: absolute;
    top: 50%;
    right: var(--bcp-space-3);
    transform: translateY(-50%);
    color: var(--bcp-text-muted);
    pointer-events: none;
}

.bcp-sidebar-search-icon svg {
    width: 18px;
    height: 18px;
}

/* ========================================
   Sidebar Content (Scrollable)
======================================== */
.bcp-sidebar-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: var(--bcp-space-4);
}

/* ========================================
   Sidebar Section
======================================== */
.bcp-sidebar-section {
    margin-bottom: var(--bcp-space-6);
}

.bcp-sidebar-section:last-child {
    margin-bottom: 0;
}

.bcp-sidebar-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--bcp-space-2) var(--bcp-space-3);
    margin-bottom: var(--bcp-space-2);
}

.bcp-sidebar-section-title span {
    font-size: var(--bcp-text-xs);
    font-weight: 600;
    color: var(--bcp-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.bcp-sidebar-section-add {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--bcp-border);
    border-radius: var(--bcp-radius-sm);
    color: var(--bcp-text-muted);
    cursor: pointer;
    transition: var(--bcp-transition-fast);
}

.bcp-sidebar-section-add:hover {
    background: var(--bcp-primary);
    border-color: var(--bcp-primary);
    color: white;
}

.bcp-sidebar-section-add svg {
    width: 14px;
    height: 14px;
}

/* ========================================
   Sidebar Navigation Items
======================================== */
.bcp-sidebar-nav {
    list-style: none;
    margin: 0;
    padding: 0;
}

.bcp-sidebar-item {
    display: flex;
    align-items: center;
    gap: var(--bcp-space-3);
    padding: var(--bcp-space-3) var(--bcp-space-4);
    margin-bottom: var(--bcp-space-1);
    border-radius: var(--bcp-radius-md);
    cursor: pointer;
    transition: var(--bcp-transition-normal);
    position: relative;
}

.bcp-sidebar-item::before {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: var(--bcp-primary);
    border-radius: var(--bcp-radius-full);
    transition: var(--bcp-transition-normal);
}

.bcp-sidebar-item:hover {
    background: var(--bcp-bg-hover);
}

.bcp-sidebar-item:hover .bcp-sidebar-label {
    color: var(--bcp-text);
}

.bcp-sidebar-item.active {
    background: linear-gradient(90deg, var(--bcp-primary-bg), transparent);
}

.bcp-sidebar-item.active::before {
    height: 60%;
}

.bcp-sidebar-item.active .bcp-sidebar-icon {
    color: var(--bcp-primary);
}

.bcp-sidebar-item.active .bcp-sidebar-label {
    color: var(--bcp-primary);
    font-weight: 600;
}

.bcp-sidebar-item.active .bcp-sidebar-count {
    background: var(--bcp-primary);
    color: white;
}

/* Sidebar Item Icon */
.bcp-sidebar-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    color: var(--bcp-text-muted);
    flex-shrink: 0;
    transition: var(--bcp-transition-fast);
}

.bcp-sidebar-icon svg {
    width: 20px;
    height: 20px;
}

/* Colored Dot Icon */
.bcp-sidebar-dot {
    width: 10px;
    height: 10px;
    border-radius: var(--bcp-radius-full);
    flex-shrink: 0;
}

/* Sidebar Item Label */
.bcp-sidebar-label {
    flex: 1;
    font-size: var(--bcp-text-sm);
    color: var(--bcp-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: var(--bcp-transition-fast);
}

/* Sidebar Item Count */
.bcp-sidebar-count {
    min-width: 28px;
    height: 24px;
    padding: 0 var(--bcp-space-2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--bcp-text-xs);
    font-weight: 600;
    color: var(--bcp-text-muted);
    background: var(--bcp-bg-elevated);
    border-radius: var(--bcp-radius-full);
    transition: var(--bcp-transition-fast);
}

/* ========================================
   Sidebar Footer
======================================== */
.bcp-sidebar-footer {
    padding: var(--bcp-space-4);
    border-top: 1px solid var(--bcp-border-subtle);
    background: var(--bcp-bg-elevated);
}

.bcp-sidebar-footer-actions {
    display: flex;
    gap: var(--bcp-space-2);
}

.bcp-sidebar-footer-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--bcp-space-2);
    padding: var(--bcp-space-3);
    font-size: var(--bcp-text-sm);
    font-weight: 500;
    color: var(--bcp-text-muted);
    background: var(--bcp-bg-surface);
    border: 1px solid var(--bcp-border);
    border-radius: var(--bcp-radius-md);
    cursor: pointer;
    transition: var(--bcp-transition-normal);
}

.bcp-sidebar-footer-btn:hover {
    color: var(--bcp-primary);
    border-color: var(--bcp-primary);
    background: var(--bcp-bg-hover);
}

.bcp-sidebar-footer-btn svg {
    width: 18px;
    height: 18px;
}

/* ========================================
   User Info (Optional)
======================================== */
.bcp-sidebar-user {
    display: flex;
    align-items: center;
    gap: var(--bcp-space-3);
    padding: var(--bcp-space-4);
    border-top: 1px solid var(--bcp-border-subtle);
    background: var(--bcp-bg-surface);
}

.bcp-sidebar-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--bcp-radius-full);
    background: var(--bcp-primary-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bcp-primary);
    font-weight: 600;
    flex-shrink: 0;
}

.bcp-sidebar-user-info {
    flex: 1;
    min-width: 0;
}

.bcp-sidebar-user-name {
    font-size: var(--bcp-text-sm);
    font-weight: 600;
    color: var(--bcp-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bcp-sidebar-user-email {
    font-size: var(--bcp-text-xs);
    color: var(--bcp-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ========================================
   Empty State for Sections
======================================== */
.bcp-sidebar-empty {
    padding: var(--bcp-space-4);
    text-align: center;
    color: var(--bcp-text-dim);
    font-size: var(--bcp-text-sm);
}

/* ========================================
   Mobile Menu Toggle
======================================== */
.bcp-mobile-menu-btn {
    display: none;
    position: fixed;
    bottom: var(--bcp-space-6);
    left: var(--bcp-space-6);
    width: 56px;
    height: 56px;
    background: var(--bcp-primary);
    border: none;
    border-radius: var(--bcp-radius-full);
    color: white;
    box-shadow: var(--bcp-shadow-lg);
    cursor: pointer;
    z-index: var(--bcp-z-fixed);
    transition: var(--bcp-transition-normal);
}

.bcp-mobile-menu-btn:hover {
    transform: scale(1.05);
}

.bcp-mobile-menu-btn svg {
    width: 24px;
    height: 24px;
}

@media (max-width: 1024px) {
    .bcp-mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}
