/* The popover sits over the transcript and leaves the reply controls in place. */
.preset-autocomplete { position: absolute; z-index: 5; left: max(10px, var(--page-safe-left)); right: max(10px, var(--page-safe-right)); bottom: calc(100% + 6px); display: flex; flex-direction: column; max-height: 300px; max-height: min(42vh, 300px); overflow: hidden; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); color: var(--ink); box-shadow: 0 8px 24px var(--shadow-strong); }
.preset-autocomplete[hidden], .preset-autocomplete-retry[hidden], .preset-autocomplete-more[hidden] { display: none; }
.preset-autocomplete-header { display: flex; flex: none; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; padding-left: 14px; border-bottom: 1px solid var(--line); }
.preset-autocomplete-header strong { font-size: 13px; color: var(--muted); }
.preset-autocomplete-close { width: 44px; height: 44px; flex: none; padding: 0; border: 0; background: transparent; color: var(--muted); font-size: 24px; }
.preset-autocomplete-list { min-height: 0; overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; }
.preset-autocomplete-option { display: flex; flex-direction: column; gap: 3px; width: 100%; min-height: 58px; padding: 9px 14px; border: 0; border-radius: 0; background: transparent; color: var(--ink); text-align: start; }
.preset-autocomplete-option + .preset-autocomplete-option { border-top: 1px solid var(--line); }
.preset-autocomplete-option strong { display: block; max-width: 100%; overflow-wrap: anywhere; font-size: 14px; font-weight: 600; }
.preset-autocomplete-option span { display: block; width: 100%; overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; font-size: 12px; line-height: 1.4; }
.preset-autocomplete-option[aria-selected="true"], .preset-autocomplete-option:hover { background: var(--accent-soft); }
.preset-autocomplete-option[aria-selected="true"] strong { color: var(--accent); }
.preset-autocomplete-status:not(:empty) { padding: 14px; font-size: 13px; line-height: 1.5; color: var(--muted); }
.preset-autocomplete-more { flex: none; padding: 7px 14px; border-top: 1px solid var(--line); color: var(--muted); text-align: center; font-size: 11px; line-height: 1.4; }
.preset-autocomplete-retry { flex: none; align-self: start; min-height: 44px; margin: 0 14px 10px; padding: 0 16px; border: 1px solid var(--line); border-radius: var(--pill); background: var(--soft); color: var(--ink); font-size: 14px; }
.preset-autocomplete-close:focus-visible, .preset-autocomplete-retry:focus-visible, .preset-autocomplete-option:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; }
