/* =========================================================================
   DragonInit design system — TYPEAHEAD MULTISELECT (di-ta-*)
   Re-skin of the owner's typeahead-multiselect widget onto di-* tokens
   (the prototype's lime/DM-Mono palette was discarded). Namespaced di-ta-*,
   safe to load globally (no bare-element selectors, no body background).
   Pairs with wwwroot/js/components/typeahead-multiselect.js. Reference: /style-guide.
   ========================================================================= */

.di-ta-container { position: relative; }

/* ---------- input + chips shell ---------- */
.di-ta-input-wrap {
  background: var(--panel, #211C30);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm, 9px);
  padding: 8px 10px;
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  cursor: text; min-height: 46px;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.di-ta-input-wrap:focus-within {
  border-color: var(--ember);
  box-shadow: 0 0 0 3px rgba(233,162,59,.18);
}

.di-ta-input {
  background: none; border: none; outline: none;
  color: var(--vellum);
  font-family: "Hanken Grotesk", system-ui, sans-serif;
  font-size: .95rem;
  flex: 1; min-width: 120px; padding: 2px 0;
}
.di-ta-input::placeholder { color: var(--muted); }

/* ---------- chips (pills) ---------- */
.di-ta-pill {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(233,162,59,.12);
  border: 1px solid rgba(233,162,59,.34);
  color: var(--ember-hi);
  border-radius: 7px;
  padding: 3px 6px 3px 10px;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: .8rem; font-weight: 500; line-height: 1.4; white-space: nowrap;
  animation: di-ta-pill-in .18s cubic-bezier(.34,1.56,.64,1) forwards;
}
.di-ta-pill-label { pointer-events: none; }
@keyframes di-ta-pill-in  { from { opacity:0; transform:scale(.7); } to { opacity:1; transform:scale(1); } }
@keyframes di-ta-pill-out { from { opacity:1; transform:scale(1);  } to { opacity:0; transform:scale(.6); } }

.di-ta-pill-remove {
  display: inline-flex; align-items: center; justify-content: center;
  background: none; border: none; color: var(--ember-hi);
  opacity: .55; cursor: pointer; padding: 0;
  width: 16px; height: 16px; border-radius: 3px;
  font-size: .85rem; line-height: 1; flex-shrink: 0;
  transition: opacity .15s, background .15s, transform .15s;
}
.di-ta-pill-remove:hover { opacity: 1; background: rgba(233,162,59,.2); transform: scale(1.15); }

/* ---------- dropdown ---------- */
.di-ta-dropdown {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  background: var(--obsidian-2, #1C1830);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm, 9px);
  box-shadow: 0 20px 60px rgba(0,0,0,.55), 0 4px 16px rgba(0,0,0,.4);
  z-index: 1080;                 /* above Bootstrap modal content (see Day-6 overflow note) */
  overflow: hidden auto; max-height: 260px; display: none;
}
.di-ta-dropdown.open { display: block; animation: di-ta-drop-in .16s cubic-bezier(.34,1.3,.64,1) forwards; }
@keyframes di-ta-drop-in { from { opacity:0; transform:translateY(-6px) scaleY(.96); } to { opacity:1; transform:translateY(0) scaleY(1); } }
.di-ta-dropdown::-webkit-scrollbar { width: 4px; }
.di-ta-dropdown::-webkit-scrollbar-track { background: transparent; }
.di-ta-dropdown::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }

.di-ta-dropdown-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 13px; cursor: pointer;
  font-family: "Hanken Grotesk", system-ui, sans-serif; font-size: .9rem;
  color: var(--vellum); transition: background .12s, color .12s;
  border-bottom: 1px solid rgba(255,255,255,.04);
}
.di-ta-dropdown-item:last-child { border-bottom: none; }
.di-ta-dropdown-item:hover,
.di-ta-dropdown-item.active   { background: rgba(233,162,59,.12); color: var(--ember-hi); }
.di-ta-dropdown-item.selected { color: var(--muted); }

.di-ta-check-icon {
  width: 16px; height: 16px; border-radius: 4px;
  border: 1.5px solid var(--line); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: .65rem; transition: all .15s;
}
.di-ta-dropdown-item.selected .di-ta-check-icon {
  background: var(--ember); border-color: var(--ember); color: #241703;
}

.di-ta-match-highlight { color: var(--ember-hi); font-weight: 700; }

.di-ta-dropdown-empty {
  padding: 13px; text-align: center;
  color: var(--muted); font-family: "Space Mono", monospace; font-size: .8rem;
}

/* ---------- mobile tap-to-type ---------- */
.di-ta-type-btn {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--obsidian-2, #1C1830);
  border: 1px dashed var(--line); border-radius: 6px;
  color: var(--muted);
  font-family: "Space Mono", monospace; font-size: .75rem;
  padding: 4px 10px; cursor: pointer; white-space: nowrap;
  transition: all .15s;
}
.di-ta-type-btn:hover, .di-ta-type-btn:focus {
  color: var(--ember-hi); border-color: var(--ember);
  background: rgba(233,162,59,.1); outline: none;
}
