/* ═══ EG-UI-V2 (2026-10-10) — мобільний пошук у боковому меню ═══
   Активний ТІЛЬКИ під ?eg-ui=new (body.eg-ui-v2). Самодостатній файл. */

/* ── Рядок пошуку: поле + окрема кругла кнопка ───────────────── */
@media (max-width:767px){
  .m-menu-search.eg-ms2{
    display:flex !important; align-items:center !important; gap:10px !important;
    padding:12px 14px !important; background:#fff !important;
    border-bottom:1px solid #eef2f7 !important;
  }
  .m-menu-search.eg-ms2 .eg-ms2-field{
    position:relative; flex:1 1 auto; min-width:0;
    display:flex; align-items:center; gap:6px;
    height:46px; padding:0 6px 0 12px;
    border:1px solid #dfe6f3; border-radius:12px; background:#fff;
  }
  .m-menu-search.eg-ms2 .eg-ms2-field .s-icn{ display:inline-flex; color:#64748b; flex:none; }
  .m-menu-search.eg-ms2 input{
    flex:1 1 auto !important; min-width:0; height:44px !important;
    padding:0 44px 0 0 !important; margin:0 !important; border:0 !important;
    background:transparent !important; font-size:15px !important; color:#0f172a !important;
  }
  .m-menu-search.eg-ms2 input::-webkit-search-cancel-button{ display:none; }
  /* Хрестик очищення — ABSOLUTE всередині поля (right:10px), щоб НІКОЛИ не налазив на «Шукати» */
  .m-menu-search.eg-ms2 .eg-ms2-field{ position:relative; }
  .m-menu-search.eg-ms2 .eg-ms2-clear{
    position:absolute; right:10px; top:50%; transform:translateY(-50%);
    width:32px; height:32px; display:none; place-items:center; z-index:2;
    border:0; border-radius:50%; background:#eef1f7;
    color:#64748b; font-size:14px; line-height:1; padding:0; cursor:pointer;
  }
  .m-menu-search.eg-ms2 .eg-ms2-clear.on{ display:grid; }
  .m-menu-search.eg-ms2 .eg-ms2-clear:active{ background:#e2e8f0; color:#1e293b; }
  .m-menu-search.eg-ms2 .eg-ms2-clear::after{
    content:''; position:absolute; top:-6px; right:-6px; width:44px; height:44px; /* зона ≥44px */
  }
  /* Кругла «Шукати» — окрема, відступ ≥8px */
  .m-menu-search.eg-ms2 .m-menu-search-go.eg-ms2-go{
    flex:0 0 46px !important; width:46px !important; height:46px !important; margin-left:8px !important;
    border-radius:50% !important; display:grid !important; place-items:center !important;
    background:#1d3fb3 !important; color:#fff !important; border:0 !important; padding:0 !important;
  }
  .m-menu-search.eg-ms2 .eg-ms2-go:active{ transform:scale(.94); }
  /* старий хрестик у v2 не потрібен */
  .m-menu-search.eg-ms2 .eg-ls-clear{ display:none !important; }

  /* Закриття меню — проста іконка без заливки, не як «очистити» */
  body.eg-ui-v2 #eg-mmenu .m-menu-h button{
    width:44px !important; height:44px !important; border:0 !important;
    background:transparent !important; color:#334155 !important; border-radius:12px !important;
  }
}

/* ── Дропдаун результатів (портал на body) ───────────────────── */
body.eg-ui-v2 .eg-ls-drop{ border-radius:16px; }
body.eg-ui-v2 .eg-ls-item .eg-ls-name{
  white-space:normal; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical;
  overflow:hidden; word-break:break-word;
}
/* «Показати всі результати (N)» — закріплена внизу, велика зона натискання */
body.eg-ui-v2 .eg-ls-all{
  position:sticky; bottom:0; z-index:2; min-height:52px;
  padding:15px 16px !important; font-size:14px !important;
  padding-bottom:calc(15px + env(safe-area-inset-bottom, 0px)) !important;
  box-shadow:0 -8px 18px -12px rgba(15,23,42,.28);
}
/* фон сторінки не скролиться, поки відкритий список */
body.eg-ls-lock{ overflow:hidden !important; }

body.eg-ui-v2 .eg-ls-pop-t{padding:11px 14px 0;font-size:12px;font-weight:700;color:#64748b;letter-spacing:.04em;text-transform:uppercase}
