:root{
  --ms-maxw: 980px;
  --ms-radius: 12px;
  --ms-overlay: rgba(17,24,39,.55);
  --ms-bg: #fff;
  --ms-text: #111827;
  --ms-muted: #6b7280;
  --ms-primary: #4f46e5;
  --ms-itemh: 84px;
}
.ms-locked{ overflow:hidden; }

.dayava-ms-overlay{
  position:fixed; inset:0; background:var(--ms-overlay); opacity:0; pointer-events:none; transition:.2s ease;
  z-index:99998;
}
.dayava-ms-overlay.is-open{ opacity:1; pointer-events:auto; }

.dayava-ms{
  position:fixed; left:50%; top:3vh; transform:translateX(-50%) translateY(-10px);
  width:min(96vw, var(--ms-maxw)); background:var(--ms-bg); color:var(--ms-text);
  border-radius:var(--ms-radius); box-shadow:0 10px 40px rgba(0,0,0,.18);
  z-index:99999; opacity:0; pointer-events:none; transition:opacity .2s ease, transform .2s ease;
  max-height:94vh; display:flex; flex-direction:column;
}
.dayava-ms.is-open{ opacity:1; pointer-events:auto; transform:translateX(-50%) translateY(0); }

.dayava-ms__head{ padding:14px; border-bottom:1px solid #eee; display:flex; align-items:center; gap:8px; }
#dayava-ms-input{ flex:1; height:44px; border:1px solid #e5e7eb; border-radius:10px; padding:0 12px; font-size:16px; outline:none; }
.dayava-ms__close{ width:36px; height:36px; border:none; background:#f3f4f6; border-radius:10px; cursor:pointer; font-size:22px; line-height:1; }
.dayava-ms__body{ overflow:auto; padding:8px 10px; min-height:160px; max-height:calc(94vh - 140px); }
.dayava-ms__list{ display:flex; flex-direction:column; gap:8px; }
.dayava-ms__item{ display:flex; gap:12px; align-items:center; padding:10px; border-radius:12px; text-decoration:none; color:inherit; min-height:var(--ms-itemh); }
.dayava-ms__item:hover{ background:#f9fafb; }
.dayava-ms__item .it-img{ width:64px; height:64px; object-fit:cover; border-radius:10px; background:#f3f4f6; }
.dayava-ms__item .it-title{ font-weight:600; }
.dayava-ms__item .it-sub{ color:var(--ms-muted); font-size:12px; margin-top:2px; }
.dayava-ms__placeholder, .dayava-ms__empty{ padding:16px; color:var(--ms-muted); }

.dayava-ms__all{ margin:8px 10px 12px; align-self:flex-end; text-decoration:none; color:var(--ms-primary); font-weight:700; }
@media (max-width:640px){
  .dayava-ms{ top:0; border-bottom-left-radius:0; border-bottom-right-radius:0; width:100vw; max-height:100vh; }
  .dayava-ms__body{ max-height:calc(100vh - 150px); }
}
