/* CG Classroom — Engagement pack (reactions, polls, attention, leaderboard) */
.cge-cbtn .cg-cbtn-ico { font-size: 18px; }

/* Reaction bar (everyone) */
.cge-reactbar {
  position: fixed; bottom: 96px; right: 16px; z-index: 99998;
  display: flex; gap: 4px; background: rgba(15, 23, 42, .82); padding: 6px 8px;
  border-radius: 26px; box-shadow: 0 3px 14px rgba(0, 0, 0, .3); backdrop-filter: blur(6px);
}
.cge-react-btn {
  border: 0; background: transparent; font-size: 22px; line-height: 1; cursor: pointer;
  padding: 4px 5px; border-radius: 50%; transition: transform .12s;
}
.cge-react-btn:hover { transform: scale(1.35); }
.cge-react-btn:active { transform: scale(.9); }

.cge-float { position: fixed; bottom: 120px; z-index: 99997; pointer-events: none; animation: cge-rise 3.2s ease-out forwards; }
@keyframes cge-rise {
  0% { opacity: 0; transform: translateY(0) scale(.6); }
  15% { opacity: 1; transform: translateY(-20px) scale(1.1); }
  100% { opacity: 0; transform: translateY(-60vh) scale(1) rotate(12deg); }
}

/* Shared live panel */
.cge-live {
  position: fixed; bottom: 88px; left: 50%; transform: translateX(-50%); z-index: 99999;
  width: min(460px, 92vw); background: #fff; border-radius: 16px; padding: 18px 20px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .3); font-family: Athletics, -apple-system, sans-serif; color: #1B2D4F;
  max-height: 70vh; overflow-y: auto;
}
.cge-live h3 { margin: 0 0 12px; font-size: 17px; }
.cge-q { font-size: 15px; font-weight: 700; margin-bottom: 12px; line-height: 1.35; }
.cge-note { font-size: 12px; color: #64748b; margin-top: 10px; }

/* Poll option buttons (student) */
.cge-opt-btn {
  display: block; width: 100%; text-align: left; margin: 7px 0; padding: 12px 14px;
  border: 1.5px solid #cbd5e1; border-radius: 10px; background: #fff; cursor: pointer;
  font-size: 14px; font-family: inherit; transition: .12s;
}
.cge-opt-btn:hover:not(:disabled) { border-color: #1B2D4F; background: #f8fafc; }
.cge-opt-btn:disabled { opacity: .6; cursor: default; }
.cge-opt-btn.cge-picked { border-color: #1B2D4F; background: #ddebff; font-weight: 700; }

/* Result / live bars */
.cge-crow { display: flex; align-items: center; gap: 10px; margin: 7px 0; }
.cge-clabel { width: 24px; height: 24px; border-radius: 50%; background: #1B2D4F; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; flex: 0 0 auto; }
.cge-cbar { flex: 1; height: 12px; background: #eef2f6; border-radius: 8px; overflow: hidden; }
.cge-cbar i { display: block; height: 100%; width: 0; background: #FF6B35; border-radius: 8px; transition: width .4s; }
.cge-cn { font-size: 12px; font-weight: 700; color: #475569; min-width: 60px; text-align: right; }

/* Attention */
.cge-attn { text-align: center; }
.cge-attn-yes { font-size: 16px; padding: 14px 22px; }
.cge-attncount { font-size: 20px; font-weight: 800; color: #FF6B35; margin: 6px 0; }

/* Leaderboard */
.cge-leaders { display: flex; flex-direction: column; gap: 5px; }
.cge-lrow { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; background: #f8fafc; font-size: 14px; }
.cge-lrow.cge-top { background: linear-gradient(90deg, #fff7ed, #fff); border: 1px solid #fed7aa; }
.cge-lrank { width: 22px; font-weight: 800; color: #FF6B35; text-align: center; }
.cge-lname { flex: 1; font-weight: 600; }
.cge-lpts { font-weight: 800; color: #1B2D4F; }

/* Buttons + composer modal */
.cge-btn { padding: 9px 16px; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; cursor: pointer; font-size: 13px; font-weight: 700; font-family: inherit; }
.cge-btn.cge-pri { background: #1B2D4F; color: #fff; border-color: #1B2D4F; width: 100%; margin-top: 12px; }
.cge-bar { display: flex; gap: 8px; margin-top: 12px; }
.cge-bar .cge-btn { flex: 1; }
.cge-modal { position: fixed; inset: 0; background: rgba(15, 23, 42, .5); z-index: 100000; display: flex; align-items: center; justify-content: center; }
.cge-card { background: #fff; border-radius: 16px; padding: 22px; width: min(440px, 92vw); font-family: Athletics, -apple-system, sans-serif; color: #1B2D4F; }
.cge-card h3 { margin: 0 0 14px; }
.cge-in { width: 100%; border: 1px solid #cbd5e1; border-radius: 8px; padding: 10px 12px; font-size: 14px; margin-bottom: 8px; box-sizing: border-box; font-family: inherit; }

/* Tier 2 — Q&A queue */
.cge-react-btn.cge-special { font-size: 18px; position: relative; }
.cge-qabadge { position: absolute; top: -4px; right: -4px; background: #FF6B35; color: #fff; font: 800 10px/1 sans-serif; min-width: 15px; height: 15px; padding: 0 3px; border-radius: 8px; display: flex; align-items: center; justify-content: center; }
.cge-qahead { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cge-qahead h3 { margin: 0; }
.cge-qalist { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.cge-qarow { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid #e5e7eb; border-radius: 10px; background: #fff; }
.cge-qarow.cge-qadone { opacity: .5; }
.cge-qup { flex: 0 0 auto; min-width: 44px; border: 1px solid #cbd5e1; background: #f8fafc; border-radius: 8px; padding: 6px 4px; font: 800 12px/1.2 inherit; color: #475569; cursor: pointer; text-align: center; }
.cge-qup.cge-qup-on { background: #1B2D4F; color: #fff; border-color: #1B2D4F; }
.cge-qup:disabled { cursor: default; }
.cge-qbody { flex: 1; }
.cge-qtext { font-size: 14px; font-weight: 600; line-height: 1.35; }
.cge-qwho { font-size: 11px; color: #94a3b8; margin-top: 3px; }
.cge-qdone-btn { flex: 0 0 auto; padding: 6px 10px; background: #16a34a; color: #fff; border-color: #16a34a; }

/* Tier 2 — Pick a student */
.cge-picknames { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; max-height: 34vh; overflow-y: auto; }
.cge-pickname { flex: 0 0 auto; }
.cge-pickover { position: fixed; inset: 0; z-index: 100002; display: flex; align-items: center; justify-content: center; background: rgba(15, 23, 42, .35); pointer-events: none; transition: opacity .6s; }
.cge-pickover.cge-pickfade { opacity: 0; }
.cge-pickcard { background: #1B2D4F; color: #fff; border-radius: 20px; padding: 26px 40px; text-align: center; box-shadow: 0 16px 50px rgba(0, 0, 0, .4); animation: cge-pickpop .45s cubic-bezier(.2, 1.4, .4, 1); }
.cge-pickcard.cge-pickmine { background: linear-gradient(135deg, #FF6B35, #f43f5e); }
.cge-picktag { font: 800 13px/1 Athletics, sans-serif; letter-spacing: 1px; opacity: .9; }
.cge-pickbig { font: 800 34px/1.1 Athletics, sans-serif; margin: 8px 0 4px; }
.cge-picksub { font: 600 13px/1 Athletics, sans-serif; opacity: .85; }
@keyframes cge-pickpop { 0% { transform: scale(.6); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }

@media (max-width: 480px) {
  .cge-reactbar { bottom: 78px; right: 8px; }
  .cge-live { bottom: 74px; }
  .cge-pickbig { font-size: 26px; }
}
