/* EDUC8EU AI Finder – isolated shared widget. Works on homepage and all pages using topmenu.jsp. */
.e8f-menu-trigger, .e8f-panel, .e8f-panel * { box-sizing: border-box; }
.e8f-menu-trigger[hidden], .e8f-panel[hidden] { display: none !important; }
.e8f-menu-trigger { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid #77afff; border-radius: 10px; background: #fff; color: #0e55bc; padding: 7px 10px; font: inherit; font-size: 15px; font-weight: 700; line-height: 1.1; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, box-shadow .15s; }
.e8f-menu-trigger:hover, .e8f-menu-trigger[aria-expanded="true"] { background: #edf5ff; border-color: #2466ca; box-shadow: 0 2px 7px #173b6820; }
.e8f-menu-trigger:focus-visible, .e8f-action:focus-visible { outline: 3px solid #c07a12; outline-offset: 3px; }
/* The legacy style.scss has `svg { position:absolute; top:0; left:0; }`.
   Scope the reset ONLY to Finder launcher SVGs, preserving legacy icons. */
.e8f-menu-trigger > svg.e8f-icon {
  position: static !important;
  inset: auto !important;
  display: block;
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  transform: none;
}
/* Responsive shared navigation: the 300px logo may shrink, action buttons may not.
   Do not mask overflow; keep the Finder and hamburger visible on narrow screens. */
@media (max-width: 1279px) {
  #scrollTop > .e8f-header-row { width: 100%; min-width: 0; gap: 8px; }
  #scrollTop .e8f-header-logo {
    display: block; width: 300px; height: auto;
    max-width: 100%; min-width: 0;
    flex: 0 1 300px; object-fit: contain; object-position: left center;
  }
  #scrollTop .e8f-mobile-controls { flex: 0 0 auto; }
}
@media (max-width: 359px) {
  #scrollTop .e8f-mobile-controls > span { margin-left: 0; margin-right: 0; }
}
.e8f-mobile-controls { display: flex; align-items: center; gap: 4px; }
.e8f-mobile-trigger { padding: 6px; }
.e8f-desktop-entry { display: none; }
@media (min-width: 1280px) { .e8f-desktop-entry { display: list-item; } .e8f-mobile-controls { display: none; } .e8f-desktop-trigger span { display: none; } }
@media (min-width: 1550px) { .e8f-desktop-trigger span { display: inline; } }
.e8f-floating-trigger { position: fixed; bottom: max(16px, env(safe-area-inset-bottom)); right: 16px; z-index: 2999; padding: 9px 12px; background: #fff; box-shadow: 0 6px 24px rgba(13,47,94,.25); }
.e8f-panel { position: fixed; right: 20px; bottom: 20px; z-index: 3000; display: flex; flex-direction: column; width: min(520px, calc(100vw - 40px)); height: min(640px, calc(100vh - 40px)); height: min(640px, calc(100dvh - 40px)); border: 1px solid #a9c8f2; border-radius: 15px; background: #fff; color: #17304d; overflow: hidden; box-shadow: 0 15px 52px rgba(21,58,105,.28); font-family: inherit; isolation: isolate; }
.e8f-panel.e8f-expanded { inset: 10px; right: 10px; bottom: 10px; width: auto; height: auto; border-radius: 12px; }
.e8f-head { flex: 0 0 auto; display: flex; gap: 8px; justify-content: space-between; align-items: center; min-height: 53px; padding: 9px 12px; border-bottom: 1px solid #d4e3f8; background: #edf4ff; }
.e8f-head h2 { margin: 0; color: #17477d; font: inherit; font-size: 15px; font-weight: 700; line-height: 1.3; }
.e8f-actions { display: flex; gap: 6px; flex: 0 0 auto; }
.e8f-action { padding: 5px 9px; border-radius: 7px; border: 1px solid #b9cee8; background: #fff; color: #1d589f; font: inherit; font-size: 12px; line-height: 1.2; cursor: pointer; min-height: 34px; }
.e8f-action:hover { background: #e5efff; }
#e8f-frame { width: 100%; flex: 1 1 auto; height: 100%; min-height: 0; display: block; border: 0; background: #fff; }
body.e8f-open { /* Shared state for coordination with homepage What's New. */ }
@media (max-width: 680px) {
 .e8f-panel { right: 9px; bottom: max(9px, env(safe-area-inset-bottom)); width: calc(100vw - 18px); height: 70vh; height: 70dvh; border-radius: 12px; }
 .e8f-panel.e8f-expanded { inset: 5px; width: auto; height: auto; }
 body.e8f-open .e8-release-ui { bottom: calc(70dvh + 18px) !important; }
 body.e8f-expanded-page .e8-release-ui { display: none !important; }
}
@media (prefers-reduced-motion: reduce) { .e8f-menu-trigger { transition: none; } }
