/* ============================================================
   OctoDecks Interactive Sessions — Shared Activity Styles
   Used by all activity modules (wordcloud, mcq, poll, etc.)
   ============================================================ */

/* ── Layout wrappers ── */
.act-wrap {
  padding: 24px;
  max-width: 560px;
  margin: auto;
}

.act-card {
  background: var(--bg-white);
  border: 1.5px solid var(--border-color);
  border-radius: 14px;
  padding: 20px 24px;
  margin-bottom: 16px;
}

/* ── Typography ── */
.act-title {
  font-size: 1.15rem;
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--text-primary);
  margin-bottom: 6px;
}

.act-subtitle {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ── Tag pill ── */
.act-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 100px;
  background: var(--blue-light);
  color: var(--blue);
  border: 1px solid rgba(44, 111, 173, 0.2);
  margin-bottom: 12px;
}

/* ── Option buttons ── */
.act-option-btn {
  display: block;
  width: 100%;
  padding: 14px 18px;
  margin-bottom: 10px;
  background: var(--bg-white);
  border: 1.5px solid var(--border-color);
  border-radius: 10px;
  font-size: 0.9rem;
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
  transition: all 0.18s;
}
.act-option-btn:hover {
  border-color: var(--blue);
  background: var(--blue-light);
}
.act-option-btn.selected {
  border-color: var(--blue);
  background: var(--blue-light);
  color: var(--blue);
  font-weight: 600;
}
.act-option-btn.correct {
  border-color: #1a7a4a;
  background: rgba(26, 122, 74, 0.1);
  color: #1a7a4a;
  font-weight: 600;
}
.act-option-btn.wrong {
  border-color: var(--red);
  background: var(--red-light);
  color: var(--red);
}

/* ── Submit button ── */
.act-submit-btn {
  background: var(--blue);
  color: white;
  border: none;
  border-radius: 10px;
  height: 48px;
  width: 100%;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: var(--font-display);
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 8px;
}
.act-submit-btn:hover {
  background: var(--blue-hover);
}
.act-submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ── Submitted confirmation state ── */
.act-submitted {
  text-align: center;
  padding: 32px 16px;
}
.act-submitted .tick {
  font-size: 3rem;
  display: block;
  margin-bottom: 12px;
}
.act-submitted p {
  font-size: 1rem;
  color: var(--text-secondary);
}

/* ── Text inputs ── */
.act-input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border-color);
  border-radius: 10px;
  font-size: 0.9rem;
  font-family: var(--font-display);
  color: var(--text-primary);
  background: var(--bg-white);
  outline: none;
  box-sizing: border-box;
}
.act-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(44, 111, 173, 0.12);
}

.act-textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border-color);
  border-radius: 10px;
  font-size: 0.9rem;
  font-family: var(--font-display);
  color: var(--text-primary);
  background: var(--bg-white);
  outline: none;
  box-sizing: border-box;
  min-height: 100px;
  resize: vertical;
}
.act-textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(44, 111, 173, 0.12);
}

/* ── Results bars ── */
.act-results-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.act-results-label {
  flex-shrink: 0;
  width: 120px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
}
.act-results-bar-wrap {
  flex: 1;
  background: var(--grey-200);
  border-radius: 100px;
  height: 10px;
  overflow: hidden;
}
.act-results-bar {
  height: 100%;
  background: var(--blue);
  border-radius: 100px;
  transition: width 0.4s ease;
}
.act-results-count {
  flex-shrink: 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
  min-width: 28px;
  text-align: right;
}

/* ── RAG self-assessment ── */
.act-rag-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin: 20px 0;
}
.act-rag-btn {
  flex: 1;
  max-width: 120px;
  height: 88px;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  transition: all 0.18s;
}
.act-rag-btn.red {
  background: rgba(192, 57, 43, 0.1);
  color: #c0392b;
  border: 2px solid rgba(192, 57, 43, 0.25);
}
.act-rag-btn.amber {
  background: rgba(176, 125, 42, 0.1);
  color: #b07d2a;
  border: 2px solid rgba(176, 125, 42, 0.25);
}
.act-rag-btn.green {
  background: rgba(26, 122, 74, 0.1);
  color: #1a7a4a;
  border: 2px solid rgba(26, 122, 74, 0.25);
}
.act-rag-btn.selected {
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}
.act-rag-btn .emoji {
  font-size: 1.8rem;
  line-height: 1;
}

/* ── 2-column grid ── */
.act-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* ── Pair matching items ── */
.act-pair-item {
  padding: 14px 16px;
  background: var(--bg-white);
  border: 1.5px solid var(--border-color);
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s;
  text-align: center;
}
.act-pair-item.selected {
  border-color: var(--blue);
  background: var(--blue-light);
  color: var(--blue);
}
.act-pair-item.matched {
  border-color: #1a7a4a;
  background: rgba(26, 122, 74, 0.08);
  color: #1a7a4a;
  cursor: default;
}
.act-pair-item.wrong {
  border-color: var(--red);
  background: var(--red-light);
  animation: shake 0.4s;
}

/* ── Cloze passage ── */
.act-cloze-text {
  font-size: 1rem;
  line-height: 2.2;
  color: var(--text-primary);
}
.act-cloze-blank {
  display: inline-block;
  border: none;
  border-bottom: 2px solid var(--blue);
  min-width: 80px;
  padding: 2px 6px;
  font-size: 1rem;
  font-family: var(--font-display);
  color: var(--text-primary);
  background: transparent;
  outline: none;
  text-align: center;
}

/* ── Shake animation ── */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

/* ── Teacher presenter (dark background) ── */
.act-presenter {
  background: #0f172a;
  color: white;
  min-height: 100%;
  padding: 32px;
  font-family: var(--font-display);
}
.act-presenter .act-title {
  color: white;
  font-size: 1.4rem;
}
.act-presenter .act-subtitle {
  color: rgba(255, 255, 255, 0.6);
}
.act-presenter-bar {
  height: 14px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 100px;
  overflow: hidden;
  margin-bottom: 4px;
}
.act-presenter-bar-fill {
  height: 100%;
  border-radius: 100px;
  background: var(--blue);
  transition: width 0.5s ease;
}
.act-presenter-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.act-room-badge {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: white;
}

/* ── Dark theme overrides ── */
[data-theme="dark"] .act-card,
[data-theme="dark"] .act-option-btn,
[data-theme="dark"] .act-input,
[data-theme="dark"] .act-textarea,
[data-theme="dark"] .act-pair-item {
  background: #1c1c1c;
  border-color: #2a2a2a;
}
