/* W40 — پالت جست‌وجوی سراسری + هاب موبایل‌اول پنل */

/* ── پالت ── */
html body[class][class][class] .fnd40 {
  position: fixed; inset: 0; z-index: 100000; display: none;
  background: rgba(3, 7, 13, .72); backdrop-filter: blur(7px);
  padding: 9vh 16px 16px;
  direction: rtl; font-family: 'Vazirmatn', Tahoma, sans-serif;
}
html body[class][class][class] .fnd40.fnd40-on { display: block; animation: fnd40fade .18s ease both; }
@keyframes fnd40fade { from { opacity: 0 } to { opacity: 1 } }

html body[class][class][class] .fnd40-box {
  width: min(620px, 100%); margin: 0 auto; overflow: hidden;
  border-radius: 20px; border: 1px solid rgba(224, 184, 98, .3);
  background: linear-gradient(160deg, rgba(18, 34, 52, .99), rgba(7, 14, 22, .99));
  box-shadow: 0 30px 70px rgba(0, 0, 0, .62);
  animation: fnd40pop .24s cubic-bezier(.22, .8, .25, 1) both;
}
@keyframes fnd40pop { from { transform: translateY(-14px) scale(.985); opacity: 0 } to { transform: none; opacity: 1 } }

html body[class][class][class] .fnd40-hd {
  display: flex; align-items: center; gap: 11px; padding: 14px 16px;
  border-bottom: 1px solid rgba(224, 184, 98, .18);
}
html body[class][class][class] .fnd40-hd > svg { width: 20px; height: 20px; color: #e0b862; flex: 0 0 auto; }
html body[class][class][class] .fnd40-in {
  flex: 1 1 auto; min-width: 0; min-height: 40px; border: 0; outline: 0; background: transparent;
  font-family: inherit; font-size: 15.5px; font-weight: 600;
  color: #f1f5f9; -webkit-text-fill-color: #f1f5f9;
}
html body[class][class][class] .fnd40-in::placeholder { color: #7e8ea3; font-weight: 500; }
html body[class][class][class] .fnd40-in::-webkit-search-cancel-button { filter: invert(.7); }
html body[class][class][class] .fnd40-esc {
  flex: 0 0 auto; font-size: 10.5px; font-weight: 800; letter-spacing: .5px; color: #8fa3bb;
  border: 1px solid rgba(255, 255, 255, .16); border-radius: 7px; padding: 3px 7px;
}

html body[class][class][class] .fnd40-res { max-height: min(56vh, 470px); overflow: auto; padding: 8px; }
html body[class][class][class] .fnd40-res[aria-busy="true"] { opacity: .55; }
html body[class][class][class] .fnd40-g {
  display: flex; align-items: center; gap: 7px; padding: 10px 10px 6px;
  font-size: 11.5px; font-weight: 800; color: #8fa3bb;
}
html body[class][class][class] .fnd40-g svg { width: 14px; height: 14px; }

html body[class][class][class] .fnd40-it {
  display: flex; align-items: center; gap: 11px; cursor: pointer;
  padding: 10px 11px; border-radius: 13px; border: 1px solid transparent;
  transition: background .15s ease, border-color .15s ease;
}
html body[class][class][class] .fnd40-it.on,
html body[class][class][class] .fnd40-it:hover {
  background: rgba(224, 184, 98, .11); border-color: rgba(224, 184, 98, .3);
}
html body[class][class][class] .fnd40-ix {
  width: 34px; height: 34px; flex: 0 0 auto; border-radius: 10px; display: grid; place-items: center;
  background: rgba(224, 184, 98, .12); color: #f7e4a8;
}
html body[class][class][class] .fnd40-ix svg { width: 17px; height: 17px; }
html body[class][class][class] .fnd40-itx { flex: 1 1 auto; min-width: 0; display: grid; gap: 2px; }
html body[class][class][class] .fnd40-itx b {
  font-size: 14px; font-weight: 700; color: #f1f5f9; -webkit-text-fill-color: #f1f5f9;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
html body[class][class][class] .fnd40-itx i {
  font-style: normal; font-size: 12px; color: #93a6bc;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
html body[class][class][class] .fnd40-tel {
  flex: 0 0 auto; width: 44px; min-height: 40px; display: grid; place-items: center;
  border-radius: 11px; border: 1px solid rgba(224, 184, 98, .32);
  color: #f7e4a8; -webkit-text-fill-color: #f7e4a8; background: rgba(224, 184, 98, .08);
}
html body[class][class][class] .fnd40-tel svg { width: 16px; height: 16px; }
html body[class][class][class] .fnd40-tel:hover { background: rgba(224, 184, 98, .2); }

html body[class][class][class] .fnd40-empty { padding: 26px 16px; text-align: center; font-size: 13.5px; color: #93a6bc; line-height: 2; }
html body[class][class][class] .fnd40-more {
  display: block; margin: 8px 4px 2px; padding: 11px; border-radius: 12px; text-align: center;
  font-size: 13px; font-weight: 800; text-decoration: none; cursor: pointer;
  color: #0a0f18; -webkit-text-fill-color: #0a0f18;
  background: linear-gradient(135deg, #f7e4a8, #e0b862);
  -webkit-background-clip: border-box; background-clip: border-box;
}
html body[class][class][class] .fnd40-more.on { box-shadow: 0 0 0 3px rgba(224, 184, 98, .3); }

html body[class][class][class] .fnd40-ft {
  display: flex; gap: 14px; justify-content: flex-end; padding: 9px 16px;
  border-top: 1px solid rgba(255, 255, 255, .07);
  font-size: 11px; color: #7e8ea3; direction: ltr;
}

/* ── هاب موبایل‌اول ── */
html body[class][class][class] .mhb40 { display: none; }

@media (max-width: 900px) {
  html body[class][class][class] .mhb40 {
    display: grid; gap: 11px; margin: 0 0 18px; padding: 13px;
    border-radius: 20px; border: 1px solid rgba(224, 184, 98, .24);
    background: linear-gradient(158deg, rgba(20, 32, 58, .95), rgba(7, 12, 24, .97));
    box-shadow: 0 14px 34px rgba(0, 0, 0, .38);
    direction: rtl; font-family: 'Vazirmatn', Tahoma, sans-serif;
    opacity: 0; transform: translateY(10px);
    transition: opacity .45s ease, transform .45s ease;
  }
  html body[class][class][class] .mhb40.mhb40-in { opacity: 1; transform: none; }

  html body[class][class][class] .mhb40-s {
    display: flex; align-items: center; gap: 10px; width: 100%; cursor: pointer;
    min-height: 48px; padding: 0 14px; font-family: inherit; font-size: 13.5px; font-weight: 600;
    text-align: right; border-radius: 14px;
    border: 1px solid rgba(224, 184, 98, .3); background: rgba(255, 255, 255, .05);
    color: #cbd6e4; -webkit-text-fill-color: #cbd6e4;
  }
  html body[class][class][class] .mhb40-s svg { width: 18px; height: 18px; color: #e0b862; flex: 0 0 auto; }
  html body[class][class][class] .mhb40-s span { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  html body[class][class][class] .mhb40-g { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
  html body[class][class][class] .mhb40-t {
    display: grid; justify-items: center; gap: 6px; text-decoration: none;
    min-height: 74px; padding: 11px 4px; border-radius: 15px;
    border: 1px solid rgba(224, 184, 98, .2); background: rgba(255, 255, 255, .04);
    transition: transform .18s ease, background .18s ease;
  }
  html body[class][class][class] .mhb40-t:active { transform: scale(.96); background: rgba(224, 184, 98, .14); }
  html body[class][class][class] .mhb40-i {
    width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center;
    background: rgba(224, 184, 98, .13); color: #f7e4a8;
  }
  html body[class][class][class] .mhb40-i svg { width: 18px; height: 18px; }
  html body[class][class][class] .mhb40-t b {
    font-size: 11.5px; font-weight: 700; color: #dbe4f2; -webkit-text-fill-color: #dbe4f2; text-align: center;
  }

  html body[class][class][class] .fnd40 { padding: 0; }
  html body[class][class][class] .fnd40-box {
    width: 100%; height: 100%; border-radius: 0; border: 0;
    display: flex; flex-direction: column;
  }
  html body[class][class][class] .fnd40-hd { padding: 14px; }
  html body[class][class][class] .fnd40-in { min-height: 46px; font-size: 16px; }
  html body[class][class][class] .fnd40-res { max-height: none; flex: 1 1 auto; }
  html body[class][class][class] .fnd40-it { padding: 12px 11px; }
  html body[class][class][class] .fnd40-tel { min-height: 44px; }
  html body[class][class][class] .fnd40-ft { justify-content: center; }
}
