/* ==========================================================================
   search-tabs-folder.css – Folder-tab styling for .search-tab
   Overrides the default underline tabs with a physical folder-tab look.
   ========================================================================== */

/* Container: act as the "shelf" the tabs sit on */
.search-tabs {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0 4px;
    /* The bottom border is the "desk surface" line */
    border-bottom: 2px solid var(--color-border);
    position: relative;
}

.search-tabs::-webkit-scrollbar {
    display: none;
}

/* Each tab: the folder-tab shape */
.search-tab {
    position: relative;
    padding: 9px 20px 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-light);
    white-space: nowrap;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease;

    /* Remove the old underline indicator */
    border-bottom: none !important;

    /* Folder-tab shape: rounded top corners, straight bottom */
    background: var(--color-bg-off);
    border: 1px solid var(--color-border);
    border-bottom: none;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;

    /* Sit on top of the container's bottom border */
    margin-bottom: -2px;
    z-index: 0;
}

/* Hover: slightly more prominent */
.search-tab:hover {
    color: var(--color-text);
    background: #f0f0f0;
}

/* Active tab: looks like the open folder */
.search-tab.is-active {
    color: var(--color-primary);
    background: var(--color-bg);
    border-color: var(--color-border);

    /* Cover the container's bottom border so tab connects to the content */
    border-bottom: 2px solid var(--color-bg);
    z-index: 1;
    /* Slight lift effect */
    padding-top: 8px;
    font-weight: 700;
}

/* Subtle top-edge accent on the active tab */
.search-tab.is-active::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    height: 3px;
    background: var(--color-primary);
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}