/* app/modules/tabs/tabs.css */
.editor-tabs-container {
    display: flex;
    background-color: var(--md-sys-color-surface);
    border-bottom: 1px solid var(--md-sys-color-outline);
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    height: 35px;
    align-items: flex-end;
    box-sizing: border-box;
    flex-shrink: 0;
    user-select: none;
    -webkit-overflow-scrolling: touch;
}

/* Hide scrollbar by default, show on hover but very thin */
.editor-tabs-container::-webkit-scrollbar {
    height: 2px;
}
.editor-tabs-container::-webkit-scrollbar-track {
    background: transparent;
}
.editor-tabs-container::-webkit-scrollbar-thumb {
    background: transparent;
}
.editor-tabs-container:hover::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb-bg);
}

.editor-tab {
    display: flex;
    align-items: center;
    padding: 0 14px;
    height: 100%;
    background-color: var(--md-sys-color-surface-variant);
    border-right: 1px solid var(--md-sys-color-outline);
    color: var(--md-sys-color-on-surface-variant);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: var(--md-sys-typescale-body-large);
    font-weight: 500;
    cursor: pointer;
    box-sizing: border-box;
    position: relative;
    transition: background-color 0.15s, color 0.15s;
    user-select: none;
}

.editor-tab:hover {
    background-color: var(--md-sys-color-surface-hover);
    color: var(--md-sys-color-on-surface);
}

.editor-tab.active {
    background-color: var(--md-sys-color-background);
    color: var(--md-sys-color-on-surface-strong);
    height: calc(100% + 1px); /* overlap the bottom border */
    border-top: 2px solid var(--md-sys-color-primary);
    padding-top: 0px; /* balance the border */
    z-index: 2;
}

.editor-tab-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
    font-size: 14px !important;
    vertical-align: middle;
}

/* File type icon colors */
.editor-tab-icon.dg {
    color: var(--md-sys-color-primary);
}
.editor-tab-icon.js {
    color: #f1e05a;
}
.editor-tab-icon.json {
    color: #56b6c2;
}
.editor-tab-icon.md {
    color: #61afef;
}
.editor-tab-icon.generic {
    color: var(--md-sys-color-on-surface-variant);
}

.editor-tab-name {
    margin-right: 10px;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    max-width: 140px;
}

.editor-tab-close-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    color: var(--md-sys-color-on-surface-variant);
    font-size: 10px !important;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s;
}

.editor-tab-close-btn:hover {
    background-color: rgba(255, 255, 255, 0.12);
    color: var(--md-sys-color-error);
}

/* VS Code premium micro-interaction: dirty dot turning to close cross on hover */
.editor-tab.is-dirty .editor-tab-close-btn {
    position: relative;
}

.editor-tab.is-dirty .editor-tab-close-btn::before {
    content: "";
    position: absolute;
    width: 8px;
    height: 8px;
    background-color: var(--md-sys-color-tertiary);
    border-radius: 50%;
    left: 4px;
    top: 4px;
    transition: opacity 0.15s;
    opacity: 1;
}

.editor-tab.is-dirty:hover .editor-tab-close-btn::before {
    opacity: 0;
}

.editor-tab.is-dirty .editor-tab-close-btn span {
    opacity: 0;
    transition: opacity 0.15s;
}

.editor-tab.is-dirty:hover .editor-tab-close-btn span {
    opacity: 1;
}

.editor-tab-connection-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 6px;
    font-size: 14px !important;
    vertical-align: middle;
    color: var(--md-sys-color-primary, #00f0ff);
    text-shadow: 0 0 4px rgba(0, 240, 255, 0.4);
}

