.content-switcher {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.content-switcher--inline {
    width: fit-content;
    max-width: 100%;
}

.content-switcher--mono .content-switcher__trigger,
.content-switcher--mono .content-switcher__option {
    font-family: var(--font-mono);
}

.content-switcher--no-panels .content-switcher__panels {
    display: none;
}

.content-switcher__select {
    position: relative;
    width: fit-content;
    max-width: 100%;
}

.content-switcher__trigger {
    height: 34px;
    min-width: 150px;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 12px 0 14px;
    border: 1px solid var(--neutral-700);
    border-radius: var(--radius-md);
    background: var(--neutral-800);
    color: var(--neutral-100);
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition:
        border-color var(--t),
        background var(--t),
        color var(--t);
}

.content-switcher__trigger:hover {
    background: var(--neutral-750);
    border-color: var(--neutral-700);
}

.content-switcher__trigger:focus-visible {
    outline: 2px solid rgba(59, 130, 246, 0.55);
    outline-offset: 2px;
}

.content-switcher__trigger-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.content-switcher__chevron {
    width: 7px;
    height: 7px;
    border-right: 2px solid var(--neutral-400);
    border-bottom: 2px solid var(--neutral-400);
    transform: translateY(-2px) rotate(45deg);
    transition:
        transform var(--t),
        border-color var(--t);
}

.content-switcher.is-open .content-switcher__chevron {
    transform: translateY(2px) rotate(225deg);
    border-color: var(--neutral-400);
}

.content-switcher__menu {
    position: absolute;
    z-index: 20;
    top: calc(100% + 6px);
    left: 0;
    min-width: 100%;
    width: max-content;
    max-width: min(320px, calc(100vw - 32px));
    padding: 0;
    border: 1px solid var(--neutral-700);
    border-radius: var(--radius-md);
    background: var(--neutral-750);
    overflow: hidden;
    animation: contentSwitcherMenuIn 120ms ease;
}

.content-switcher__menu[hidden] {
    display: none;
}

.content-switcher__option {
    width: 100%;
    height: 34px;
    display: flex;
    align-items: center;
    padding: 0 14px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--neutral-300);
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    text-align: left;
    white-space: nowrap;
    cursor: pointer;
    transition:
        color var(--t),
        background var(--t);
}

.content-switcher__option:hover,
.content-switcher__option:focus-visible {
    color: var(--neutral-100);
    background: var(--neutral-700);
    outline: none;
}

.content-switcher__option.is-active {
    color: var(--neutral-100);
    background: var(--blue-500);
    font-weight: 600;
}

.content-switcher__panels {
    min-width: 0;
}

.content-switcher__panel {
    min-width: 0;
}

.content-switcher__panel[hidden] {
    display: none;
}

@keyframes contentSwitcherMenuIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 720px) {
    .content-switcher__select,
    .content-switcher__trigger {
        width: 100%;
    }
    .content-switcher__menu {
        width: 100%;
    }

    .content-switcher--inline .content-switcher__select {
        width: fit-content;
    }

    .content-switcher--inline .content-switcher__trigger {
        width: auto;
    }

    .content-switcher--inline .content-switcher__menu {
        width: max-content;
        min-width: 100%;
    }
}