/* Option chips that stand in for a long <select data-chips> (assets/js/chip-select.js). Colours come
   from the surrounding text; a page can set --chip-accent for the chosen chip. */

.chips-source {
    display: none !important;
}
.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0.35rem 0 0.25rem;
}
.chips-group {
    flex-basis: 100%;
    margin: 0.35rem 0 0;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    opacity: 0.75;
}
.chips-group:first-child {
    margin-top: 0;
}
.chip {
    position: relative;
    display: inline-flex;
    max-width: 100%;
    margin: 0;
    cursor: pointer;
}
.chip input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    opacity: 0;
}
.chip span {
    display: inline-flex;
    align-items: center;
    min-height: 2.5rem;
    padding: 0.35rem 0.85rem;
    border: 1px solid rgba(148, 163, 184, 0.45);
    border: 1px solid color-mix(in srgb, currentColor 28%, transparent);
    border-radius: 999px;
    background: transparent;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.25;
    text-transform: none;
    letter-spacing: normal;
}
.chip:hover span {
    background: rgba(148, 163, 184, 0.12);
    background: color-mix(in srgb, currentColor 8%, transparent);
}
.chip input:checked + span {
    border-color: var(--chip-accent, currentColor);
    background: rgba(148, 163, 184, 0.2);
    background: color-mix(in srgb, var(--chip-accent, currentColor) 18%, transparent);
}
/* The chosen chip is marked by more than colour. */
.chip input:checked + span::before {
    content: "\2713";
    margin-right: 0.4rem;
    font-weight: 800;
}
.chip input:focus-visible + span {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}
.chip input:disabled + span {
    opacity: 0.45;
    cursor: not-allowed;
}
