/* ============================================================
   05-terminal.css  —  Warmind Terminal integration (loaded LAST)
   1) Spinning dashed-ring animation for the Terminal nav icon
   2) Styles for the isolated terminal iframe overlay
   The shell (left rail + quiet top strip) is 01-core-1.css;
   nothing here affects the content of any existing page.
   ============================================================ */

/* --- Terminal nav icon: the dashed ring spins on hover / when active --- */
.page-nav-btn .term-ico { overflow: visible; }
.page-nav-btn .term-ring { transform-box: fill-box; transform-origin: center; transition: opacity .2s ease; }
.page-nav-btn:hover .term-ring,
.page-nav-btn.active .term-ring { animation: termRingSpin 2s linear infinite; }
.page-nav-btn.active .term-glow { opacity: 0.42; }
@keyframes termRingSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* --- Isolated terminal overlay: iframe fills the area below the top strip,
       right of the rail (mobile overrides in 04-mobile.css) --- */
.terminal-overlay {
  position: fixed;
  left: var(--rail-w);
  right: 0;
  bottom: 0;
  top: 0;            /* JS sets the real top to the header's height */
  z-index: 60;
  display: none;
  background: #07080c;
}
.terminal-overlay.open { display: block; }
.terminal-frame {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #07080c;
}
/* Mobile: no rail on the left; stop above the fixed bottom bar (04-mobile). */
@media (max-width: 768px) {
  .terminal-overlay {
    left: 0;
    bottom: calc(var(--rail-mobile-h) + env(safe-area-inset-bottom, 0px));
  }
}
body.terminal-active { overflow: hidden; }
/* While the terminal is open, fully remove the previous page: nothing shows
   through, and the heavy page stops painting behind the sphere (perf). */
body.terminal-active #mainContent { display: none !important; }
body.terminal-active .search-container,
body.terminal-active .stats-bar { display: none !important; }
