/* Virtual Tabs CSS */
.virtual-tabs-container {
    margin: 0;
    padding: 0;
    border-bottom: 1px solid #ddd;
    background: #f8f9fa;
    position: relative;
    z-index: 99;
}

.virtual-tabs-wrapper {
    display: flex;
    align-items: flex-end;
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.virtual-tabs-wrapper::-webkit-scrollbar {
    display: none;
}

.virtual-tab {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    margin: 0 2px;
    background: #e9ecef;
    border: 1px solid #ddd;
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    cursor: pointer;
    white-space: nowrap;
    min-width: 120px;
    max-width: 250px;
    transition: all 0.2s ease;
    position: relative;
    font-size: 13px;
    color: #495057;
    text-decoration: none;
}

.virtual-tab:hover {
    background: #dee2e6;
    text-decoration: none;
    color: #495057;
}

.virtual-tab.active {
    background: #fff;
    z-index: 2;
    color: #495057;
}

.virtual-tab-title {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 8px;
}

.virtual-tab-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 12px;
    color: #6c757d;
    transition: all 0.2s ease;
    text-decoration: none;
}

.virtual-tab-close:hover {
    background: #dc3545;
    color: #fff;
    text-decoration: none;
}

.virtual-tab.active .virtual-tab-close:hover {
    background: #dc3545;
    color: #fff;
}

.virtual-tab-new {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin: 0 8px;
    background: #f8a92e;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s ease;
    margin-bottom: 3px;
    text-decoration: none;
}

.virtual-tab-new:hover {
    background: #f1bc00;
    color: #fff;
    text-decoration: none;
}

.virtual-tab-new:before {
    content: '+';
}

/* 스크롤 영역 처리 */
.virtual-tabs-scroll-left,
.virtual-tabs-scroll-right {
    position: absolute;
    top: 0;
    bottom: 1px;
    width: 30px;
    background: linear-gradient(90deg, #f8f9fa 0%, transparent 100%);
    z-index: 3;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    color: #6c757d;
}

.virtual-tabs-scroll-left {
    left: 0;
    background: linear-gradient(90deg, #f8f9fa 70%, transparent 100%);
}

.virtual-tabs-scroll-right {
    right: 0;
    background: linear-gradient(270deg, #f8f9fa 70%, transparent 100%);
}

.virtual-tabs-scroll-left:hover,
.virtual-tabs-scroll-right:hover {
    color: #495057;
}

/* 반응형 처리 */
@media (max-width: 768px) {
    .virtual-tab {
        min-width: 100px;
        max-width: 180px;
        padding: 6px 12px;
        font-size: 12px;
    }

    .virtual-tab-new {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }

    .virtual-tab-close {
        width: 14px;
        height: 14px;
        font-size: 10px;
    }
}

/* 탭 드래그 효과 (향후 확장용) */
.virtual-tab.dragging {
    opacity: 0.5;
    z-index: 1000;
}

.virtual-tab.drag-over {
    border-left: 2px solid #007bff;
}

/* 애니메이션 효과 */
@keyframes tabSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.virtual-tab.new-tab {
    animation: tabSlideIn 0.3s ease;
}

/* 포커스 스타일 */
.virtual-tab:focus,
.virtual-tab-close:focus,
.virtual-tab-new:focus {
    outline: 2px solid #007bff;
    outline-offset: -2px;
}

/* 접근성 개선 */
.virtual-tab[aria-selected="true"] {
    background: #fff;
}