/* bis_wiki.css -- the search-options menu (magnifying glass) and the 📖 Wikipedia card. */
.searchbox { position: relative; }
.searchbox button.glass {
    border: 0; background: none; padding: 4px 6px; margin: 0 -2px 0 -6px; border-radius: 999px; cursor: pointer;
    font: inherit; font-size: 18px; line-height: 1; color: var(--faint); position: relative;
}
.searchbox button.glass:hover, .searchbox button.glass[aria-expanded="true"] { background: var(--surface-2); }
.searchbox button.glass:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.searchbox button.glass.on::after {
    content: ''; position: absolute; right: 2px; top: 2px; width: 8px; height: 8px; border-radius: 50%;
    background: var(--ok); box-shadow: 0 0 0 2px var(--surface);
}
.search-menu {
    position: absolute; left: 8px; top: calc(100% + 8px); z-index: 50; min-width: 280px; max-width: calc(100vw - 32px);
    background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 12px;
    box-shadow: var(--shadow-lg); padding: 6px; text-align: left;
}
.search-menu[hidden] { display: none; }
.search-menu-item { display: flex; gap: 10px; align-items: flex-start; padding: 10px 10px; border-radius: 8px; cursor: pointer; }
.search-menu-item:hover { background: var(--surface-2); }
.search-menu-item input { margin-top: 3px; accent-color: var(--accent); width: 16px; height: 16px; }
.search-menu-item span { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.search-menu-item small { color: var(--muted); font-size: 12.5px; }

.badge.wiki { background: rgba(32, 33, 36, .08); color: var(--text); }
body.dark .badge.wiki { background: rgba(255, 255, 255, .1); }
.wiki-offer { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.wiki-fetch {
    font: inherit; font-size: 14px; padding: 9px 14px; border-radius: 999px; cursor: pointer;
    border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
}
.wiki-fetch:hover { border-color: var(--accent); color: var(--accent); }
.wiki-hint { font-size: 13px; color: var(--muted); }
.wiki-thumb { float: right; max-width: 34%; max-height: 220px; margin: 2px 0 10px 16px; border-radius: 10px; object-fit: cover; }
.wiki-text h4 { margin: 18px 0 6px; font-size: 16px; }
.wiki-text h5 { margin: 14px 0 4px; font-size: 14.5px; color: var(--muted); }
.wiki .answer.clamped { max-height: 16em; overflow: hidden; -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
.wiki-note { color: var(--muted); font-size: 13.5px; }
.wiki-foot { clear: both; margin-top: 10px; font-size: 12.5px; color: var(--faint); }
.wiki-foot a { color: var(--link); }
@media (max-width: 560px) { .wiki-thumb { max-width: 40%; max-height: 140px; } .search-menu { left: 0; } }
