.company-search { position:relative; display:flex; align-items:center; flex:0 1 auto; width:40px; min-width:40px; border-radius:var(--radius-md); }
.company-search.is-open { position:absolute; top:50%; transform:translateY(-50%); flex:none; width:auto; }
.company-search-bar { position:relative; left:0; display:flex; align-items:center; flex:none; width:100%; min-width:40px; border-radius:inherit; }
.company-search.is-open .company-search-bar { background:var(--surface); box-shadow:inset 0 0 0 1px var(--border-strong); }
.topbar.company-search-open { position:sticky; top:0; }
.topbar.company-search-open .header-evolution { display:none; }
.topbar.company-search-brand-hidden .brand { visibility:hidden; pointer-events:none; }
#company-search-toggle { display:grid; place-items:center; flex:0 0 40px; width:40px; height:40px; min-height:40px; padding:0; }
html:root .company-search.is-open #company-search-toggle { color:var(--accent); border-color:transparent; background:transparent; box-shadow:none; }
#company-search-form { display:flex; align-items:center; flex:1; min-width:0; margin:0; overflow:clip; }
html:root .company-search #company-search-query { width:100%; min-width:0; height:42px; padding:8px 4px; margin:0; border:0; border-radius:0; background:transparent; box-shadow:none; color:var(--text-primary); font-size:16px; }
html:root #company-search-query:focus-visible { outline:0; }
.company-search.is-open:focus-within .company-search-bar { box-shadow:inset 0 0 0 2px var(--accent); }
#company-search-query::-webkit-search-cancel-button { -webkit-appearance:none; }
html:root #company-search-close { display:grid; place-items:center; flex:0 0 36px; width:36px; min-height:40px; padding:0; margin:0 2px; background:transparent; border:0; color:var(--text-secondary); box-shadow:none; }
html:root #company-search-close:hover { color:var(--accent); background:var(--accent-soft); }
#company-search-panel { position:absolute; top:calc(100% + 12px); left:0; z-index:20; display:flex; flex-direction:column; width:calc(100vw - 24px); max-height:min(660px,calc(100dvh - 110px)); overflow:hidden; color:var(--text-primary); background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-lg); box-shadow:var(--shadow-modal); }
.company-search-tabs { display:flex; flex:0 0 auto; gap:5px; padding:12px 14px; border-bottom:1px solid var(--border); flex-wrap:wrap; }
html:root .company-search-tabs button { padding:6px 10px; min-height:34px; font-size:.78rem; border-color:transparent; background:transparent; color:var(--text-secondary); box-shadow:none; }
html:root .company-search-tabs button[aria-pressed="true"] { background:var(--accent-soft); color:var(--accent); border-color:var(--border); }
#company-search-status { padding:12px 18px 8px; margin:0; font-size:.78rem; color:var(--text-secondary); flex:0 0 auto; }
#company-search-status[data-state="hint"],#company-search-status[data-state="empty"],#company-search-status[data-state="error"] { padding:22px 18px; }
#company-search-status[data-state="error"] { color:var(--theme-danger); }
#company-search-results { min-height:0; overflow:auto; overscroll-behavior:contain; padding:0 10px 10px; }
#company-search-results:empty { padding:0; }
.company-search-group-head { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:14px 8px 6px; }
.company-search-group-head h3 { margin:0; font-size:.74rem; font-weight:650; color:var(--text-secondary); }
html:root .company-search-group-head button { font-size:.73rem; padding:4px 8px; min-height:30px; color:var(--accent); background:transparent; border-color:transparent; box-shadow:none; }
html:root button.company-search-result { display:flex; align-items:center; width:100%; gap:12px; padding:11px 8px; margin:2px 0; background:transparent; color:var(--text-primary); border:1px solid transparent; border-radius:var(--radius-md); text-align:left; font-weight:400; box-shadow:none; }
html:root button.company-search-result:is(:hover,:focus-visible) { background:var(--accent-soft); border-color:var(--border); }
.company-search-result-content { display:grid; flex:1; min-width:0; gap:3px; overflow-wrap:anywhere; }
.company-search-result-content strong { font-size:.88rem; font-weight:600; display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; }
.company-search-result-content > .muted { font-size:.74rem; }
.company-search-result-content mark { padding:0; background:transparent; color:var(--accent); font-weight:700; }
.company-search-snippet { font-size:.78rem; line-height:1.45; color:var(--text-secondary); display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; }
.company-search-symbol { display:grid; place-items:center; flex:0 0 36px; width:36px; height:36px; border-radius:11px; color:var(--accent); background:var(--accent-soft); }
.company-search-symbol svg { width:19px; height:19px; }
.company-search-arrow { color:var(--text-secondary); font-size:1rem; }
html:root #company-search-more { align-self:stretch; flex:0 0 auto; margin:0; min-height:42px; border:0; border-top:1px solid var(--border); border-radius:0; font-size:.8rem; }
@media(max-width:1100px){
  .company-search { position:static; }
  #company-search-panel { top:calc(100% + 8px); }
  .topbar.company-search-open .brand-family { display:none; }
}
@media(max-width:650px){
  .topbar.company-search-open :is(.brand-name,.brand-family) { visibility:hidden; }
  .topbar.company-search-open .account > .notification-wrap { display:none; }
  .company-search.is-open { flex:1; width:auto; }
  #company-search-panel { max-height:calc(100dvh - 90px); }
  .company-search-tabs { padding:10px; gap:2px; }
  html:root .company-search-tabs button { padding:7px 8px; min-height:40px; }
  #company-search-status { padding-inline:14px; }
  #company-search-results { padding-inline:6px; }
}
@media(prefers-reduced-motion:reduce){ .company-search { transition:none; } #company-search-panel { animation:none; } }
