.emote {
        position: relative;
        overflow: hidden;
        display: inline-block;
    }

#loadingOverlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

#loadingOverlay::after {
    content: "";
    width: 50px;
    height: 50px;
    border: 5px solid white;
    border-top: 5px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

body {
    padding: 16px;
}

.ms-breadcrumb.ms-background {
    display: flex;
    /* Enable flexbox */
    justify-content: space-between;
    /* Left & right alignment */
    align-items: center;
    /* Vertically center items */
}

.breadcrumb-right {
    display: flex;
}

.ms-form-group-inline {
    margin-bottom: 0px;
    margin-left: -8px;
}

.ms-btn.filter-button {
    border: 2px solid #373a3f !important;
    height: 40px;
}

.filter-icon img {
    height: 20px;
    margin: 0 auto;
}

label {
    font-weight: bold;
}

.table-container {
    width: 100%;
    height: calc(100vh - 84px);
    overflow: auto;
}

.ms-table thead th {
    background-color: #25282c;
    position: sticky;
    top: 0;
    z-index: 1;
}

.flex-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
}

.emoteitem {
    border: 2px solid #373a3f !important;
    border-radius: 5px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: max-content;
    text-align: center;
    padding-bottom: 10px !important;
    padding-top: 10px !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
    height: 58px !important;
    gap: 5px;
}

.engagement-meter {
    width: 163px;
    height: 24px;
    border-radius: 5px;
    border: 2px solid white;
}

.engagement-meter.zero {
    border-color: #b22222;
    background: #373a3f 0%
}

.engagement-meter.one {
    border-color: #b5391e;
    background: linear-gradient(to right,
            /* direction of the split */
            #b5391e 10%,
            /* first half */
            #373a3f 10%
            /* second half */
        );
}

.engagement-meter.two {
    border-color: #b94f1a;
    background: linear-gradient(to right,
            /* direction of the split */
            #b94f1a 20%,
            /* first half */
            #373a3f 20%
            /* second half */
        );
}

.engagement-meter.three {
    border-color: #bc6516;
    background: linear-gradient(to right,
            /* direction of the split */
            #bc6516 30%,
            /* first half */
            #373a3f 30%
            /* second half */
        );
}

.engagement-meter.four {
    border-color: #bf7b12;
    background: linear-gradient(to right,
            /* direction of the split */
            #bf7b12 40%,
            /* first half */
            #373a3f 40%
            /* second half */
        );
}

.engagement-meter.five {
    border-color: #c2920e;
    background: linear-gradient(to right,
            /* direction of the split */
            #c2920e 50%,
            /* first half */
            #373a3f 50%
            /* second half */
        );
}

.engagement-meter.six {
    border-color: #bfa90e;
    background: linear-gradient(to right,
            /* direction of the split */
            #bfa90e 60%,
            /* first half */
            #373a3f 60%
            /* second half */
        );
}

.engagement-meter.seven {
    border-color: #aeb80d;
    background: linear-gradient(to right,
            /* direction of the split */
            #aeb80d 70%,
            /* first half */
            #373a3f 70%
            /* second half */
        );
}

.engagement-meter.eight {
    border-color: #8fb40c;
    background: linear-gradient(to right,
            /* direction of the split */
            #8fb40c 80%,
            /* first half */
            #373a3f 80%
            /* second half */
        );
}

.engagement-meter.nine {
    border-color: #70a80b;
    background: linear-gradient(to right,
            /* direction of the split */
            #70a80b 90%,
            /* first half */
            #373a3f 90%
            /* second half */
        );
}

.engagement-meter.ten {
    border-color: #4c9c0a;
    background: #4c9c0a;
}

a {
    color: #0090ff !important;
}

.ms-table th,
.ms-table td {
    white-space: nowrap !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
}

/* ----------------------- */

/* CONTAINER: fixed viewport with scrolling */
.table-container {
    /* adjust as you like */
    width: 100%;
    /* or a fixed px width */
    height: calc(100vh - 84px);
    /* or a fixed px height, e.g. 600px */
    overflow: auto;
    border-radius: 8px;
}

/* The wrapper that holds header + virtualized area */
.grid-table {
    position: relative;
    min-width: 2860px;
    /* optional: keeps columns from crushing */
}

/* EACH ROW IS ITS OWN GRID (not display: contents!) */
.grid-row {
    display: grid;
    grid-template-columns:
        270px
        /* Conductor */
        270px
        /* Date      */
        650px
        /* Name grows */
        250px
        /* Engagement */
        minmax(320px, 1.2fr);
        /* Emotes */
    column-gap: 8px;
    border-bottom: 2px solid #373a3f;
}

/* Cells */
.grid-row>div {
    height: 80px;
    display: flex;
    align-items: center;
    padding: .5rem 8px;
    box-sizing: border-box;
    white-space: nowrap !important;
    word-break: normal !important;
    overflow: hidden;
    /* prevent overflow with nowrap */
    text-overflow: ellipsis;
    /* nice truncation */
}

/* Sticky header row (stays inside the scrolling .table-container) */
.grid-row.header {
    position: sticky;
    top: 0;
    z-index: 2;
    background-color: #25282c;
}

/* Virtualization viewport: tall spacer + absolutely positioned rows inside */
#movie-catalog-container {
    position: relative;
    /* JS sets height to total rows * rowHeight */
}

/* remove this line from your old CSS: */
/* .grid-row { display: contents; } */

.cell-engagement .flex-row {
    width: 230px;
    justify-content: space-between;
}
