/* Futurating Header Actions — styles (v1.12.7) */

/* Базовая обёртка — на всю ширину блока Elementor, выравниваем справа на десктопе */
.fr-ha{ position:relative; display:block; width:100%; padding:0 !important; margin:0 !important; }
.fr-ha__row{
  display:flex; align-items:center; justify-content:flex-end;
  gap:var(--fr-ha-gap,18px);
}
.fr-ha__row > *{ margin:0 !important; padding:0 !important; } /* срезаем посторонние отступы от темы */

/* Кнопки-иконки — «голые» */
.fr-ha__btn{
  position:relative; display:inline-flex; align-items:center; justify-content:center;
  background:none!important; border:0!important; padding:0!important; margin:0!important; line-height:0;
  -webkit-tap-highlight-color: transparent;
}
.fr-ha__icon-wrap{ position:relative; display:inline-block; line-height:0; }
.fr-ha__icon-img, .fr-ha__btn svg{ width:30px; height:30px; display:block; }

/* Бейдж 24×24, ближе к центру иконки */
.fr-ha__badge{
  position:absolute; right:-8px; top:-8px;
  min-width:24px; height:24px; padding:0 8px;
  border-radius:24px; background:#3F7CDF; color:#fff;
  font-weight:400; font-size:14px; line-height:24px; text-align:center;
  pointer-events:none; white-space:nowrap;
}

/* Портал */
.fr-portal{ position:fixed; inset:0; pointer-events:none; z-index:99999; }
.fr-portal .fr-portal__panel{ position:absolute; pointer-events:auto; }

/* Панели — одинаковая вертикальная позиция (от иконки на 12px) */
.fr-ha__dropdown, .fr-ha__panel{
  position:absolute !important; z-index:40;
  min-width:280px; background:#fff; border:none;
  box-shadow:0 10px 30px rgba(0,0,0,.12); border-radius:14px;
  display:none !important; top:calc(100% + var(--fr-ha-dropdown-offset,12px));
}
.fr-ha__dropdown[aria-hidden="false"], .fr-ha__panel[aria-hidden="false"]{ display:block !important; }
.fr-ha__panel--search{ width:360px; max-width:92vw; }
.fr-ha__panel[data-panel="notifications"]{ width:360px; max-width:92vw; }

/* Внутренности панелей */
.fr-ha__dropdown-inner, .fr-ha__panel-inner{ padding:20px; overflow:visible; max-height:none; }

/* Меню */
.fr-ha__menu{ list-style:none; margin:0; padding:0; }
.fr-ha__menu-item{ margin:0; padding:0; display:block; }
.fr-ha__menu-link{ display:block; padding:8px 0; text-decoration:none; color:#111827; border-radius:10px; }
.fr-ha__menu-link:hover{ background:none; }
.fr-ha__divider{ width:100%; height:1px; background:#EDEDED; margin:8px 0; }
.fr-ha__menu > li.fr-ha__menu-item:last-child > .fr-ha__divider{ display:none; }

/* Поиск */
.fr-ha__sr{ position:absolute; left:-9999px; }
.fr-ha__search-wrap{ position:relative; }
.fr-ha__search{
  width:100%; height:38px; background:transparent !important;
  border:0 !important; border-bottom:1px solid #EDEDED !important; padding:0 !important;
  outline:none !important; box-shadow:none !important; border-radius:0 !important;
}
.fr-ha__search:focus, .fr-ha__search:active, .fr-ha__search:focus-visible{
  border-bottom:1px solid #EDEDED !important; outline:none !important; box-shadow:none !important;
}
.fr-ha__search::placeholder{ color:#a9a9a9; opacity:1; } /* второстепенный текст */
.fr-ha__search::-webkit-search-cancel-button{ -webkit-appearance:none; appearance:none; display:none; }
input[type="search"]::-ms-clear, input[type="search"]::-ms-reveal{ display:none; width:0; height:0; }
.fr-ha__clear{
  position:absolute; top:50%; right:0; transform:translateY(-50%);
  width:24px; height:24px; display:inline-flex; align-items:center; justify-content:center;
  background:none; border:0; padding:0; margin:0;
}

/* Результаты поиска — прокрутка внутри списка */
.fr-ha__results{
  list-style:none; margin:12px 0 0; padding:0;
  display:grid; gap:6px;
  max-height:50vh; overflow:auto; padding-right:8px; -webkit-overflow-scrolling:touch;
}
.fr-ha__results:empty{ display:none; margin:0; }
.fr-ha__result a{ display:flex; gap:8px; align-items:center; padding:10px; border-radius:8px; text-decoration:none; color:#111827; }
.fr-ha__result a:hover{ background:#F3F4F6; }
.fr-ha__result-type{ font-size:12px; color:#a9a9a9; }   /* второстепенный */
.fr-ha__result--empty{ color:#a9a9a9; padding:8px 0; }  /* второстепенный */

/* Уведомления */
.notification-item{ padding:10px 10px; border-radius:8px; box-sizing:border-box; }
.notification-item:hover{ background:#F3F4F6; }
.notification-item .notify-text{ color:#1f2937; margin-bottom:4px; }
.notification-item .notify-date{ color:#a9a9a9; font-size:13px; } /* второстепенный */
.no-notify{ padding:10px 6px; color:#a9a9a9; } /* второстепенный */
.fr-ha__loading{ color:#a9a9a9; } /* второстепенный */

/* Уведомления — скролл строго внутри окна + радиус панели не ломается */
.fr-ha__panel[data-panel="notifications"]{ overflow:hidden; } /* обрезаем содержимое по радиусу панели */
.fr-ha__panel[data-panel="notifications"] [data-notify-body]{
  max-height:50vh;
  overflow:auto;
  padding-right:8px;
  -webkit-overflow-scrolling:touch;
}

/* Кнопка «Прочитано» */
.mark-as-read{
  width:100%; margin-top:10px; height:40px; padding:0 12px;
  border:1px solid #d1d5db; border-radius:10px !important; background:#fff; cursor:pointer;
  display:flex; align-items:center; justify-content:center; font-weight:400;
}
.mark-as-read:hover{ background:#f3f4f6; }

/* ====== Адаптив ====== */

/* крупные планшеты / небольшие ноутбуки */
@media (max-width: 1200px){
  .fr-ha__icon-img, .fr-ha__btn svg{ width:28px; height:28px; }
}

/* планшеты */
@media (max-width: 992px){
  .fr-ha__icon-img, .fr-ha__btn svg{ width:26px; height:26px; }
}

/* мобильные */
@media (max-width: 767px){
  /* иконки по центру */
  .fr-ha__row{ align-items:center; justify-content:center; gap:16px; }

  /* меньше иконки, бейдж ближе */
  .fr-ha__icon-img, .fr-ha__btn svg{ width:22px; height:22px; }
  .fr-ha__badge{ right:-6px; top:-6px; min-width:20px; height:20px; line-height:20px; font-size:12px; }

  /* панели тянем на всю ширину с внешними отступами 16px */
  .fr-ha__dropdown, .fr-ha__panel{
    left:16px !important; right:16px !important; width:auto !important; min-width:0 !important;
    max-width:none !important;
  }
  .fr-ha__panel--search, .fr-ha__panel[data-panel="notifications"]{
    width:auto !important; max-width:none !important;
  }
}
