﻿/* Styles for each tab item */
.ib-table-header-tabs .nav-link {
    display: flex; /* Use flex to align icon and text horizontally */
    align-items: center; /* Vertically align content */
    justify-content: center; /* Center content horizontally */
    padding: 1vh;
    border-radius: 2.7vh; /* 26px @ 945px height*/
    background-color: var(--ib-primary-dark); /* Darker background color for each tab */
    color: #ffffff; /* Text color */
    cursor: pointer; /* Cursor style on hover */
    transition: background-color 0.3s ease; /* Smooth background color change */
    font-size: var(--ib-font-size-small);
}

/* ===== Syncfusion overrides (global) ===== */
.ib-chip-tabs.underline-removal .e-indicator.e-ignore {
    display: none !important
}

.ib-chip-tabs.e-tab .e-tab-header,
.ib-chip-tabs.e-tab .e-toolbar,
.ib-chip-tabs.e-tab .e-toolbar-items,
.ib-chip-tabs.e-tab .e-tab-header::before,
.ib-chip-tabs.e-tab .e-tab-header::after {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important
}
    /* kill culprit borders */
    .ib-chip-tabs.e-tab .e-tab-header .e-toolbar-item.e-active {
        border: none !important;
    }

    .ib-chip-tabs.e-tab .e-tab-header:not(.e-vertical) .e-toolbar-item.e-active {
        border-bottom: none !important;
    }
/* flatten internals */
.ib-chip-tabs.e-tab .e-toolbar-item,
.ib-chip-tabs.e-tab .e-text-wrap {
    background: transparent !important
}
    /* pill */
    .ib-chip-tabs.e-tab .e-toolbar-item .e-tab-wrap {
        display: inline-flex;
        align-items: center;
        padding: 1vh;
        border-radius: 2.7vh;
        height: auto;
        background: var(--ib-primary-dark) !important;
        color: #fff !important;
        border: none !important;
        outline: none !important;
        transition: background .2s ease
    }

        .ib-chip-tabs.e-tab .e-toolbar-item .e-tab-wrap:hover {
            display: inline-flex;
            align-items: center;
            padding: 1vh;
            border-radius: 2.7vh;
            height: auto;
            background: var(--ib-primary-dark) !important;
            color: #fff !important;
            border: none !important;
            outline: none !important;
            transition: background .2s ease
        }

    .ib-chip-tabs.e-tab .e-toolbar-item.e-active .e-tab-wrap {
        background: var(--ib-secondary-green) !important;
    }

.ib-chip-tabs.e-tab .e-toolbar-items {
    justify-content: center !important;
    gap: 8px
}

.ib-chip-tabs.e-tab .e-close-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    color: #1c1c1e;
    border: 2px solid #fff;
    margin-left: .5rem;
    font-size: 12px;
    line-height: 1
}

.ib-chip-tabs.e-tab .e-toolbar-item:not(.e-active) .e-close-icon {
    background: transparent;
    border: none;
    color: var(--ib-text-primary);
}

.ib-chip-tabs.e-tab .e-close-icon:hover {
    background: #fff;
    color: #000
}

.ib-chip-tabs.e-tab .e-tab-header .e-toolbar-item:not(.e-separator) {
    height: auto;
    margin: 0;
    min-height: 32px;
    min-width: auto;
    padding: 0;
}

.ib-chip-tabs.e-tab .e-tab-header .e-toolbar-item .e-tab-text {
    font-size: var(--ib-font-size-small);
    font-weight: 500;
}


.ib-chip-tabs.underline-removal .e-indicator.e-ignore {
    display: none !important
}

.dashboard-tabs.e-tab .e-tab-header,
.dashboard-tabs.e-tab .e-toolbar,
.dashboard-tabs.e-tab .e-toolbar-items,
.dashboard-tabs.e-tab .e-tab-header::before,
.dashboard-tabs.e-tab .e-tab-header::after {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important
}
    /* kill culprit borders */
    .dashboard-tabs.e-tab .e-tab-header .e-toolbar-item.e-active {
        border: none !important;
    }

    .dashboard-tabs.e-tab .e-tab-header:not(.e-vertical) .e-toolbar-item.e-active {
        border-bottom: none !important;
    }

.dashboard-tabs.e-tab .e-toolbar-item.e-active .e-tab-wrap {
    background: var(--ib-secondary-green) !important;
    color: #1c1c1e !important
}

.dashboard-tabs.e-tab .e-toolbar-item .e-tab-wrap {
    background: var(--ib-primary-dark) !important;
    margin: 3px;
    border-radius: 12px;
    border-bottom-left-radius: 0px;
    border-bottom-right-radius: 0px;
}

.dashboard-tabs.e-tab .e-tab-text {
    background: transparent !important;
    color: var(--ib-text-primary) !important;
}

.e-control.dashboard-tabs {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    flex: 1 1 auto; /* take remaining space */
    min-height: 0; /* ✅ critical: allow it to shrink */
    overflow: hidden;
}

.e-tab .e-content,
.e-tab .e-content > .e-item.e-active {
    height: 100%;
    overflow: hidden;
    width: 100%;
}

.ib-table {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto; /* take remaining space */
    min-height: 0; /* ✅ critical: allow it to shrink */
    overflow: hidden;
}

.table-responsive tbody {
    overflow: scroll;
    height: 100%;
}

.table-responsive {
    height: 100%;
}

.tabbedView {
    background-color: var(--ib-primary-dark);
    padding-left: var(--ib-margin-standard);
    padding-right: var(--ib-margin-standard);
    padding-bottom: var(--ib-margin-standard);
    border-radius: 3.2vh;
    margin-left: 0;
    margin-right: 0;
    display: flex;
    flex: 1 1 auto; /* take remaining space */
    min-height: 0; /* ✅ critical: allow it to shrink */
    overflow: hidden;
}

.ib-table-header {
    display: flex; /* Enables flexbox layout */
    align-items: center; /* Vertically aligns items within the container */
    margin-bottom: 1vh;
    min-width: 0; /* Important so flex children can shrink and allow overflow scrolling */
    position: relative; /* Allows absolute-centering of the tabs container */
}

.ib-table-header-text-container {
    padding: var(--ib-margin-standard);
}

    .ib-table-header-button-container {
        align-self: flex-end; /* Align this specific container to the top */
        margin-left: auto; /* Pushes the button container to the right */
        display: flex; /* Aligns the buttons inside the container */
        gap: 10px; /* adds spacing between buttons */
        flex: 0 0 auto;
        z-index: 2; /* Above centered tabs if they overlap */
        max-width: 30%;
    }

.ib-table-header-table-header-text {
    color: var(--ib-text-primary);
    align-self: flex-end; /* Align this specific container to the top */
    margin-right: auto; /* Pushes the button container to the left */
    padding: var(--ib-margin-standard);
    flex: 0 0 auto;
    z-index: 2; /* Above centered tabs if they overlap */
}

    .ib-table-header-table-header-text h4 {
        display: inline-block; /* Display li elements inline */
        margin-right: 1rem;
    }

/* =========================
   TABS: CENTERED + 35% MAX
   ========================= */

/* Outer tabs “pill” container (centered) */
.ib-table-header-tabs {
    align-self: flex-start;
    background-color: var(--ib-primary-light);
    border-radius: 0px 0px 4.2vh 4.2vh;
    padding: var(--ib-margin-smaller);
    padding-left: var(--ib-margin-standard);
    padding-right: var(--ib-margin-standard);
    padding-top: 0;
    margin-top: 0;
    margin-bottom: 0;
    /* Center EXACTLY within the header */
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 0;
    z-index: 1;
    /* Width constraint */
    max-width: 35%;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ======================================================================
   SYNCFUSION SfTab SCROLL BUTTONS
   IMPORTANT: do NOT change Syncfusion layout containers (keeps buttons visible)
   ====================================================================== */

/* Hide any native scrollbars in the header strip */
.e-tab.ib-chip-tabs .e-tab-header,
.e-tab.ib-chip-tabs .e-toolbar-items,
.e-tab.ib-chip-tabs .e-hscroll-bar,
.e-tab.ib-chip-tabs .e-hscroll-content {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

    .e-tab.ib-chip-tabs .e-tab-header.ib-tabs-reorder-active,
    .e-tab.ib-chip-tabs .e-tab-header.ib-tabs-reorder-active .e-toolbar-items,
    .e-tab.ib-chip-tabs .e-tab-header.ib-tabs-reorder-active .e-hscroll-bar,
    .e-tab.ib-chip-tabs .e-tab-header.ib-tabs-reorder-active .e-hscroll-content {
        touch-action: none;
        user-select: none;
    }

    .e-tab.ib-chip-tabs .e-toolbar-item.ib-tab-dragging {
        opacity: 0.6;
        cursor: grabbing;
        box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35);
    }

    .e-tab.ib-chip-tabs .e-tab-header::-webkit-scrollbar,
    .e-tab.ib-chip-tabs .e-toolbar-items::-webkit-scrollbar,
    .e-tab.ib-chip-tabs .e-hscroll-bar::-webkit-scrollbar,
    .e-tab.ib-chip-tabs .e-hscroll-content::-webkit-scrollbar {
        display: none;
    }

    /* Ensure the header/toolbar itself stays transparent so pill background shows */
    .e-tab.ib-chip-tabs .e-tab-header.e-toolbar {
        background: transparent;
    }

    /* Positioning context for absolutely placed nav buttons */
    .e-tab.ib-chip-tabs .e-toolbar-items.e-hscroll {
        position: relative;
    }

        /* Pin nav buttons to left/right, vertically centered */
        .e-tab.ib-chip-tabs .e-toolbar-items.e-hscroll .e-scroll-left-nav,
        .e-tab.ib-chip-tabs .e-toolbar-items.e-hscroll .e-scroll-right-nav {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            z-index: 6;
        }

        /* left / right placement */
        .e-tab.ib-chip-tabs .e-toolbar-items.e-hscroll .e-scroll-left-nav {
            left: 0;
        }

        .e-tab.ib-chip-tabs .e-toolbar-items.e-hscroll .e-scroll-right-nav {
            right: 0;
        }

        /* Make room for the buttons so chips don’t slide under them */
        .e-tab.ib-chip-tabs .e-toolbar-items.e-hscroll .e-hscroll-bar {
            padding-left: 0vh;
            padding-right: 0vh;
        }

        /* Style the actual button nodes */
        .e-tab.ib-chip-tabs .e-toolbar-items.e-hscroll .e-scroll-nav {
            width: 3.2vh;
            height: 3.2vh;
            min-width: 3.2vh;
            border-radius: 999px !important;
            background-color: var(--ib-primary-dark) !important;
            border: solid 3px var(--ib-secondary-green) !important;
            color: #ffffff !important;
            display: inline-flex !important;
            align-items: center !important;
            justify-content: center !important;
            box-shadow: none !important;
            outline: none !important;
            background-image: none !important;
            padding: 0 !important;
            line-height: 1 !important;
        }

            /* Remove Syncfusion hover/active grey squares */
            .e-tab.ib-chip-tabs .e-toolbar-items.e-hscroll .e-scroll-nav:hover,
            .e-tab.ib-chip-tabs .e-toolbar-items.e-hscroll .e-scroll-nav:active,
            .e-tab.ib-chip-tabs .e-toolbar-items.e-hscroll .e-scroll-nav:focus,
            .e-tab.ib-chip-tabs .e-toolbar-items.e-hscroll .e-scroll-nav:focus-visible {
                border-radius: 999px !important;
                background-color: #38383a !important;
                background-image: none !important;
                box-shadow: none !important;
                outline: none !important;
            }

            /* Some themes paint overlays using pseudo elements */
            .e-tab.ib-chip-tabs .e-toolbar-items.e-hscroll .e-scroll-nav::before,
            .e-tab.ib-chip-tabs .e-toolbar-items.e-hscroll .e-scroll-nav::after {
                content: none !important;
            }

            /* Arrow icons */
            .e-tab.ib-chip-tabs .e-toolbar-items.e-hscroll .e-scroll-nav .e-nav-arrow.e-icons,
            .e-tab.ib-chip-tabs .e-toolbar-items.e-hscroll .e-scroll-nav .e-nav-left-arrow.e-icons,
            .e-tab.ib-chip-tabs .e-toolbar-items.e-hscroll .e-scroll-nav .e-nav-right-arrow.e-icons {
                color: #ffffff !important;
                background: transparent !important;
                font-size: 1.6vh !important;
                line-height: 1 !important;
            }

            /* Disabled state in DOM is aria-disabled="true" */
            .e-tab.ib-chip-tabs .e-toolbar-items.e-hscroll .e-scroll-nav[aria-disabled="true"] {
                display: none !important;
            }

        /* ---- Mask caps behind buttons so they fully block chips underneath ---- */
        /* Attached to the nav wrapper so when it’s hidden, mask disappears too */
        .e-tab.ib-chip-tabs .e-toolbar-items.e-hscroll .e-scroll-left-nav::before,
        .e-tab.ib-chip-tabs .e-toolbar-items.e-hscroll .e-scroll-right-nav::before {
            content: "";
            position: absolute;
            top: -1vh;
            bottom: -1vh;
            width: 7vh;
            background-color: var(--ib-primary-light);
            pointer-events: none;
            z-index: -1; /* behind the button, above chips due to wrapper z-index */
        }

        /* Correct corner rounding / placement */
        .e-tab.ib-chip-tabs .e-toolbar-items.e-hscroll .e-scroll-left-nav::before {
            left: -1vh;
            border-radius: 0 0 0 3.2vh;
        }

        .e-tab.ib-chip-tabs .e-toolbar-items.e-hscroll .e-scroll-right-nav::before {
            right: -1vh;
            border-radius: 0 3.2vh 0 0;
        }

.close-tab-button {
    margin-left: 8px;
    color: #ffffff;
    cursor: pointer;
}

    .close-tab-button:hover {
        color: #f44336;
    }

.no-close-btn .e-close-icon {
    display: none !important;
}
