
/* ============================================================
   v32 Global custom-select click fix
   ============================================================ */

/* Все кастомные списки должны принимать клики */
.custom-select,
.custom-select *,
.salary-v5-select,
.salary-v5-select *,
.salary-v5-month-popover,
.salary-v5-month-popover *{
  pointer-events:auto!important;
}

/* Открытые списки — выше таблиц, карточек и KPI */
.custom-select.is-open,
.salary-v5-select.is-open{
  position:relative!important;
  z-index:50000!important;
}

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

/* Важно: сами пункты — полноценные кнопки */
.custom-select__option,
.salary-v5-option,
.salary-v5-month-option{
  pointer-events:auto!important;
  cursor:pointer!important;
  position:relative!important;
  z-index:1!important;
}

/* Открытые списки не должны перекрываться таблицей */
.card:has(.custom-select.is-open),
.card:has(.salary-v5-select.is-open),
.reports-admin-card:has(.custom-select.is-open),
.salary-v5-hero:has(.salary-v5-select.is-open){
  overflow:visible!important;
  z-index:49000!important;
}

/* Если :has не поддерживается, резервные правила */
.reports-admin-card,
.reports-filter-grid,
.reports-filter-grid .field,
.salary-v5-hero,
.salary-v5-controls,
.salary-v5-field{
  overflow:visible!important;
}

/* Фикс видимости выбранного пункта */
.custom-select__option.is-selected,
.salary-v5-option.is-selected,
.salary-v5-option.is-active{
  font-weight:850!important;
}

/* Списки фильтров отчётов */
.reports-filter-grid .custom-select__menu{
  z-index:52000!important;
  max-height:320px!important;
}

/* Списки зарплаты */
.salary-v5-select__menu{
  z-index:52000!important;
  max-height:320px!important;
}

/* Чтобы кнопки "Сегодня/Сбросить/Обновить" не перекрывали открытый select */
.reports-filter-actions,
.salary-v5-actions{
  position:relative!important;
  z-index:3!important;
}

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

.reports-filter-grid .custom-select.is-open,
.salary-v5-controls .salary-v5-select.is-open{
  z-index:52000!important;
}

@media(max-width:720px){
  .custom-select.is-open::before{
    pointer-events:auto!important;
  }

  .custom-select__menu{
    z-index:53000!important;
  }
}

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