/* ERP36T: the site search (assets/js/search.js), on every page: a search icon in
   the header that opens a cream panel under it with the field and the results.
   Brand colours only: ink #1A1A1A, orange #FD7E28, cream #FAF9F7. */
.ss-toggle{
  flex:none;display:inline-grid;place-items:center;width:40px;height:40px;margin-left:6px;padding:0;
  border:1px solid transparent;border-radius:var(--radius);background:transparent;color:var(--accent);cursor:pointer;
  transition:color var(--e-fast),background var(--e-fast)
}
.ss-toggle svg{width:20px;height:20px;stroke-width:2.4}
.ss-toggle:hover,.ss-toggle.is-on{color:var(--accent-hi);background:rgba(253,126,40,.12)}
.ss-toggle:focus-visible,.ss-close:focus-visible,.ss-try:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
[dir=rtl] .ss-toggle{margin-left:0;margin-right:6px}
/* phones and tablets: no menu bar, so the icon sits beside the menu button */
@media(max-width:1059px){
  .ss-toggle{margin-left:auto;width:42px;height:42px;border-color:var(--border-dark)}
  .ss-toggle~.burger{margin-left:8px}
  [dir=rtl] .ss-toggle{margin-left:0;margin-right:auto}
  [dir=rtl] .ss-toggle~.burger{margin-right:8px;margin-left:0}
}

.site-search{
  position:absolute;top:calc(100% + 6px);inset-inline-end:20px;z-index:80;   /* lined up with the header's edge (.wrap padding) */
  width:min(620px,calc(100% - 40px));padding:8px;
  background:#FAF9F7;color:#1A1A1A;border:1px solid var(--border);border-radius:var(--radius-lg);box-shadow:var(--shadow-lg)
}
@media(min-width:720px){.site-search{inset-inline-end:32px;width:min(620px,calc(100% - 64px))}}
.site-search[hidden]{display:none}
.ss-label{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.ss-field{position:relative;display:flex;align-items:center}
.ss-field>svg{position:absolute;inset-inline-start:14px;width:18px;height:18px;color:var(--muted-light);pointer-events:none}
.ss-field input{
  width:100%;min-height:46px;padding:10px 46px;border-radius:var(--radius);
  font:500 15px/1.3 var(--sans);color:#1A1A1A;background:#fff;border:1.5px solid var(--border);
  transition:border-color var(--e-fast),box-shadow var(--e-fast);-webkit-appearance:none;appearance:none
}
.ss-field input::placeholder{color:var(--muted-light);opacity:1}
.ss-field input::-webkit-search-cancel-button{display:none}
.ss-field input:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px rgba(253,126,40,.22)}
.ss-close{position:absolute;inset-inline-end:6px;width:34px;height:34px;display:grid;place-items:center;border:0;border-radius:var(--radius);background:none;color:var(--muted-light);cursor:pointer}
.ss-close:hover{color:#1A1A1A;background:rgba(26,26,26,.06)}
.ss-close svg{width:16px;height:16px}

.ss-list{margin:6px 0 0;padding:0;list-style:none;max-height:min(560px,calc(100vh - 190px));overflow-y:auto;overscroll-behavior:contain}
.ss-list[hidden]{display:none}
.ss-item{border-radius:var(--radius)}
.ss-item[aria-selected="true"]{background:rgba(26,26,26,.06);box-shadow:inset 3px 0 0 var(--accent)}
[dir=rtl] .ss-item[aria-selected="true"]{box-shadow:inset -3px 0 0 var(--accent)}
.ss-link{display:flex;align-items:center;gap:12px;padding:8px;color:#1A1A1A;text-decoration:none}
.ss-thumb{flex:0 0 96px;width:96px;height:50px;object-fit:cover;border-radius:3px;background:rgba(26,26,26,.06);border:1px solid rgba(26,26,26,.08)}
.ss-text{min-width:0;flex:1;display:grid;gap:2px}
.ss-top{display:flex;align-items:baseline;gap:10px;min-width:0}
.ss-title{flex:1;min-width:0;font:600 14.5px/1.3 var(--sans);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ss-sec{flex:none;font:500 11px/1.3 var(--sans);letter-spacing:.04em;text-transform:uppercase;color:var(--muted-light)}
.ss-desc{font:400 13px/1.4 var(--sans);color:var(--muted-light);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ss-list mark{background:none;color:#FD7E28;font-weight:600}
.ss-none{padding:12px 10px;font:400 14px/1.5 var(--sans);color:#1A1A1A}
.ss-none a,.ss-try{color:#1A1A1A;font-weight:600;text-decoration:underline;text-decoration-color:var(--accent);text-underline-offset:3px}
.ss-try{padding:0;border:0;background:none;font:inherit;font-weight:600;cursor:pointer}
.ss-status{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
/* Urdu Nastaliq needs much taller lines */
html[lang="ur"] .ss-title,html[lang="ur"] .ss-desc{line-height:2.1}
html[lang="ur"] .ss-field input{line-height:2}
/* phones: the panel spans the screen; the section label goes above the title */
@media(max-width:640px){
  .site-search{inset-inline:12px;width:auto}
  .ss-top{flex-direction:column;align-items:flex-start;gap:0}
  .ss-sec{order:-1;font-size:10.5px}
  .ss-title{width:100%}
}
@media(prefers-reduced-motion:reduce){.ss-toggle,.ss-field input{transition:none}}
