
/* ============================================================
   v31 Salary Russian month + custom select open fix
   ============================================================ */

/* Фильтры зарплаты должны позволять выпадающим меню перекрывать карточки ниже */
.salary-v5-page,
.salary-v5,
.salary-v5-hero,
.salary-v5-controls,
.salary-v5-field,
.salary-v5-input-wrap{
  overflow:visible!important;
}

.salary-v5-hero{
  z-index:30!important;
}

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

.salary-v5-field{
  position:relative!important;
}

.salary-v5-select{
  position:relative!important;
  z-index:40!important;
}

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

.salary-v5-select__trigger{
  min-height:46px!important;
  height:46px!important;
  padding:0 13px!important;
  border-radius:15px!important;
}

.salary-v5-select__value{
  min-width:0!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
  font-weight:750!important;
}

.salary-v5-select__menu{
  position:absolute!important;
  top:calc(100% + 8px)!important;
  left:0!important;
  right:auto!important;
  z-index:21000!important;
  min-width:100%!important;
  width:max-content!important;
  max-width:min(420px, calc(100vw - 48px))!important;
  max-height:310px!important;
  overflow:auto!important;
  padding:7px!important;
  border-radius:16px!important;
  background:#fff!important;
  border:1px solid #dbe5f2!important;
  box-shadow:0 22px 55px rgba(15,23,42,.18)!important;
}

.salary-v5-option{
  width:100%!important;
  min-width:180px!important;
  min-height:40px!important;
  padding:10px 11px!important;
  border-radius:12px!important;
  white-space:normal!important;
  line-height:1.25!important;
}

/* В старом CSS был is-active, в JS используется is-selected */
.salary-v5-option.is-selected,
.salary-v5-option.is-active{
  background:var(--brand-soft)!important;
  color:var(--brand-strong)!important;
  font-weight:800!important;
}

.salary-v5-option.is-selected .salary-v5-option__check,
.salary-v5-option.is-active .salary-v5-option__check{
  opacity:1!important;
}

.salary-v5-option__check svg{
  width:16px!important;
  height:16px!important;
}

/* Поле месяца */
.salary-v5-month-display{
  cursor:pointer!important;
  height:46px!important;
  min-height:46px!important;
  padding-right:44px!important;
  font-weight:750!important;
}

.salary-v5-icon-btn{
  position:relative!important;
  z-index:2!important;
}

/* Русский кастомный выбор месяца */
.salary-v5-month-popover{
  position:absolute!important;
  top:calc(100% + 8px)!important;
  left:0!important;
  width:318px!important;
  max-width:min(318px, calc(100vw - 48px))!important;
  padding:14px!important;
  border-radius:20px!important;
  border:1px solid #dbe5f2!important;
  background:#fff!important;
  box-shadow:0 24px 60px rgba(15,23,42,.18)!important;
  z-index:22000!important;
}

.salary-v5-month-head{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:12px!important;
  margin-bottom:12px!important;
}

.salary-v5-month-head strong{
  color:#1f2937!important;
  font-size:15px!important;
  font-weight:900!important;
  line-height:1!important;
}

.salary-v5-month-nav{
  width:34px!important;
  height:34px!important;
  border-radius:12px!important;
  border:1px solid #e4eaf3!important;
  background:#f8fbff!important;
  color:#667085!important;
  font-size:18px!important;
  font-weight:900!important;
  cursor:pointer!important;
}

.salary-v5-month-nav:hover{
  color:#1f4fd8!important;
  background:#eef4ff!important;
}

.salary-v5-month-grid{
  display:grid!important;
  grid-template-columns:repeat(3, minmax(0, 1fr))!important;
  gap:8px!important;
}

.salary-v5-month-option{
  min-height:40px!important;
  padding:9px 8px!important;
  border-radius:13px!important;
  border:1px solid transparent!important;
  background:#f8fbff!important;
  color:#344054!important;
  font-size:12.5px!important;
  line-height:1!important;
  font-weight:800!important;
  cursor:pointer!important;
  text-align:center!important;
}

.salary-v5-month-option:hover{
  background:#eef4ff!important;
  color:#1f4fd8!important;
}

.salary-v5-month-option.is-selected{
  color:#fff!important;
  background:#2f6bff!important;
  border-color:#2f6bff!important;
  box-shadow:0 10px 22px rgba(47,107,255,.24)!important;
}

.salary-v5-month-actions{
  display:flex!important;
  margin-top:12px!important;
}

.salary-v5-month-actions .salary-v5-btn{
  width:100%!important;
  justify-content:center!important;
  min-height:38px!important;
}

/* Не даём блокам ниже перекрывать открытые списки */
.salary-v5-summary,
.salary-v5-main,
.salary-v5-card{
  position:relative!important;
  z-index:1!important;
}

/* Ноутбуки */
@media(max-width:1180px){
  .salary-v5-select__menu{
    max-width:min(360px, calc(100vw - 48px))!important;
  }
}

/* Мобильная версия: все custom-select становятся нижним sheet, но не ломаются */
@media(max-width:620px){
  .salary-v5-select.is-open .salary-v5-select__menu{
    position:fixed!important;
    top:auto!important;
    left:0!important;
    right:0!important;
    bottom:0!important;
    width:100%!important;
    max-width:100%!important;
    max-height:60vh!important;
    border-radius:20px 20px 0 0!important;
    padding:10px 10px calc(10px + env(safe-area-inset-bottom))!important;
    z-index:50000!important;
    box-shadow:0 -20px 50px rgba(15,23,42,.22)!important;
  }

  .salary-v5-option{
    min-width:0!important;
    padding:13px 12px!important;
  }

  .salary-v5-month-popover{
    position:fixed!important;
    left:12px!important;
    right:12px!important;
    bottom:12px!important;
    top:auto!important;
    width:auto!important;
    max-width:none!important;
    z-index:50000!important;
  }
}
