/* ==========================================================================
   Biz Eye View — global searchable select (the "native Tailwind" component,
   based on the Searchable Select mock). Loaded after tailwind.css.
   Brand dark: #0c101d surface, #1e293b lines, #6366f1 accent.
   ========================================================================== */

/* ---- wrapper + hidden original ------------------------------------------ */
/* Layout width mirrors the ORIGINAL select: content-sized by default (native
   select behaviour) and promoted to 100% by JS only when the original filled
   its parent — a forced 100% breaks wrap-flex hosts such as the AI topbar. */
.aw-sel { position: relative; display: inline-block; max-width: 100%; vertical-align: middle; }
.aw-sel select[hidden] { display: none !important; }

/* ---- trigger: ONE fixed height (32px), native-select feel ---------------- */
.aw-sel-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  height: 32px;
  padding: 0 8px 0 10px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid #1e293b;
  border-radius: 9px;
  color: #e2e8f0;
  font-family: inherit;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.aw-sel-trigger:hover { background: rgba(255, 255, 255, .08); }
.aw-sel-trigger:focus-visible,
.aw-sel.is-open .aw-sel-trigger {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, .28);
  outline: none;
}
.aw-sel-value {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #e2e8f0;
}
.aw-sel-value.is-placeholder { color: #64748b; }
.aw-sel-caret {
  display: grid;
  place-items: center;
  flex: none;
  width: 20px;
  height: 20px;
  border: 1px solid #1e293b;
  border-radius: 6px;
  background: #0d1322;
  color: #94a3b8;
  transition: transform .18s ease, color .15s ease, border-color .15s ease;
}
.aw-sel.is-open .aw-sel-caret {
  transform: rotate(180deg);
  color: #a5b4fc;
  border-color: #6366f1;
}

/* ---- panel: pinned fixed by JS at a clean 6px gap, above everything ------ */
/* `hidden` is toggled by select.js. Declaring the hide rule here as well means
   the panel still starts closed (and still closes) even if a Tailwind build
   ever purges the `.hidden` utility from tailwind.css. */
.aw-sel-pop.hidden,
.aw-sel-empty.hidden { display: none !important; }
.aw-sel-pop {
  position: fixed;
  /* Largest z-index browsers honour; anything larger is clamped anyway. */
  z-index: 2147483647;
  margin-top: 6px;
  min-width: 180px;
  overflow: hidden;
  background: #0c101d;
  border: 1px solid #1e293b;
  border-radius: 12px;
  box-shadow: 0 22px 50px -18px rgba(0, 0, 0, .65), 0 0 0 1px rgba(255, 255, 255, .05);
  animation: awSelIn .18s ease-out both;
}
@keyframes awSelIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---- search row ---------------------------------------------------------- */
.aw-sel-search { position: relative; background: rgba(255, 255, 255, .03); border-bottom: 1px solid rgba(255, 255, 255, .06); }
.aw-sel-search > svg {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 13px;
  height: 13px;
  color: #64748b;
  pointer-events: none;
}
.aw-sel-input {
  width: 100%;
  padding: 9px 10px 9px 31px;
  background: transparent;
  border: 0;
  outline: none;
  color: #e2e8f0;
  font-family: inherit;
  font-size: 12px;
}
.aw-sel-input::placeholder { color: #64748b; }

/* ---- options list + premium scrollbar ------------------------------------ */
.aw-sel-list { list-style: none; margin: 0; padding: 4px; max-height: 262px; overflow-y: auto; }
.aw-sel-list::-webkit-scrollbar { width: 6px; }
.aw-sel-list::-webkit-scrollbar-track { background: transparent; border-radius: 8px; }
.aw-sel-list::-webkit-scrollbar-thumb { background: #1e293b; border-radius: 8px; }
.aw-sel-list::-webkit-scrollbar-thumb:hover { background: #334155; }
.aw-sel-group {
  padding: 9px 10px 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #64748b;
}
.aw-sel-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  margin: 2px 0;
  border-radius: 8px;
  font-size: 12.5px;
  color: #cbd5e1;
  cursor: pointer;
  transition: background-color .12s ease, color .12s ease;
}
.aw-sel-opt:hover,
.aw-sel-opt.is-hi {
  background: rgba(99, 102, 241, .16);
  color: #fff;
}
.aw-sel-dot {
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 99px;
  background: #334155;
  transition: background-color .12s ease, transform .12s ease;
}
.aw-sel-opt:hover .aw-sel-dot,
.aw-sel-opt.is-hi .aw-sel-dot { background: #818cf8; }
.aw-sel-opt.is-on { background: #6366f1; color: #fff; }
.aw-sel-opt.is-on .aw-sel-dot { background: #fff; transform: scale(1.15); }
.aw-sel-opt .aw-sel-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aw-sel-check { display: none; flex: none; width: 13px; height: 13px; color: #fff; }
.aw-sel-opt.is-on .aw-sel-check { display: block; }
.aw-sel-empty { padding: 14px; text-align: center; font-size: 12px; color: #64748b; }
