.defiant-select {
    --select-accent: var(--primary-light, var(--accent-bright, #ff9a55));
    position: relative;
    z-index: 1;
    width: 100%;
    min-width: 0;
}

.defiant-select.is-open { z-index: 120; }

.defiant-select-native {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    min-height: 0 !important;
    margin: -1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
    border: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
    white-space: nowrap !important;
}

.defiant-select-trigger {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 18px;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 46px;
    padding: 10px 13px 10px 15px;
    border: 1px solid rgba(255, 138, 68, .25);
    border-radius: 12px;
    outline: 0;
    background:
        linear-gradient(135deg, rgba(255, 125, 48, .075), transparent 52%),
        rgba(15, 12, 14, .94);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035);
    color: #f7eee9;
    cursor: pointer;
    font: inherit;
    text-align: left;
    transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease;
}

.defiant-select-trigger:hover {
    border-color: rgba(255, 138, 68, .48);
    background-color: rgba(35, 22, 21, .96);
}

.defiant-select-trigger:focus-visible,
.defiant-select.is-open .defiant-select-trigger {
    border-color: var(--select-accent);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, .15), inset 0 1px 0 rgba(255, 255, 255, .05);
}

.defiant-select-value {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.defiant-select-chevron {
    position: relative;
    width: 18px;
    height: 18px;
    border-radius: 6px;
    background: rgba(255, 255, 255, .045);
}

.defiant-select-chevron::before,
.defiant-select-chevron::after {
    content: "";
    position: absolute;
    top: 8px;
    width: 7px;
    height: 2px;
    border-radius: 2px;
    background: var(--select-accent);
    transition: transform .16s ease;
}

.defiant-select-chevron::before { left: 3px; transform: rotate(45deg); }
.defiant-select-chevron::after { right: 3px; transform: rotate(-45deg); }
.defiant-select.is-open .defiant-select-chevron::before { transform: rotate(-45deg); }
.defiant-select.is-open .defiant-select-chevron::after { transform: rotate(45deg); }

.defiant-select-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: 0;
    z-index: 4;
    max-height: min(340px, 48vh);
    padding: 7px;
    overflow: auto;
    overscroll-behavior: contain;
    border: 1px solid rgba(255, 138, 68, .32);
    border-radius: 14px;
    background:
        radial-gradient(circle at 85% -10%, rgba(249, 115, 22, .16), transparent 42%),
        rgba(13, 11, 14, .985);
    box-shadow: 0 22px 55px rgba(0, 0, 0, .52), inset 0 1px 0 rgba(255, 255, 255, .045);
    scrollbar-color: rgba(255, 138, 68, .55) rgba(255, 255, 255, .035);
}

.defiant-select-menu[hidden] { display: none; }
.defiant-select.is-up .defiant-select-menu { top: auto; bottom: calc(100% + 8px); }

.defiant-select-group {
    display: block;
    padding: 10px 10px 5px;
    color: #9b8b83;
    font-size: 10px;
    font-weight: 850;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.defiant-select-option {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 18px;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 42px;
    padding: 9px 10px 9px 12px;
    border: 1px solid transparent;
    border-radius: 9px;
    background: transparent;
    color: #d8d0cc;
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.defiant-select-option::after {
    content: "";
    justify-self: center;
    width: 7px;
    height: 7px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 50%;
}

.defiant-select-option:hover,
.defiant-select-option:focus-visible {
    border-color: rgba(255, 138, 68, .18);
    outline: 0;
    background: rgba(255, 122, 47, .09);
    color: #fff8f3;
}

.defiant-select-option[aria-selected="true"] {
    border-color: rgba(255, 138, 68, .28);
    background: linear-gradient(90deg, rgba(249, 115, 22, .18), rgba(249, 115, 22, .055));
    color: #fff5ed;
    font-weight: 780;
}

.defiant-select-option[aria-selected="true"]::after {
    border-color: var(--select-accent);
    background: var(--select-accent);
    box-shadow: 0 0 10px rgba(249, 115, 22, .72);
}

.defiant-select-option:disabled { opacity: .38; cursor: not-allowed; }
.defiant-select.is-disabled { opacity: .55; }
.defiant-select.is-disabled .defiant-select-trigger { cursor: not-allowed; }

.editor-toolbar .defiant-select { width: auto; min-width: 138px; }
.editor-toolbar .defiant-select-trigger { min-height: 32px; height: 32px; padding-block: 4px; border-radius: 7px; font-size: 12px; }
.editor-toolbar .defiant-select-menu { min-width: 190px; }
.item-filter-bar .defiant-select { min-width: 0; }

@media (max-width: 560px) {
    .defiant-select-menu { max-height: min(310px, 52vh); }
    .defiant-select-option { min-height: 46px; }
}
