/* Shared search panel for the doctor, hospital and lab directories. */
body.page-listing .directory-layout:has(>.filter-panel){--fp-ink:#171918;--fp-teal:#276752;--fp-mint:#b2f6e3;--fp-mint-soft:#e8f6f0;--fp-line:#dce5df;--fp-field:#cddad2;--fp-muted:#5a665f;--fp-icon:#71817a}
@media(min-width:1151px){body.page-listing .directory-layout:has(>.filter-panel){grid-template-columns:272px minmax(0,1fr);gap:32px}}
@media(min-width:951px) and (max-width:1150px){body.page-listing .directory-layout:has(>.filter-panel){grid-template-columns:248px minmax(0,1fr);gap:26px}}
@media(min-width:701px) and (max-width:950px){body.page-listing .directory-layout:has(>.filter-panel){grid-template-columns:228px minmax(0,1fr);gap:20px}}

.directory-layout>.filters.filter-panel{align-self:start;padding:0;background:none;border:0;border-radius:0}
.directory-layout>.filters.filter-panel>form{display:block;margin:0;padding:20px;background:#fff;border:1px solid var(--fp-line);border-radius:22px;box-shadow:0 1px 2px rgba(23,25,24,.04),0 12px 32px rgba(23,60,41,.06)}

/* Heading */
.directory-layout>.filters.filter-panel .filter-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin:0 0 4px;padding:0 0 16px;border-bottom:1px solid #e9efeb}
.filter-panel .filter-title{display:flex;align-items:center;gap:11px;min-width:0}
.filter-panel .filter-title-icon{flex:none;display:grid;place-items:center;width:40px;height:40px;border-radius:12px;background:var(--fp-mint);color:var(--fp-ink)}
.directory-layout>.filters.filter-panel .filter-heading h2{margin:0;font-size:17px;font-weight:600;line-height:1.25;letter-spacing:-.02em;color:var(--fp-ink)}
.filter-panel .filter-title p{margin:2px 0 0;font-size:12.5px;line-height:1.35;color:var(--fp-muted)}
.directory-layout>.filters.filter-panel>form>.filter-reset{display:flex;align-items:center;justify-content:center;gap:7px;min-height:40px;margin:8px 0 0;border-radius:12px;font-size:13.5px;font-weight:600;color:var(--fp-muted);text-decoration:none;transition:background .15s,color .15s}
.directory-layout>.filters.filter-panel>form>.filter-reset:hover{background:#f1f6f3;color:var(--fp-teal)}

/* Fields */
.directory-layout>.filters.filter-panel label{display:block;margin:16px 0 7px;font-size:12.5px;font-weight:600;letter-spacing:.005em;color:var(--fp-ink)}
.directory-layout>.filters.filter-panel .filter-field{position:relative;display:block;overflow:visible}
.directory-layout>.filters.filter-panel .filter-field>svg{position:absolute;left:13px;top:15px;right:auto;z-index:2;color:var(--fp-icon);pointer-events:none;transition:color .15s}
.directory-layout>.filters.filter-panel .filter-field:focus-within>svg{color:var(--fp-teal)}
.directory-layout>.filters.filter-panel .filter-field input,.directory-layout>.filters.filter-panel .filter-field select{display:block;width:100%;min-height:48px;margin:0;padding:12px 14px 12px 41px;background:#fff;border:1px solid var(--fp-field);border-radius:13px;color:var(--fp-ink);font:inherit;font-size:15px;line-height:1.3;box-shadow:none;transition:border-color .15s,box-shadow .15s,background-color .15s}
.directory-layout>.filters.filter-panel .filter-field select{appearance:none;-webkit-appearance:none;padding-right:38px;cursor:pointer;text-overflow:ellipsis;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%235a665f' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 13px center}
.directory-layout>.filters.filter-panel .filter-field input::placeholder{color:#8b978f}
.directory-layout>.filters.filter-panel .filter-field input:hover,.directory-layout>.filters.filter-panel .filter-field select:hover{border-color:#a9c2b4}
.directory-layout>.filters.filter-panel .filter-field input:focus,.directory-layout>.filters.filter-panel .filter-field select:focus{outline:none;border-color:var(--fp-teal);box-shadow:0 0 0 3px rgba(39,103,82,.16)}
.directory-layout>.filters.filter-panel .filter-field select:has(option:checked:not([value=""])){background-color:#f3faf6;border-color:#a3cdb9;font-weight:500}
.directory-layout>.filters.filter-panel .filter-field .live-search-field{display:block;width:100%}

/* More filters (doctors) */
.directory-layout>.filters.filter-panel .more-filters{margin:18px 0 0;padding:0;border:1px solid #e3eae6;border-radius:14px;background:#f7faf8;font-size:14px}
.directory-layout>.filters.filter-panel .more-filters>summary{display:flex;align-items:center;gap:8px;min-height:46px;padding:10px 14px;list-style:none;cursor:pointer;font-weight:600;color:var(--fp-ink);border-radius:14px}
.directory-layout>.filters.filter-panel .more-filters>summary::-webkit-details-marker{display:none}
.directory-layout>.filters.filter-panel .more-filters>summary em{padding:2px 8px;border-radius:999px;background:var(--fp-mint);font-size:11px;font-style:normal;font-weight:600}
.directory-layout>.filters.filter-panel .more-filters>summary svg{margin-left:auto;color:var(--fp-muted);transition:transform .2s}
.directory-layout>.filters.filter-panel .more-filters[open]>summary svg{transform:rotate(180deg)}
.directory-layout>.filters.filter-panel .more-filters>summary:hover{background:#eef5f1}
.directory-layout>.filters.filter-panel .more-filters-body{padding:0 14px 16px}
.directory-layout>.filters.filter-panel .more-filters-body>label:first-child{margin-top:4px}

/* Submit */
.directory-layout>.filters.filter-panel>form>.button{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;min-height:50px;margin:20px 0 0;padding:12px 18px;background:var(--fp-ink);border:1px solid var(--fp-ink);border-radius:14px;color:#fff;font-size:15px;font-weight:600;box-shadow:none;transform:none}
.directory-layout>.filters.filter-panel>form>.button svg{color:var(--fp-mint)}
.directory-layout>.filters.filter-panel>form>.button:hover{background:var(--fp-teal);border-color:var(--fp-teal)}

/* Note */
.directory-layout>.filters.filter-panel>.filter-note{display:flex;align-items:flex-start;gap:12px;margin:14px 0 0;padding:16px;background:#eef6f2;border:1px solid #d3e8de;border-radius:18px}
.filter-panel .filter-note-icon{flex:none;display:grid;place-items:center;width:34px;height:34px;border-radius:10px;background:#fff;color:var(--fp-teal)}
.directory-layout>.filters.filter-panel>.filter-note h3{margin:2px 0 4px;font-size:15px;font-weight:600;letter-spacing:-.01em}
.directory-layout>.filters.filter-panel>.filter-note p{margin:0;font-size:13px;line-height:1.55;color:#3f4a44}
.directory-layout>.filters.filter-panel>.filter-note .text-link{display:inline-flex;align-items:center;gap:5px;margin-top:8px;padding:0;border:0;background:none;font-size:13px;font-weight:600;color:var(--fp-teal);text-decoration:underline;text-underline-offset:3px}

/* Tablet sidebar: tighter spacing */
@media(min-width:701px) and (max-width:950px){
.directory-layout>.filters.filter-panel>form{padding:16px;border-radius:18px}
.filter-panel .filter-title p{display:none}
.directory-layout>.filters.filter-panel .filter-field input,.directory-layout>.filters.filter-panel .filter-field select{font-size:14px}
}

/* Phone: full-width panel above the results */
@media(max-width:700px){
body .directory-layout>.filters.filter-panel>form{display:block;padding:16px;border-radius:18px}
body .directory-layout>.filters.filter-panel .filter-heading{padding-bottom:14px}
body .directory-layout>.filters.filter-panel label{margin-top:14px}
body .directory-layout>.filters.filter-panel .filter-field input,body .directory-layout>.filters.filter-panel .filter-field select{font-size:16px}
body .directory-layout>.filters.filter-panel>form>.button{width:100%;margin-top:16px}
body .directory-layout>.filters.filter-panel>.filter-note{display:none}
/* Doctors: compact search with a collapsible filter group */
body .doctors-directory .directory-layout>.filters.filter-panel>form{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:0 10px}
body .doctors-directory .directory-layout>.filters.filter-panel>form>:is(.filter-heading,label,.filter-search,.filter-options){grid-column:1/-1}
body .doctors-directory .directory-layout>.filters.filter-panel .filter-toggle{grid-column:1;grid-row:4;display:flex;align-items:center;justify-content:center;gap:8px;width:100%;min-height:48px;margin:14px 0 0;padding:10px 14px;border:1px solid var(--fp-field);border-radius:14px;background:#fff;color:var(--fp-ink);font:inherit;font-size:15px;font-weight:600}
body .doctors-directory .directory-layout>.filters.filter-panel .filter-toggle[hidden]{display:none}
body .doctors-directory .directory-layout>.filters.filter-panel .filter-toggle .filter-count{display:grid;place-items:center;min-width:20px;height:20px;padding:0 6px;border-radius:999px;background:var(--fp-ink);color:#fff;font-size:11px}
body .doctors-directory .directory-layout>.filters.filter-panel .filter-toggle svg{transition:transform .2s}
body .doctors-directory .directory-layout>.filters.filter-panel .filter-toggle[aria-expanded=true] svg{transform:rotate(180deg)}
body .doctors-directory .directory-layout>.filters.filter-panel>form>.button{grid-column:2;grid-row:4;width:100%;margin-top:14px;min-height:48px}
body .doctors-directory .directory-layout>.filters.filter-panel>form:has(.filter-toggle[hidden])>.button{grid-column:1/-1}
body .doctors-directory .directory-layout>.filters.filter-panel .filter-options{grid-row:5}
body .doctors-directory .directory-layout>.filters.filter-panel>form>.filter-reset{grid-column:1/-1;grid-row:6}
body .doctors-directory .directory-layout>.filters.filter-panel .filter-options>label:first-child{margin-top:16px}
}

/* Searchable dropdown (filter-select.js). The native select stays in the form, hidden. */
.directory-layout>.filters.filter-panel .filter-field select.fs-native{position:absolute;inset:0;width:100%;height:100%;min-height:0;opacity:0;pointer-events:none}
.directory-layout>.filters.filter-panel .fs-trigger{position:relative;display:flex;align-items:center;width:100%;min-height:48px;margin:0;padding:12px 38px 12px 41px;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%235a665f' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E") no-repeat right 13px center;border:1px solid var(--fp-field);border-radius:13px;color:var(--fp-ink);font:inherit;font-size:15px;line-height:1.3;text-align:left;cursor:pointer;transition:border-color .15s,box-shadow .15s,background-color .15s}
.directory-layout>.filters.filter-panel .fs-trigger:hover{border-color:#a9c2b4}
.directory-layout>.filters.filter-panel .fs-trigger:focus-visible,.directory-layout>.filters.filter-panel .filter-field.is-open .fs-trigger{outline:none;border-color:var(--fp-teal);box-shadow:0 0 0 3px rgba(39,103,82,.16)}
.directory-layout>.filters.filter-panel .filter-field.is-open .fs-trigger{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23276752' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 10 4-4 4 4'/%3E%3C/svg%3E")}
.directory-layout>.filters.filter-panel .filter-field.has-value .fs-trigger{background-color:#f3faf6;border-color:#a3cdb9;font-weight:500}
.directory-layout>.filters.filter-panel .filter-field.is-open>svg{color:var(--fp-teal)}
.directory-layout>.filters.filter-panel .fs-value{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.filters.filter-panel:has(.filter-field.is-open){position:relative;z-index:120}
.directory-layout>.filters.filter-panel .filter-field.is-open{z-index:5}

.fs-panel{--fp-ink:#171918;--fp-teal:#276752;--fp-muted:#5a665f;position:absolute;left:0;right:0;top:calc(100% + 6px);z-index:130;display:flex;flex-direction:column;max-height:340px;padding:8px;background:#fff;border:1px solid #d3e0d8;border-radius:16px;box-shadow:0 18px 44px rgba(23,40,32,.16),0 2px 6px rgba(23,40,32,.06);animation:fs-in .14s ease-out}
.fs-panel[hidden]{display:none}
.fs-panel.opens-up{top:auto;bottom:calc(100% + 6px);animation-name:fs-in-up}
@keyframes fs-in{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}
@keyframes fs-in-up{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}
.fs-head{display:none}
.directory-layout>.filters.filter-panel .fs-panel .fs-search,body>.fs-panel .fs-search{flex:none;display:block;width:100%;min-height:42px;margin:0 0 6px;padding:9px 12px 9px 36px;background:#f4f8f6 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2371817a' stroke-width='1.6' stroke-linecap='round'%3E%3Ccircle cx='7' cy='7' r='4.6'/%3E%3Cpath d='m10.5 10.5 3.5 3.5'/%3E%3C/svg%3E") no-repeat 12px center;border:1px solid transparent;border-radius:11px;font:inherit;font-size:14px;color:var(--fp-ink)}
.directory-layout>.filters.filter-panel .fs-panel .fs-search:focus,body>.fs-panel .fs-search:focus{outline:none;background-color:#fff;border-color:var(--fp-teal);box-shadow:0 0 0 3px rgba(39,103,82,.12)}
.fs-search::-webkit-search-cancel-button{cursor:pointer}
.fs-list{display:flex;flex-direction:column;flex:1 1 auto;min-height:0;margin:0;padding:0;list-style:none;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#c9d8cf transparent;outline:none}
.fs-list [role=option]{position:relative;display:flex;align-items:center;min-height:38px;padding:8px 34px 8px 12px;border-radius:10px;font-size:14px;line-height:1.35;color:var(--fp-ink,#171918);cursor:pointer;user-select:none}
.fs-list [role=option][hidden]{display:none}
.fs-list [role=option].fs-any{color:var(--fp-muted,#5a665f)}
.fs-list [role=option].is-active{background:#eef6f2}
.fs-list [role=option][aria-selected=true]{font-weight:600;color:var(--fp-teal,#276752)}
.fs-list [role=option][aria-selected=true]::after{content:"";position:absolute;right:14px;top:50%;width:11px;height:6px;margin-top:-5px;border-left:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(-45deg)}
.fs-empty{margin:0;padding:14px 12px;font-size:14px;color:var(--fp-muted,#5a665f)}
.fs-empty[hidden]{display:none}
.fs-backdrop{position:fixed;inset:0;z-index:1000;background:rgba(17,24,20,.42);animation:fs-fade .18s ease-out}
.fs-backdrop[hidden]{display:none}
@keyframes fs-fade{from{opacity:0}to{opacity:1}}
html.fs-lock,html.fs-lock body{overflow:hidden}

/* Phone: bottom sheet */
@media(max-width:700px){
.fs-panel.is-sheet{position:fixed;left:0;right:0;top:auto;bottom:0;z-index:1001;max-height:min(78vh,560px);padding:10px 14px calc(14px + env(safe-area-inset-bottom));border:0;border-radius:22px 22px 0 0;box-shadow:0 -12px 40px rgba(17,24,20,.22);animation:fs-sheet .22s cubic-bezier(.2,.8,.2,1)}
@keyframes fs-sheet{from{transform:translateY(100%)}to{transform:none}}
.fs-panel.is-sheet::before{content:"";align-self:center;width:40px;height:4px;margin:0 0 10px;border-radius:99px;background:#d4ddd8}
.fs-panel.is-sheet .fs-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 2px 10px}
.fs-panel.is-sheet .fs-head strong{font-size:18px;font-weight:600;letter-spacing:-.02em;color:#171918}
.fs-close{display:grid;place-items:center;width:38px;height:38px;padding:0;border:0;border-radius:50%;background:#f1f5f3;color:#171918;cursor:pointer}
body>.fs-panel.is-sheet .fs-search{min-height:46px;font-size:16px;margin-bottom:8px}
.fs-panel.is-sheet .fs-list [role=option]{min-height:48px;padding:12px 40px 12px 14px;font-size:16px;border-bottom:1px solid #f0f3f1;border-radius:0}
.fs-panel.is-sheet .fs-list [role=option].is-active{border-radius:10px}
}
@media(prefers-reduced-motion:reduce){.fs-panel,.fs-panel.is-sheet,.fs-backdrop{animation:none}}
