/* MitaBase Pro — a product of ETMITA · https://etmita.com
   Copyright © ETMITA. All rights reserved. */
/*
 * public/suggest.css — the address type-ahead (2026-09-07). One listbox
 * (#mt-sug) drawn at body level under the field it serves by
 * src/shared/address-suggest.ts → public/js/core/address-suggest.js.
 * It carries `mt-scope` as well, because the tokens below are declared
 * under that class and body is outside it — without it every colour
 * here resolves to nothing and the box draws see-through.
 * Token-native; sits above the dialogs (the dsp3 menus' band) and below
 * the ⌘K palette.
 */

.mt-sug {
  /* Above every dialog shell (z 100060) it is used inside — Neuer
     Auftrag, Stammdaten, Verlauf, Einstellungen — and below the tooltip
     and the drag ghost, which are allowed to cross it. */
  position: fixed; z-index: 100070;
  overflow-y: auto; overscroll-behavior: contain;
  padding: 6px; border-radius: 14px;
  border: 1px solid var(--border-default, var(--mb-line));
  background: var(--surface-card, var(--mb-white));
  color: var(--text-body, var(--mb-ink));
  box-shadow: var(--shadow-md, 0 14px 36px rgba(0, 0, 0, .18));
  font-family: var(--mb-font-sans), system-ui, sans-serif;
  animation: mt-sug-in var(--mb-dur-fast, 150ms) var(--mb-ease-out, ease-out);
  direction: ltr; text-align: start;
}
.mt-sug[hidden] { display: none !important; }
.mt-sug.is-above { animation-name: mt-sug-in-up; }
@keyframes mt-sug-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes mt-sug-in-up { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.mt-sug-row {
  display: flex; align-items: center; gap: 10px;
  min-height: 44px; padding: 7px 10px; border-radius: 9px;
  cursor: pointer; user-select: none;
  transition: background var(--mb-dur-fast, 150ms);
}
.mt-sug-row.is-active { background: var(--surface-inset, var(--mb-row)); }
.mt-sug-ic {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 9px;
  background: var(--surface-alt, var(--mb-alt)); color: var(--text-muted, var(--mb-muted));
}
.mt-sug-row.is-active .mt-sug-ic { background: var(--mb-ink); color: var(--mb-lime); }
.mt-sug-row.is-building .mt-sug-ic { color: var(--accent-text, var(--mb-lime-text)); }
.mt-sug-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.mt-sug-title { font-size: .84rem; font-weight: 700; color: var(--text-primary, var(--mb-ink)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mt-sug-sub { font-size: .72rem; color: var(--text-muted, var(--mb-muted)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mt-sug mark {
  background: transparent; color: var(--accent-text, var(--mb-lime-text));
  text-decoration: underline; text-decoration-color: var(--mb-lime); text-underline-offset: 2px;
}
.mt-sug-state { display: flex; flex-direction: column; gap: 3px; padding: 12px 10px; font-size: .78rem; color: var(--text-secondary, var(--mb-body)); }
.mt-sug-state b { font-weight: 700; color: var(--text-primary, var(--mb-ink)); }
.mt-sug-state span { font-size: .72rem; color: var(--text-muted, var(--mb-muted)); }
.mt-sug-foot {
  display: flex; gap: 6px; padding: 6px 10px 2px; margin-top: 2px;
  border-top: 1px solid var(--border-subtle, var(--mb-hairline));
  font-size: .64rem; color: var(--text-muted, var(--mb-muted));
}
.mt-sug-foot kbd {
  padding: 1px 5px; border-radius: 5px;
  border: 1px solid var(--border-subtle, var(--mb-hairline)); background: var(--surface-alt, var(--mb-alt));
  font-family: var(--mb-font-mono), monospace; font-size: .62rem;
}
@media (hover: none), (max-width: 767px) { .mt-sug-foot { display: none; } }
@media (prefers-reduced-motion: reduce) { .mt-sug { animation: none; } }
