.RadioInput-box {
    display: inline-block;
    align-items: center;
    position: relative;
}

.RadioInput-input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.RadioInput-label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    cursor: pointer;
    border: 1px solid var(--border-subtle);
    border-radius: 0.375rem;
    background: var(--surface-default);
    min-height: 38px;
    padding: 0.375em 1.25em 0.375em 0.75em;
    user-select: none;
    transition:
        background 0.15s,
        border 0.15s,
        color 0.15s;
    box-sizing: border-box;
    font-weight: var(--font-weight-regular);
}

.RadioInput-dot {
    display: inline-block;
    width: 1.1em;
    height: 1.1em;
    margin-right: 0.5em;
    border-radius: 50%;
    border: 1px solid var(--border-default);
    background: var(--surface-default);
    box-sizing: border-box;
    position: relative;
    transition: border-color 0.15s;
    z-index: 1;
    vertical-align: middle;
}

/* Colored ring, flush to edge, white center, when checked */
.RadioInput-dot::after {
    content: "";
    display: block;
    position: absolute;
    inset: 0;
    border-radius: 50%;
    pointer-events: none;
    border: 0.25rem solid transparent;
    background: var(--surface-default);
    box-sizing: border-box;
    transition:
        border-color 0.18s,
        border-width 0.18s;
}

.RadioInput-input:checked + .RadioInput-label .RadioInput-dot::after {
    border-color: var(--primary);
}

.RadioInput-label:hover,
.RadioInput-input:focus + .RadioInput-label {
    border-color: var(--primary);
    background: var(--primary-subtle);
}

.RadioInput-input:checked + .RadioInput-label {
    background-color: var(--primary-subtle);
    border-color: var(--border-primary);
}

.RadioInput-input:focus + .RadioInput-label {
    box-shadow: 0 0 0 3px rgb(0 123 255 / 20%);
}
