.dropdown { position: relative; }

.dropdown__summary {
    height: 32px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0 10px 0 12px;
    border-radius: var(--radius-m);
    border: 1px solid var(--border-strong);
    white-space: nowrap;
    list-style: none;
    cursor: pointer;
}
.dropdown__summary::-webkit-details-marker { display: none; }
.dropdown__summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.dropdown--active > .dropdown__summary { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-text); }

.dropdown__label { color: var(--text-muted); }
.dropdown--active .dropdown__label { color: inherit; }
.dropdown__value { max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.dropdown__chevron { margin-left: 4px; color: var(--text-muted); transition: transform .15s; }
.dropdown[open] .dropdown__chevron { transform: rotate(180deg); }

.dropdown__panel {
    position: absolute;
    z-index: 30;
    top: calc(100% + 6px);
    left: 0;
    min-width: 200px;
    max-width: calc(100vw - 32px);
    max-height: 320px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 6px;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-l);
    box-shadow: var(--shadow-panel);
}

.dropdown__choice { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: var(--radius-s); white-space: nowrap; cursor: pointer; }
.dropdown__choice:hover { background: var(--surface-2); }
.dropdown__choice:has(input:checked) { background: var(--accent-soft); color: var(--accent-text); }
.dropdown__choice input { margin: 0; accent-color: var(--accent); }
.dropdown__icon { width: 16px; height: 16px; flex: none; object-fit: contain; }
