
/* ============================================================
   v33 FINAL: clickable custom selects + modal blur cleanup
   ============================================================ */

/* Закрытая/пустая модалка не должна оставлять блюр на странице */
#modalBackdrop:not(.show),
#modalBackdrop:empty,
.modal-backdrop:not(.show),
.modal-backdrop:empty{
  display:none!important;
  visibility:hidden!important;
  opacity:0!important;
  pointer-events:none!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
  background:transparent!important;
}

html:not(.modal-is-open) #modalBackdrop,
body:not(.modal-is-open) #modalBackdrop{
  display:none!important;
  pointer-events:none!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
}

/* Глобально возвращаем кликабельность всем кастомным спискам */
.custom-select,
.custom-select *,
.custom-select__trigger,
.custom-select__menu,
.custom-select__option,
.custom-select__option *,
.salary-v5-select,
.salary-v5-select *,
.salary-v5-select__trigger,
.salary-v5-select__menu,
.salary-v5-option,
.salary-v5-option *{
  pointer-events:auto!important;
}

/* Открытый список должен быть выше таблицы, blur-слоёв и соседних карточек */
.custom-select.is-open,
.salary-v5-select.is-open{
  position:relative!important;
  z-index:90000!important;
}

.custom-select__menu,
.salary-v5-select__menu{
  z-index:91000!important;
  pointer-events:auto!important;
}

.custom-select__option,
.salary-v5-option{
  cursor:pointer!important;
  position:relative!important;
  z-index:2!important;
  user-select:none!important;
}

/* Убираем мобильный затемняющий before у открытых select: он часто перехватывал клики */
.custom-select.is-open::before{
  content:none!important;
  display:none!important;
  pointer-events:none!important;
}

/* Отчёты */
.reports-admin-card,
.reports-filter-grid,
.reports-filter-grid .field{
  overflow:visible!important;
}

.reports-filter-grid{
  position:relative!important;
  z-index:20!important;
}

.reports-filter-grid .custom-select.is-open{
  z-index:92000!important;
}

.reports-filter-grid .custom-select__menu{
  z-index:93000!important;
  min-width:100%!important;
  width:max-content!important;
  max-width:min(420px, calc(100vw - 40px))!important;
  max-height:340px!important;
}

/* Зарплата */
.salary-v5-hero,
.salary-v5-controls,
.salary-v5-field{
  overflow:visible!important;
}

.salary-v5-controls{
  position:relative!important;
  z-index:20!important;
}

.salary-v5-select.is-open{
  z-index:92000!important;
}

.salary-v5-select__menu{
  z-index:93000!important;
}

/* У открытых списков пункт hover/selected должен быть явным */
.custom-select__option:hover,
.salary-v5-option:hover{
  background:#eef4ff!important;
  color:#1f4fd8!important;
}

.custom-select__option.is-selected,
.salary-v5-option.is-selected,
.salary-v5-option.is-active{
  background:#eef4ff!important;
  color:#1f4fd8!important;
  font-weight:850!important;
}

/* Не даём таблице перехватывать клики под dropdown */
.table-wrap,
.admin-reports-table{
  position:relative!important;
  z-index:1!important;
}

@media(max-width:720px){
  .custom-select__menu{
    z-index:93000!important;
  }
}

@media(max-width:620px){
  .salary-v5-select.is-open .salary-v5-select__menu{
    z-index:93000!important;
  }
}
