/* Segmented control container */
.segmented-control {
    display: grid;
    gap: var(--space-2);
}

/* Hide radios but keep them focusable/accessible */
.segmented-control input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* The pill with the options */
.segmented-options {
    display: inline-flex;
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    background: var(--control);
    overflow: hidden;
    width: fit-content;
}

/* Each segment */
.segmented-options label {
    padding: var(--space-2) var(--space-4);

    font-family: var(--font-sans);
    text-transform: uppercase;
    letter-spacing: var(--all-caps-space);
    font-size: var(--font-size-smaller);
    font-weight: var(--font-weight-medium);

    cursor: pointer;
    user-select: none;
    border-right: 1px solid var(--border-strong);
    transition: var(--transition);
}
.segmented-options label:last-of-type {
    border-right: 0;
}

.segmented-options label:hover {
    background: var(--control-hover);
}

.segmented-options .is-active {
    background: var(--control-active);
    color: var(--control-fg);
    box-shadow: inset 0 0 0 1px var(--control-active);
}

/* Panels */
.segmented-panels .panel { display: none; }
.segmented-panels .panel.is-active { display: block; }
