/* Listes communes, issues des filtres de l’historique. */
.app-select { --select-accent: var(--blue); position: relative; min-width: 0; width: 100%; }
html[data-theme="dark"] .app-select { --select-accent: #93c5fd; }
.app-select .app-select-button {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    width: 100%; min-height: 46px; padding: 11px 14px;
    border: 1px solid var(--border); border-radius: 12px;
    background: var(--surface-solid); color: var(--text); font: inherit;
    text-align: left; cursor: pointer;
}
.app-select-button span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-select-button::after {
    content: ''; flex: 0 0 8px; width: 8px; height: 8px;
    border-right: 2px solid var(--select-accent); border-bottom: 2px solid var(--select-accent);
    transform: translateY(-2px) rotate(45deg);
}
.app-select-button:focus-visible { outline: 2px solid var(--select-accent); outline-offset: 3px; }
.app-select-button[aria-expanded="true"] { border-color: var(--select-accent); }
.app-select-options {
    position: fixed; z-index: 120; inset: auto; margin: 0; box-sizing: border-box;
    max-height: min(280px, 40dvh); overflow-y: auto; overscroll-behavior: contain;
    padding: 5px; border: 1px solid var(--border); border-radius: 12px;
    background: var(--surface-solid); color: var(--text); box-shadow: var(--shadow-soft, 0 12px 30px rgba(15,23,42,.16));
}
.app-select-options[hidden] { display: none; }
.app-select-option { padding: 10px 12px; border-radius: 8px; cursor: pointer; overflow-wrap: anywhere; }
.app-select-option:not([aria-disabled="true"]):hover, .app-select-option.is-active { background: var(--blue-soft, var(--surface-hover)); color: var(--select-accent); }
.app-select-option[aria-selected="true"] { font-weight: 700; }
.app-select-option[aria-disabled="true"] { opacity: .55; cursor: default; }
.app-select .app-select-button:disabled { opacity: .6; cursor: not-allowed; }
.app-select .app-select-button[aria-invalid="true"] { border-color: var(--red); }
.app-select-native {
    position: absolute !important; bottom: 0; left: 0;
    width: 1px !important; height: 1px !important; min-height: 0 !important;
    margin: 0 !important; padding: 0 !important; opacity: 0; pointer-events: none;
}
.app-select-error { display: block; margin-top: 6px; color: var(--red); font-size: .85rem; }
.app-select-error[hidden] { display: none; }
.space-switch-row > .app-select { flex: 1 1 auto; width: 0; }
.space-switch-row .app-select-button { min-height: 38px; padding: 8px 10px; font-size: .82rem; }
@media (pointer: coarse) {
    .app-select .app-select-button, .app-select-option { min-height: 44px; }
}

