/* TabHandle Layout */
.tabhandle {
    display: flex;
    flex-flow: row;
    justify-content: flex-start;
    align-items: center;

    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    border-bottom: solid 0.1rem var(--shadow);

    padding: 0.2rem;
    padding-bottom: none;

    overflow-x: auto;
}

/* Hide scrollbar */
.tabhandle::-webkit-scrollbar { display: none; }

/* Tab Buttons Styling */
.tabhandle button {
    all: unset;

    background: var(--bg-dark);
    color: var(--color);
    font: var(--font);

    border: 0.01rem solid var(--shadow);
    border-radius: 0.32rem 0.32rem 0.04rem 0.04rem; 

    padding: 0.2rem;
    margin: 0 0.2rem;
    cursor: default;

    max-width: 7.5rem;
    transition: background 0.3s ease, color 0.3s ease;

    position: relative;

    /* New styles for ellipsis */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tab-button:hover {
    background: var(--bg-light);
    color: var(--secondary-accent);
}

.tab-button.active, button.NewTab {
    background: var(--bg-light);
    color: var(--primary-accent);
    font-weight: 500;
    box-shadow: 0 0 10px var(--shadow);
    overflow: hidden;
}

.tab-button.active::before, button.NewTab::before {
    content: '';
    position: absolute;
    top: 80%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: ripple 0.4s ease-in-out forwards;
}

button.NewTab {
    padding: 0.2rem 0.4rem;
    border-radius: 0.32rem; 
}

@keyframes ripple {
    0% {
        width: 0;
        height: 0;
        opacity: 0.75;
    }
    100% {
        width: 300%;
        height: 300%;
        opacity: -0.25;
    }
}
