/* Shared styles for "Help me understand" clickable glossary, drawer & Practice Quiz */
.hu-glossary-term {
  background: rgba(56, 189, 248, 0.14);
  color: inherit;
  border-bottom: 2px dotted #38bdf8;
  border-radius: 4px;
  padding: 0 3px;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.15s ease;
}
.hu-glossary-term:hover {
  background: rgba(56, 189, 248, 0.28);
}

.hu-fab {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 9000;
  background: #0284c7;
  color: #ffffff;
  border: 1px solid #38bdf8;
  border-radius: 999px;
  padding: 10px 16px;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(2, 6, 23, 0.45);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.hu-fab:hover {
  background: #0369a1;
}
.hu-fab-badge {
  background: rgba(15, 23, 42, 0.55);
  color: #38bdf8;
  border-radius: 999px;
  padding: 1px 7px;
  font-size: 0.76rem;
}

.hu-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(460px, 100vw);
  height: 100vh;
  background: #0f172a;
  color: #f1f5f9;
  border-left: 1px solid #2a364f;
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.55);
  z-index: 9500;
  display: flex;
  flex-direction: column;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.55;
  transform: translateX(100%);
  transition: transform 0.22s ease;
}
.hu-drawer.open {
  transform: translateX(0);
}
.hu-drawer * {
  box-sizing: border-box;
}
.hu-drawer-head {
  padding: 15px 18px;
  background: #131a26;
  border-bottom: 1px solid #2a364f;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.hu-drawer-body {
  padding: 18px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.hu-tray-bar {
  padding: 12px 18px;
  background: #131a26;
  border-top: 1px solid #2a364f;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.hu-tray-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.hu-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #1b2436;
  border: 1px solid #2a364f;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 0.78rem;
  color: #e2e8f0;
}
.hu-chip button {
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 0;
  font-weight: 700;
}
.hu-btn {
  background: #1b2436;
  color: #f1f5f9;
  border: 1px solid #2a364f;
  border-radius: 8px;
  padding: 7px 12px;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
}
.hu-btn:hover { border-color: #38bdf8; }
.hu-btn.primary { background: #0284c7; border-color: #38bdf8; color: #fff; }
.hu-btn.emerald { background: #059669; border-color: #34d399; color: #fff; }
.hu-btn.small { padding: 5px 10px; font-size: 0.78rem; }
.hu-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.hu-card {
  background: #131a26;
  border: 1px solid #2a364f;
  border-radius: 10px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.hu-vital-box {
  background: rgba(167, 139, 250, 0.12);
  border: 1px solid rgba(167, 139, 250, 0.38);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 0.88rem;
}
.hu-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  background: rgba(56, 189, 248, 0.16);
  color: #38bdf8;
}
.hu-opt {
  text-align: left;
  background: #1b2436;
  color: #f1f5f9;
  border: 1px solid #2a364f;
  border-radius: 8px;
  padding: 9px 12px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.88rem;
}
.hu-opt.selected { border-color: #38bdf8; background: rgba(56, 189, 248, 0.16); }
.hu-opt.correct { border-color: #34d399; background: rgba(52, 211, 153, 0.18); }
.hu-opt.wrong { border-color: #fb7185; background: rgba(251, 113, 133, 0.18); }
.hu-select {
  background: #1b2436;
  color: #38bdf8;
  border: 1px solid #2a364f;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 0.88rem;
}
.hu-match-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.hu-match-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.hu-feedback {
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.84rem;
}
.hu-feedback.ok { background: rgba(52, 211, 153, 0.14); border: 1px solid #34d399; }
.hu-feedback.bad { background: rgba(251, 113, 133, 0.14); border: 1px solid #fb7185; }
.hu-search {
  width: 100%;
  background: #1b2436;
  color: #f1f5f9;
  border: 1px solid #2a364f;
  border-radius: 8px;
  padding: 8px 12px;
  font-family: inherit;
  font-size: 0.88rem;
}

/* Shared non-blocking Student Auth Banner on lesson pages */
.ssg-auth-banner {
  background: #131a26;
  color: #f1f5f9;
  border-bottom: 1px solid #2a364f;
  padding: 8px 16px;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 0.84rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  position: relative;
  z-index: 8000;
}
.ssg-auth-banner a {
  color: #38bdf8;
  text-decoration: none;
  font-weight: 700;
}
.ssg-auth-modal-bg {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.78);
  z-index: 9800;
  display: none;
  place-items: center;
  padding: 16px;
}
.ssg-auth-modal-bg.open { display: grid; }
.ssg-auth-modal {
  width: min(400px, 100%);
  background: #131a26;
  color: #f1f5f9;
  border: 1px solid #2a364f;
  border-radius: 14px;
  padding: 20px;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

@media (max-width: 640px) {
  .hu-drawer {
    top: auto;
    bottom: 0;
    width: 100vw;
    height: 82vh;
    border-left: none;
    border-top: 1px solid #2a364f;
    border-radius: 16px 16px 0 0;
    transform: translateY(100%);
  }
  .hu-drawer.open { transform: translateY(0); }
  .hu-match-grid { grid-template-columns: 1fr; }
}
