/* Only new content controls. Existing modal shell, header and footer remain authoritative. */
#modalMedical [hidden]{display:none!important}
#modalMedical .wm-medical-search{position:sticky;top:0;z-index:2;margin:0 0 20px;padding:0 0 12px;background:var(--wf-surface)}
#modalMedical .wm-medical-search .wf-input{max-width:100%;box-sizing:border-box}
#modalMedical .wm-medical-search-status{margin:8px 0 0;color:var(--wf-text-secondary);font-size:13px;line-height:1.5;min-height:20px}
#modalMedical .wm-medical-chapter{margin:0 0 24px}
#modalMedical .wm-medical-subsection{margin:16px 0;scroll-margin-top:12px}
#modalMedical .wm-medical-subsection h4{margin:0 0 8px;color:inherit;font:600 15px/1.5 Inter,Arial,sans-serif}
#modalMedical .wm-medical-subsection p{margin:0 0 12px}
#modalMedical .wm-medical-references{padding-left:24px}
#modalMedical .wm-medical-references li{margin:0 0 16px;scroll-margin-top:12px;overflow-wrap:anywhere}
#modalMedical .wm-medical-references a,#modalMedical a[data-medical-source]{color:var(--wf-gold);text-underline-offset:.2em}
#modalMedical .wm-medical-reference-title{font-weight:600}
@media(max-width:767px){#modalMedical .wm-medical-subsection h4{font-size:14px}}
/* OWNER correction: search belongs to this modal's fixed header. */
#modalMedical .wm-modal-header.wm-medical-header{display:block;min-height:0;padding:18px 28px 16px}
#modalMedical .wm-medical-header-title{margin:0 48px 12px 0;font:inherit;color:inherit}
#modalMedical .wm-medical-header .wm-medical-search{position:static;margin:0;padding:0;background:transparent}
#modalMedical .wm-medical-header .wm-medical-search .wf-label{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
#modalMedical .wm-medical-search-status:empty{display:none}
@media(max-width:767px){#modalMedical .wm-modal-header.wm-medical-header{padding:14px 18px}#modalMedical .wm-medical-header-title{margin-right:44px;margin-bottom:10px}}
/* The explicit search action uses the existing FIT button system. */
#modalMedical .wm-medical-search-row{display:flex;align-items:stretch;gap:10px}
#modalMedical .wm-medical-search-row .wf-input{flex:1 1 0;min-width:0;width:0}
#modalMedical .wm-medical-search-button.wm-btn{flex:0 0 auto;width:auto;min-width:88px;margin:0;font:var(--wf-control-font);border-color:var(--wf-control-border);background:var(--wf-raised);color:var(--wf-text)}
#modalMedical .wm-medical-search-button.wm-btn:hover{background:var(--wf-hover);border-color:var(--wf-control-border);outline:none}
#modalMedical .wm-medical-search-button.wm-btn:active{background:var(--wf-surface)}
#modalMedical .wm-medical-search-button.wm-btn:focus-visible{outline:2px solid var(--wf-control-border)!important;outline-offset:-2px;box-shadow:none}
/* Same header/search layout for the existing inventory reader. */
#modalInventory .wm-modal-header.wm-medical-header{display:block;min-height:0;padding:18px 28px 16px}
#modalInventory .wm-medical-header-title{margin:0 48px 12px 0;font:inherit;color:inherit}
#modalInventory .wm-medical-header .wm-inventory-searchbar{margin:0;padding:0;background:transparent}
#modalInventory .wm-inventory-searchbar>.wm-inventory-search{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
#modalInventory .wm-medical-search-row{display:flex;align-items:stretch;gap:10px}
#modalInventory .wm-medical-search-row .wf-input{flex:1 1 0;min-width:0;width:0;max-width:100%;box-sizing:border-box;margin:0}
#modalInventory .wm-medical-search-button.wm-btn{flex:0 0 auto;width:auto;min-width:88px;margin:0;font:var(--wf-control-font);border-color:var(--wf-control-border);background:var(--wf-raised);color:var(--wf-text)}
#modalInventory .wm-medical-search-button.wm-btn:hover{background:var(--wf-hover);border-color:var(--wf-control-border);outline:none}
#modalInventory .wm-medical-search-button.wm-btn:active{background:var(--wf-surface)}
#modalInventory .wm-medical-search-button.wm-btn:focus-visible{outline:2px solid var(--wf-control-border)!important;outline-offset:-2px;box-shadow:none}
#modalInventory [data-inventory-chapter],#modalInventory [data-inventory-part],#modalInventory [data-inventory-lead]{scroll-margin-top:12px}
@media(max-width:767px){#modalInventory .wm-modal-header.wm-medical-header{padding:14px 18px}#modalInventory .wm-medical-header-title{margin-right:44px;margin-bottom:10px}}
