/* HVSZ_GLOBAL_AUTOCOMPLETE_V2 */

/*
 * Common visual language for the legacy .ac-box autocomplete family.
 * Search/data/selection logic remains owned by the original components.
 */

body.ui-v2-shell .ac-box{
  box-sizing:border-box;
  max-height:360px !important;
  overflow-x:hidden !important;
  overflow-y:auto !important;

  background:var(--v2-elevated,#ffffff) !important;
  color:var(--v2-text,#111827) !important;

  border:1px solid var(--v2-border-strong,#d1d5db) !important;
  border-radius:12px !important;

  box-shadow:
    0 18px 46px rgba(0,0,0,.22),
    0 2px 8px rgba(0,0,0,.12) !important;

  scrollbar-width:thin;
  scrollbar-color:var(--v2-border-strong,#777) transparent;
}

html[data-theme="dark"] body.ui-v2-shell .ac-box{
  background:var(--v2-elevated,#22252a) !important;
  color:var(--v2-text,#f3f5f7) !important;
  border-color:var(--v2-border-strong,#4b5058) !important;

  box-shadow:
    0 20px 50px rgba(0,0,0,.55),
    0 2px 10px rgba(0,0,0,.35) !important;
}

/*
 * Portalled dropdowns are detached from modal/form overflow containers.
 */
body.ui-v2-shell .ac-box.hvsz-ac-v2-portal{
  position:fixed !important;
  z-index:20010 !important;
  right:auto !important;
  bottom:auto;
  margin:0 !important;
}

/*
 * Results use the same visual hierarchy as the Tudjon róla picker.
 */
body.ui-v2-shell .ac-box.hvsz-ac-v2-portal .ac-item{
  display:flex !important;
  flex-direction:column !important;
  align-items:stretch !important;
  justify-content:flex-start !important;

  width:100%;
  box-sizing:border-box;

  gap:3px !important;
  padding:10px 12px !important;

  background:transparent !important;
  color:inherit !important;

  border:0 !important;
  border-bottom:1px solid var(--v2-border,#3a3e45) !important;

  cursor:pointer;
}

body.ui-v2-shell .ac-box.hvsz-ac-v2-portal .ac-item:last-child{
  border-bottom:0 !important;
}

body.ui-v2-shell .ac-box.hvsz-ac-v2-portal .ac-item:hover,
body.ui-v2-shell .ac-box.hvsz-ac-v2-portal .ac-item:focus-visible{
  background:rgba(127,127,127,.13) !important;
  color:inherit !important;
  outline:none;
}

html[data-theme="dark"] body.ui-v2-shell
.ac-box.hvsz-ac-v2-portal .ac-item:hover,
html[data-theme="dark"] body.ui-v2-shell
.ac-box.hvsz-ac-v2-portal .ac-item:focus-visible{
  background:rgba(255,255,255,.08) !important;
}

body.ui-v2-shell .ac-box.hvsz-ac-v2-portal .ac-main{
  display:flex !important;
  align-items:baseline !important;
  flex-wrap:wrap !important;
  gap:6px !important;

  width:100%;
  color:inherit !important;
  font-weight:700;
}

body.ui-v2-shell .ac-box.hvsz-ac-v2-portal .ac-email-inline{
  color:var(--v2-muted,currentColor) !important;
  font-size:12px !important;
  font-weight:500 !important;
  opacity:.82 !important;
}

body.ui-v2-shell .ac-box.hvsz-ac-v2-portal .ac-sub{
  display:block;
  width:100%;

  color:var(--v2-muted,currentColor) !important;
  font-size:12px !important;
  line-height:1.35;
  opacity:.82 !important;
}

body.ui-v2-shell .ac-box.hvsz-ac-v2-portal .ac-empty{
  padding:11px 12px !important;
  color:var(--v2-muted,currentColor) !important;
  font-size:12px !important;
  opacity:.85 !important;
}

@media(max-width:760px){
  body.ui-v2-shell .ac-box{
    max-height:280px !important;
  }
}
