/* A small paper pocket: the search seam bends, tears, then settles. */
.fp-search-host{--fp-ink:#1d2c50;--fp-muted:#69758e;--fp-paper:#fff;--fp-soft:#f3f6fd;--fp-line:#dce4f4;--fp-blue:#315ce5;position:relative;isolation:isolate;overflow:visible!important}
html[data-theme="dark"] .fp-search-host{--fp-ink:#edf2ff;--fp-muted:#aab8d4;--fp-paper:#18243a;--fp-soft:#202f49;--fp-line:#354765;--fp-blue:#9db8ff}
.fp-search-host input[name=q]{transition:border-color .2s,box-shadow .2s;background:var(--fp-soft);color:var(--fp-ink)}
.fp-search-host input[name=q]:focus{outline:2px solid var(--fp-blue);outline-offset:3px}
.fp-search-host.fp-search-open{z-index:120}
.fp-search-host.fp-search-open input[name=q]{border-color:var(--fp-blue);box-shadow:0 4px 0 color-mix(in srgb,var(--fp-blue) 18%,transparent)}
.fp-search-panel{position:absolute;inset-block-start:calc(100% + 16px);inset-inline-start:0;width:440px;max-width:calc(100vw - 32px);max-height:min(590px,calc(100dvh - 150px));display:flex;flex-direction:column;z-index:130;text-align:start;direction:rtl;border:1px solid var(--fp-line);border-radius:9px 9px 24px 24px;background:var(--fp-paper);color:var(--fp-ink);box-shadow:0 7px 0 -3px color-mix(in srgb,var(--fp-line) 60%,var(--fp-paper)),0 20px 44px -14px rgb(18 37 85 / .28),inset 0 1px 0 rgb(255 255 255 / .65);transform-origin:50% 0;font-family:Vazirmatn,Tahoma,sans-serif}
.fp-search-panel[hidden],.fp-search-list[hidden],.fp-search-all[hidden]{display:none!important}
.fp-search-tear{position:absolute;inset:-9px 0 auto;height:12px;background:var(--fp-paper);clip-path:polygon(0 65%,3% 12%,6% 65%,9% 20%,12% 68%,15% 10%,18% 60%,21% 18%,24% 65%,27% 12%,30% 65%,33% 20%,36% 65%,39% 8%,42% 65%,45% 16%,48% 65%,51% 8%,54% 65%,57% 16%,60% 65%,63% 8%,66% 65%,69% 18%,72% 65%,75% 8%,78% 65%,81% 18%,84% 65%,87% 8%,90% 65%,93% 18%,96% 65%,100% 10%,100% 100%,0 100%);pointer-events:none}
.fp-search-heading{flex:none;display:flex;align-items:center;gap:8px;padding:19px 20px 12px;font-size:12px;font-weight:750;line-height:1.9;color:var(--fp-muted)}
.fp-search-heading::before{content:"";flex:none;width:8px;height:8px;border-radius:3px;background:var(--fp-blue);box-shadow:2px 2px 0 color-mix(in srgb,var(--fp-blue) 20%,transparent);transform:rotate(-12deg)}
.fp-search-list{padding:0 9px 9px;overflow:auto;overscroll-behavior:contain;min-height:0;scrollbar-width:thin;scrollbar-color:var(--fp-line) transparent}
.fp-search-option{display:flex;gap:13px;align-items:center;min-height:76px;padding:11px 12px;border:1px solid transparent;border-radius:15px;text-decoration:none!important;color:var(--fp-ink)!important;position:relative;transition:background .16s,border-color .16s,box-shadow .16s}
.fp-search-option+.fp-search-option{margin-top:3px}
.fp-search-option:hover,.fp-search-option.is-active,.fp-search-option:focus-visible{background:var(--fp-soft);border-color:var(--fp-line);box-shadow:inset 0 -2px 0 color-mix(in srgb,var(--fp-line) 50%,transparent);outline:none}
.fp-search-icon{display:grid;place-items:center;flex:0 0 46px;align-self:center;width:46px;height:46px;border-radius:14px;background:linear-gradient(150deg,var(--fp-paper),var(--fp-soft));border:1px solid var(--fp-line);box-shadow:0 3px 0 -1px var(--fp-line),inset 0 1px 0 rgb(255 255 255 / .4);font-weight:850;font-size:20px;transition:transform .2s}
.fp-search-icon>span{display:grid;place-items:center;width:29px;height:29px}
.fp-search-icon svg,.fp-search-icon img{max-width:29px!important;max-height:29px!important;width:29px!important;height:29px!important;object-fit:contain}
.fp-search-copy{min-width:0;flex:1;display:flex;flex-direction:column;gap:5px}
.fp-search-copy strong{font-size:13px;font-weight:750;line-height:1.65;overflow-wrap:anywhere;text-align:right}
.fp-search-meta{font-size:10px;line-height:1.8;color:var(--fp-muted)}
.fp-search-arrow{flex:none;color:var(--fp-blue);font-size:20px;opacity:.7}
.fp-search-footer{flex:none;display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;padding:14px 20px 17px;border-top:1px dashed var(--fp-line);font-size:11px;line-height:1.8}
.fp-search-footer a{color:var(--fp-blue);text-decoration:none;font-weight:700;padding:4px 0}
.fp-search-footer a:focus-visible{outline:2px solid var(--fp-blue);outline-offset:3px;border-radius:4px}
.fp-search-support{margin-inline-start:auto}
.fp-search-empty{display:flex;gap:15px;align-items:center;padding:8px 22px 22px;overflow:auto;min-height:0}
.fp-search-host .fp-search-buddy{flex:0 0 84px;width:84px;height:80px;color:var(--fp-blue);filter:drop-shadow(2px 4px 0 color-mix(in srgb,var(--fp-blue) 12%,transparent))}
.fp-search-empty-copy strong{display:block;font-size:14px;font-weight:800;line-height:1.9}
.fp-search-empty-copy p{font-size:12px;line-height:2;margin:7px 0 0;color:var(--fp-muted)}
.fp-search-panel[data-mode=empty] .fp-search-support,.fp-search-panel[data-mode=error] .fp-search-support{display:block;background:var(--fp-blue);color:var(--fp-paper);padding:8px 14px;border-radius:10px;box-shadow:0 3px 0 color-mix(in srgb,var(--fp-blue) 50%,var(--fp-ink));margin:0}
.fp-search-status{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.fp-search-empty-actions{display:flex;gap:12px;flex-wrap:wrap;justify-content:center;margin-top:20px}
.fp-search-opening .fp-search-panel{animation:fp-pocket-open .62s cubic-bezier(.2,.8,.2,1) both}
.fp-search-opening .fp-search-tear{animation:fp-paper-tear .5s ease-out both}
.fp-search-opening::after{content:"";position:absolute;inset:auto 3px -5px;height:4px;border-radius:0 0 50% 50%;background:var(--fp-blue);transform-origin:50% 0;animation:fp-heavy-seam .54s ease-in-out both;pointer-events:none}
@keyframes fp-heavy-seam{0%{transform:scaleY(1);opacity:.7}35%{transform:translateY(4px) scaleY(2.4);opacity:1}60%{transform:translateY(10px) scaleX(.72) scaleY(.8);opacity:.45}100%{transform:translateY(15px) scaleX(.1);opacity:0}}
@keyframes fp-pocket-open{0%{opacity:0;transform:translateY(-11px) scaleY(.78) rotateX(-12deg)}24%{opacity:0;transform:translateY(-6px) scaleY(.85)}62%{opacity:1;transform:translateY(4px) scaleY(1.015)}100%{opacity:1;transform:translateY(0) scaleY(1)}}
@keyframes fp-paper-tear{0%,20%{clip-path:polygon(0 80%,100% 80%,100% 100%,0 100%);transform:scaleY(.3)}100%{transform:scaleY(1)}}
@media(hover:hover) and (pointer:fine){.fp-search-option:hover .fp-search-icon{transform:translateY(-2px) rotate(-4deg)}}
@media(max-width:740px){.fp-search-panel{width:calc(100vw - 32px);max-height:calc(100dvh - 170px);border-radius:8px 8px 20px 20px}.fp-search-heading{padding:15px 16px 10px}.fp-search-option{min-height:68px;padding:9px 10px}.fp-search-footer{padding:10px 16px 13px}.fp-search-copy strong{font-size:12px}.fp-search-empty{padding:8px 16px 20px;gap:10px}.fp-search-buddy{flex-basis:68px;width:68px}}
@media(prefers-reduced-motion:reduce){.fp-search-host *, .fp-search-host::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}.fp-search-option:hover .fp-search-icon{transform:none!important}.fp-search-opening::after{display:none}}
