/*
 * help-guide.css — in-app guide of every portal page (help-guide.js).
 *
 * The «?» button sits bottom-left: the guide drawer, and on the student lab
 * page the course guide panel, open on the right, so a bottom-right button
 * covered their text.
 */

#hg-fab {
  position: fixed; bottom: 24px; left: 24px; z-index: 9998;
  width: 44px; height: 44px; border-radius: 50%;
  background: #2563eb; color: #fff; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(37,99,235,0.4);
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.2s;
  font-size: 20px; font-weight: 700; line-height: 1;
}
#hg-fab:hover { transform: scale(1.1); box-shadow: 0 6px 20px rgba(37,99,235,0.5); }
#hg-fab.hg-hidden { opacity: 0; pointer-events: none; }

#hg-overlay {
  position: fixed; inset: 0; z-index: 9999; background: rgba(0,0,0,0.3);
  opacity: 0; pointer-events: none; transition: opacity 0.2s;
}
#hg-overlay.hg-open { opacity: 1; pointer-events: auto; }

#hg-drawer {
  position: fixed; right: 0; top: 0; bottom: 0; z-index: 10000;
  width: 420px; max-width: 90vw; height: 100vh;
  background: #1e293b; border-left: 1px solid #334155;
  display: flex; flex-direction: column; overflow: hidden;
  box-shadow: -4px 0 20px rgba(0,0,0,0.3);
  transform: translateX(100%); transition: transform 0.25s cubic-bezier(0.4,0,0.2,1);
}
#hg-drawer.hg-open { transform: translateX(0); }

#hg-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid #334155; flex-shrink: 0;
}
#hg-header span { color: #e2e8f0; font-weight: 600; font-size: 14px; }
#hg-close {
  color: #64748b; background: none; border: none; cursor: pointer;
  font-size: 20px; padding: 4px 8px; border-radius: 4px; line-height: 1;
}
#hg-close:hover { color: #e2e8f0; background: rgba(255,255,255,0.05); }

#hg-content { flex: 1; overflow-y: auto; padding: 16px; min-height: 0; }
#hg-content::-webkit-scrollbar { width: 6px; }
#hg-content::-webkit-scrollbar-track { background: transparent; }
#hg-content::-webkit-scrollbar-thumb { background: #334155; border-radius: 3px; }
#hg-content::-webkit-scrollbar-thumb:hover { background: #475569; }

#hg-loading {
  display: flex; align-items: center; justify-content: center;
  padding: 2rem; color: #64748b; font-size: 14px;
}
#hg-content .hg-message { color: #64748b; padding: 1rem; text-align: center; }
#hg-content .hg-raw { color: #94a3b8; padding: 1rem; white-space: pre-wrap; }

/* Guide content (same look as the student course guide) */
#hg-content h1 { font-size: 1.4rem; font-weight: 700; color: #e2e8f0; margin: 1.25rem 0 0.75rem; }
#hg-content h2 { font-size: 1.15rem; font-weight: 600; color: #e2e8f0; margin: 1rem 0 0.5rem; }
#hg-content h3 { font-size: 1rem; font-weight: 600; color: #e2e8f0; margin: 0.75rem 0 0.5rem; }
#hg-content p { color: #94a3b8; margin: 0.5rem 0; line-height: 1.7; font-size: 0.9rem; }
#hg-content pre { background: #0f1419; border: 1px solid #2d3548; border-radius: 0.5rem; padding: 0.75rem; margin: 0.5rem 0; overflow-x: auto; font-size: 0.82rem; }
#hg-content code { font-family: "JetBrains Mono", "Fira Code", monospace; font-size: 0.82rem; }
#hg-content p code, #hg-content li code { background: #242b3d; padding: 0.1rem 0.35rem; border-radius: 0.25rem; color: #60a5fa; }
#hg-content ul, #hg-content ol { padding-left: 1.25rem; margin: 0.4rem 0; color: #94a3b8; font-size: 0.9rem; }
#hg-content li { margin: 0.2rem 0; }
#hg-content ul li { list-style: disc; }
#hg-content ol li { list-style: decimal; }
#hg-content blockquote { border-left: 3px solid #f59e0b; padding: 0.5rem 0.75rem; margin: 0.5rem 0; background: rgba(245,158,11,0.06); border-radius: 0 0.25rem 0.25rem 0; }
#hg-content blockquote p { color: #fbbf24; font-size: 0.85rem; }
#hg-content blockquote.bq-output { border-left-color: #334155; background: #0b0f18; }
#hg-content blockquote.bq-output p { color: #475569; }
#hg-content blockquote.bq-note { display: flex; align-items: flex-start; gap: 8px; }
#hg-content table { width: 100%; border-collapse: collapse; margin: 0.5rem 0; font-size: 0.85rem; }
#hg-content th { text-align: left; padding: 6px 10px; background: #0f172a; color: #94a3b8; border-bottom: 1px solid #334155; font-weight: 600; }
#hg-content td { padding: 6px 10px; border-bottom: 1px solid #1e293b; color: #94a3b8; }
#hg-content a { color: #60a5fa; text-decoration: none; }
#hg-content a:hover { text-decoration: underline; }
#hg-content strong { color: #e2e8f0; }
#hg-content hr { border: none; border-top: 1px solid #334155; margin: 1rem 0; }
#hg-content img { max-width: 100%; border-radius: 0.5rem; margin: 0.5rem 0; }
#hg-content .copy-btn { position: absolute; top: 6px; right: 6px; }
#hg-content .type-btn { position: absolute; top: 6px; right: 36px; }
