/* ============================================
   AUTHENTIC VISUAL STUDIO CODE TAB SYSTEM
   ============================================ */

/* Tab Bar Container - VS Code Authentic Colors */
.tab-bar {
    display: none;
    background: #2d2d30;
    height: 37px;
    overflow: hidden;
    position: relative;
    z-index: 10;
    /* VS Code tab bar background */
    background: linear-gradient(to bottom, #2d2d30 0%, #252526 100%);
}

[data-theme="light"] .tab-bar {
    background: #f3f3f3;
    border-bottom: 1px solid #e1e1e1;
    background: linear-gradient(to bottom, #f3f3f3 0%, #ececec 100%);
}

.tab-bar.show {
    display: block;
}

.tab-list {
    display: flex;
    height: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 0 4px;
    align-items: flex-end;
    gap: 2px;
}

.tab-list::-webkit-scrollbar {
    display: none;
}

/* Authentic VS Code Style Individual Tabs */
.tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: transparent;
    color: #cccccc;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    min-width: 120px;
    max-width: 200px;
    position: relative;
    /* Removed transition to prevent smooth animations */
    border-radius: 0;
    margin: 0;
    font-size: 12px;
    font-weight: 400;
    overflow: hidden;
    height: 37px;
    box-sizing: border-box;
    margin-top: 2px;
    /* Inactive tab styling - more transparent like VS Code */
    background: rgba(255, 255, 255, 0.02);
    border: 0;
    border-top: 0;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
}

.tab:hover {
    background:#313131;
    color: #ffffff;
}

.tab.active {
    background: #1e1e1e;
    color: #ffffff;
    border-top: 1.5px solid #007acc;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    margin-top: 0;
    height: 37px;
}

[data-theme="light"] .tab {
    color: #424242;
    background: rgba(0, 0, 0, 0.02);
}

[data-theme="light"] .tab:hover {
    background: rgba(0, 0, 0, 0.08);
    color: #1e1e1e;
}

[data-theme="light"] .tab.active {
    background: #ffffff;
    color: #1e1e1e;
    border-top: 2px solid #0078d4;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
}

/* Tab Icons */
.tab-icon {
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 10px;
    color: inherit;
    opacity: 0.8;
}

.tab.active .tab-icon {
    opacity: 1;
}

/* Tab Title */
.tab-title {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 11px;
    line-height: 1.2;
}

/* Tab Status Indicators */
.tab-status {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
    margin-left: 2px;
}

.tab-status i {
    font-size: 6px;
    width: 6px;
    height: 6px;
    opacity: 0.7;
}

.tab-status .pinned {
    color: #569cd6;
    opacity: 1;
}

.tab-status .modified {
    color: #d7ba7d;
    opacity: 1;
}

/* Tab Close Button */
.tab-close {
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 2px;
    opacity: 0;
    /* Removed transition */
    flex-shrink: 0;
    font-size: 8px;
    margin-left: 4px;
    color: inherit;
}

.tab:hover .tab-close {
    opacity: 0.6;
}

.tab.active .tab-close {
    opacity: 0.6;
}

.tab-close:hover {
    background: #5f5f5f;
    color: white;
    opacity: 1;
}

.tab-close i {
    font-size: 8px;
    font-weight: bold;
}

/* Authentic VS Code Style Tab Context Menu */
.tab-context-menu {
    position: fixed;
    background: #3c3c3c;
    border: 1px solid #5a5a5a;
    border-radius: 4px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
    padding: 4px 0;
    z-index: 10000;
    min-width: 180px;
    display: none;
    font-size: 13px;
}

[data-theme="light"] .tab-context-menu {
    background: #ffffff;
    border: 1px solid #d4d4d4;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.context-menu-item {
    padding: 6px 16px;
    cursor: pointer;
    color: #cccccc;
    display: flex;
    align-items: center;
    gap: 8px;
    /* Removed transition */
    font-weight: 400;
    position: relative;
}

[data-theme="light"] .context-menu-item {
    color: #333333;
}

.context-menu-item:hover {
    background: #094771;
    color: #ffffff;
}

[data-theme="light"] .context-menu-item:hover {
    background: #0078d4;
    color: #ffffff;
}

.context-menu-separator {
    height: 1px;
    background: #5a5a5a;
    margin: 4px 0;
}

[data-theme="light"] .context-menu-separator {
    background: #e1e1e1;
}

/* Tab overflow handling */
.tab-list {
    position: relative;
}

.tab-list::before,
.tab-list::after {
    content: '';
    position: absolute;
    top: 0;
    width: 20px;
    height: 100%;
    z-index: 5;
    pointer-events: none;
}

.tab-list::before {
    left: 0;
    background: linear-gradient(to right, #2d2d30, transparent);
}

.tab-list::after {
    right: 0;
    background: linear-gradient(to left, #2d2d30, transparent);
}

[data-theme="light"] .tab-list::before {
    background: linear-gradient(to right, #f3f3f3, transparent);
}

[data-theme="light"] .tab-list::after {
    background: linear-gradient(to left, #f3f3f3, transparent);
}

/* Mobile responsive tab bar */
@media (max-width: 768px) {
    .tab-bar {
        height: 40px;
    }
    
    .tab {
        min-width: 100px;
        max-width: 150px;
        padding: 6px 8px;
        font-size: 11px;
    }
    
    .tab-icon {
        width: 14px;
        height: 14px;
        font-size: 10px;
    }
    
    .tab-close {
        width: 14px;
        height: 14px;
        font-size: 9px;
    }
}

/* Animation for tab changes - Removed as per user request */
.tab {
    /* No animations */
}

.tab.removing {
    /* No removal animations */
}

/* Tab group styling for pinned tabs */
.tab.pinned {
    border-left: 3px solid #569cd6;
}

.tab.pinned .tab-title {
    font-weight: 500;
}