/* v11.1.0 public UI corrections. Keep hidden controls out of layout even when
   component display rules are more specific than the browser stylesheet. */
[hidden]{display:none!important}

.tool-title{position:relative;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;gap:1.5rem}
.tool-title>div{min-width:0}
.tool-title>.soft-btn{position:relative;top:-10px;align-self:start;white-space:nowrap}

/* The quick-action control belongs to the viewport, never to Related Tools. */
.smart-tool-nav{position:fixed!important;right:max(18px,calc((100vw - 1280px)/2))!important;bottom:28px!important;z-index:10020!important;display:flex!important;align-items:flex-end;gap:.6rem;margin:0!important}
.smart-tool-actions[hidden],.scroll-top[hidden]{display:none!important}
.smart-tool-toggle{flex:0 0 auto}

/* A contained, scrollable autocomplete dropdown for category discovery. */
.directory-search{position:relative;isolation:isolate}
.directory-search>.autocomplete{position:absolute!important;display:block;top:calc(100% + 8px);left:0;right:0;width:100%;max-width:100%;max-height:min(380px,60vh);overflow-x:hidden;overflow-y:auto;z-index:1000;margin:0;padding:.55rem;border:1px solid color-mix(in srgb,var(--muted) 18%,transparent);border-radius:16px;background:var(--panel,#edf2f5);box-shadow:0 18px 40px rgba(15,23,42,.22)}
.directory-search>.autocomplete[hidden]{display:none!important}
.directory-search>.autocomplete a{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:.75rem;min-width:0;padding:.75rem;border-radius:10px}
.directory-search>.autocomplete strong,.directory-search>.autocomplete small{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

@media(max-width:640px){
 .smart-tool-nav{right:12px!important;bottom:14px!important}
 .directory-search>.autocomplete{max-height:55vh}
 .directory-search>.autocomplete a{grid-template-columns:minmax(0,1fr);gap:.15rem}
 .directory-search>.autocomplete small{font-size:.72rem}
 .example-card pre{white-space:pre-wrap!important;overflow-wrap:anywhere;word-break:break-word}
}
