/* ============================================================
   WisEdoo Slides — Student Mobile Stylesheet
   Theo chuẩn WisEdoo Design System ("Thực học — Thực hành")
   ============================================================ */

:root {
  --wis-teal: #0F6679;
  --wis-teal-700: #0d5a6b;
  --wis-teal-500: #2a8194;
  --wis-teal-200: #b9d6dc;
  --wis-teal-100: #e2eef1;
  --wis-teal-50: #f1f7f8;

  --wis-red: #990011;
  --wis-red-700: #780009;
  --wis-red-100: #f5dee0;

  --wis-yellow: #FFBD00;
  --wis-yellow-700: #d99f00;
  --wis-yellow-100: #fff1cb;

  --wis-brown: #6F5B55;
  --wis-brown-700: #574540;
  --wis-brown-100: #ece7e5;

  --wis-ink: #07070A;
  --wis-paper: #fbf9f5;
  --wis-white: #ffffff;
  --wis-line: #e4e2dd;

  --shadow-sm: 0 2px 6px rgba(15,102,121,.07), 0 1px 2px rgba(7,7,10,.04);
  --shadow-md: 0 8px 22px rgba(15,102,121,.10), 0 2px 6px rgba(7,7,10,.05);
  --shadow-lg: 0 18px 40px rgba(15,102,121,.14), 0 4px 10px rgba(7,7,10,.06);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 26px;
  --radius-pill: 999px;

  --font-brand: 'Quicksand', sans-serif;
  --font-serif-heading: 'Neue Einstellung', sans-serif;
  --font-mono: ui-monospace, 'SF Mono', Menlo, monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  touch-action: manipulation;
  overflow-x: hidden;
  overscroll-behavior-x: none;
}

body {
  font-family: var(--font-brand);
  background-color: var(--wis-paper);
  color: var(--wis-ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  touch-action: manipulation;
  overflow-x: hidden;
  overscroll-behavior-x: none;
  padding-bottom: 84px; /* Chừa chỗ cho thanh Q&A đáy */
}

/* Thao tác chạm: chống tự phóng to khi bấm đúp nhanh (Safari iPhone), vẫn giữ chụm hai ngón phóng to */
button,
input,
textarea,
select,
a,
[role="button"],
.btn-reaction,
.reaction-unit-btn {
  touch-action: manipulation;
}

/* Mọi ô nhập, ô chọn trên màn học viên: cỡ chữ >= 16px để chống iPhone tự zoom khi bấm vào */
input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=hidden]),
textarea,
select {
  font-size: 16px;
  touch-action: manipulation;
}

/* Chữ gợi ý (placeholder) có thể nhỏ hơn bằng ::placeholder để giữ ô gọn gàng */
input::placeholder,
textarea::placeholder {
  font-size: 14px;
}

#input-wordcloud-text,
#input-preview-wordcloud,
.poll-mobile-input {
  font-size: 16px !important;
  touch-action: manipulation;
}

/* ---------- Student Header ---------- */
.student-header {
  height: 56px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--wis-white);
  border-bottom: 1px solid var(--wis-line);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 4px rgba(15, 102, 121, 0.04);
}

.student-header .brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.student-header .brand img {
  height: 28px;
}

.student-user-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--wis-teal-50);
  color: var(--wis-teal);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--wis-teal-200);
}

.score-badge {
  background: var(--wis-yellow);
  color: #07070a;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 12px;
}

/* ---------- Main Container ---------- */
.student-container {
  flex: 1;
  padding: 20px;
  max-width: 500px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
}

/* Screen: Join Form */
.join-card {
  background: var(--wis-white);
  border-radius: var(--radius-xl);
  padding: 32px 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--wis-line);
  margin-top: 20px;
  text-align: center;
}

.join-card img.logo {
  height: 48px;
  margin-bottom: 16px;
}

.join-card h1 {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--wis-ink);
}

.join-card .slogan {
  font-family: var(--font-serif-heading);
  font-size: 16px;
  color: var(--wis-teal);
  margin-bottom: 24px;
}

.form-group {
  margin-bottom: 18px;
  text-align: left;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #5b5b63;
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--wis-line);
  font-family: var(--font-brand);
  font-size: 16px;
  color: var(--wis-ink);
  background: #fbf9f5;
  transition: all 0.2s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--wis-teal);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(15, 102, 121, 0.15);
}

.btn-join {
  width: 100%;
  padding: 15px;
  border-radius: var(--radius-pill);
  background: var(--wis-teal);
  color: #ffffff;
  font-family: var(--font-brand);
  font-size: 16px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  margin-top: 10px;
  box-shadow: 0 4px 12px rgba(15, 102, 121, 0.3);
  transition: all 0.2s ease;
}

.btn-join:active {
  transform: scale(0.97);
  background: var(--wis-teal-700);
}

/* Screen: Regular Slide Mirror (AhaSlides 1:1 Spec) */
.student-mirror-container {
  width: 100%;
  margin-top: 8px;
}

.phone-slide-mirror-box {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1.5px solid #e4e4e7;
  border-radius: 10px;
  background: #ffffff;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.phone-slide-mirror-box:active {
  transform: scale(0.985);
}

.phone-slide-tap-hint {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(15, 23, 42, 0.75);
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
  pointer-events: none;
  backdrop-filter: blur(4px);
  z-index: 5;
}

.phone-slide-mirror-inner {
  width: 820px;
  height: 461px;
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: top left;
  pointer-events: none;
}

/* Fullscreen Zoom Modal cho Slide nội dung điện thoại (Xoay ngang đọc rõ chữ) */
.student-fullscreen-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(15, 23, 42, 0.96);
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px;
  box-sizing: border-box;
  animation: fadeInModal 0.2s ease;
  user-select: none;
}

@keyframes fadeInModal {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}

.student-modal-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: background 0.2s;
  font-size: 18px;
}

.student-modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.35);
}

.student-fullscreen-hint {
  position: absolute;
  top: 18px;
  left: 20px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  font-weight: 500;
  pointer-events: none;
}

.student-fullscreen-box {
  width: min(96vw, calc(90vh * 16 / 9));
  aspect-ratio: 16 / 9;
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
  position: relative;
}

.student-fullscreen-stage-wrap {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.student-fullscreen-stage-wrap .phone-slide-mirror-inner {
  width: 820px;
  height: 461px;
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: top left;
  pointer-events: auto;
}

.preview-content-slide-wrap {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  background: #ffffff;
}

.preview-elements-stage {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.preview-el-item {
  position: absolute;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
}

.btn-phone-ask-qa {
  width: 100%;
  background: #ffffff;
  border: 1.5px solid #e4e4e7;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: all 0.2s;
  margin-top: 12px;
}
.btn-phone-ask-qa:hover {
  border-color: var(--wis-teal);
  color: var(--wis-teal);
}

.phone-qa-stream-wrap {
  width: 100%;
  margin-top: 14px;
}

.phone-qa-stream-header {
  font-size: 13px;
  font-weight: 700;
  color: #64748b;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.phone-qa-stream-count {
  background: #f1f5f9;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  color: #475569;
}

.slide-mirror-card {
  background: var(--wis-white);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--wis-line);
  text-align: center;
  margin-top: 10px;
}

.slide-mirror-card .eyebrow {
  font-family: var(--font-serif-heading);
  font-size: 13px;
  font-weight: 600;
  color: var(--wis-teal);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.slide-mirror-card h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--wis-ink);
  line-height: 1.3;
  margin-bottom: 16px;
}

.slide-mirror-card .hint-text {
  font-size: 14px;
  color: #7b7b83;
  line-height: 1.5;
}

/* Reaction Buttons */
.reactions-bar {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 24px;
}

.btn-reaction {
  background: var(--wis-white);
  border: 1px solid var(--wis-line);
  box-shadow: var(--shadow-sm);
  width: 54px;
  height: 54px;
  border-radius: 50%;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-reaction:active {
  transform: scale(0.88);
  background: var(--wis-teal-50);
}

/* ---------- Mobile Top Navigation Tabs (Clone AhaSlides Image 1) ---------- */
.mobile-tabs-nav {
  display: flex;
  justify-content: space-around;
  align-items: center;
  background: #f4f4f6;
  border-bottom: 1px solid #e4e4e7;
  padding: 8px 12px;
  width: 100%;
}

.mobile-nav-tab {
  background: transparent;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  color: #71717a;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.mobile-nav-tab.active {
  color: #7c3aed;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.mobile-nav-tab .active-dot {
  position: absolute;
  bottom: 2px;
  right: 12px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
}

.mobile-center-logo {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px 0 8px;
}

#screen-active {
  min-width: 0;
  max-width: 100%;
  width: 100%;
  overflow-x: hidden;
}

/* ---------- Floating Sync Banner ---------- */
.sync-presenter-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, var(--wis-teal) 0%, #084350 100%);
  color: #ffffff;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  box-shadow: 0 4px 14px rgba(15, 102, 121, 0.25);
  cursor: pointer;
  animation: bannerSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  user-select: none;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

@keyframes bannerSlideIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.sync-banner-content {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
  overflow: hidden;
  margin-right: 10px;
}

.sync-pulse-icon {
  color: var(--wis-yellow);
  display: inline-flex;
  animation: pulseGlow 1.8s infinite;
  flex-shrink: 0;
}

@keyframes pulseGlow {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.15); opacity: 0.8; }
}

.sync-banner-text {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1;
}

#student-pdf-canvas {
  max-width: 100% !important;
  width: 100% !important;
  height: auto !important;
  display: block;
}

.btn-sync-jump {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #ffffff;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.btn-sync-jump:hover, .btn-sync-jump:active {
  background: #ffffff;
  color: var(--wis-teal);
}

/* ---------- Student Pager Bar ---------- */
.student-pager-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--wis-white);
  border: 1px solid var(--wis-line);
  border-radius: var(--radius-md);
  padding: 6px 10px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
  user-select: none;
}

.btn-student-pager {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid #e4e4e7;
  background: #f8fafc;
  color: #334155;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-student-pager:hover:not(:disabled) {
  background: var(--wis-teal-50);
  border-color: var(--wis-teal-200);
  color: var(--wis-teal);
}

.btn-student-pager:active:not(:disabled) {
  transform: scale(0.92);
}

.btn-student-pager:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

.student-pager-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.slide-count-text {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--wis-ink);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.status-badge.live {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
}

.status-badge.live .live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  animation: liveBlink 1.4s infinite;
}

@keyframes liveBlink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.status-badge.review {
  background: var(--wis-yellow-100);
  color: #854d0e;
  border: 1px solid #fde047;
}

/* ---------- Rich Mirror Body Content ---------- */
.mirror-body-content {
  background: #fafafa;
  border-radius: 10px;
  padding: 14px 16px;
  border: 1px solid #eeeeee;
  color: #3f3f46;
  font-size: 14px;
  line-height: 1.6;
}

.mirror-body-content ul {
  padding-left: 20px;
  margin: 8px 0;
}

.mirror-body-content li {
  margin-bottom: 6px;
}

/* Screen: Interactive Poll / Quiz Radio Options (Image 1) */
.poll-mobile-container {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.poll-mobile-question {
  font-family: var(--font-brand);
  font-size: 22px;
  font-weight: 700;
  color: #18181b;
  margin: 12px 0 16px 0;
  line-height: 1.35;
}

/* Question Image Container (AhaSlides 1:1 Spec) */
.question-image-box {
  width: 100%;
  max-height: 240px;
  margin: 0 0 18px 0;
  border-radius: 10px;
  overflow: hidden;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.07);
  display: flex;
  align-items: center;
  justify-content: center;
}

.question-image-display {
  width: 100%;
  max-height: 240px;
  object-fit: contain;
  display: block;
}

.poll-options-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 18px;
}

.poll-option-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: #ffffff;
  border: 1.5px solid #e4e4e7;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.poll-option-row:hover {
  border-color: #d4d4d8;
}

.poll-option-row.selected {
  border-color: #7c3aed;
  background: #faf5ff;
}

.poll-radio-circle {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #d1d5db;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.poll-option-row.selected .poll-radio-circle {
  border-color: #7c3aed;
}

.poll-radio-circle .radio-inner-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #7c3aed;
  display: none;
}

.poll-option-row.selected .poll-radio-circle .radio-inner-dot {
  display: block;
}

.poll-option-text {
  font-family: var(--font-brand);
  font-size: 16px;
  font-weight: 600;
  color: #27272a;
  flex: 1;
}

.btn-poll-submit {
  width: 100%;
  padding: 14px 20px;
  background: #7c3aed;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-family: var(--font-brand);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 10px;
}

.btn-poll-submit:hover:not(:disabled) {
  background: #6d28d9;
}

.btn-poll-submit:disabled,
.btn-poll-submit.submitted {
  background: #e4e4e7;
  color: #9ca3af;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-poll-ask {
  width: 100%;
  padding: 12px 20px;
  background: #ffffff;
  border: 1.5px solid #e4e4e7;
  border-radius: 8px;
  font-family: var(--font-brand);
  font-size: 15px;
  font-weight: 600;
  color: #18181b;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  margin-bottom: 24px;
}

.btn-poll-ask:hover {
  background: #f4f4f6;
}

/* Reactions Bar with Counts underneath (Image 1) */
.poll-reactions-bar {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 16px 0 10px;
  border-top: 1px solid #f4f4f5;
  margin-top: auto;
}

.reaction-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.reaction-unit-btn {
  background: #ffffff;
  border: 1px solid #e4e4e7;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #4b5563;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.reaction-unit-btn:active {
  transform: scale(0.88);
  background: #f3f4f6;
}

.reaction-unit-count {
  font-family: var(--font-brand);
  font-size: 12px;
  font-weight: 600;
  color: #71717a;
}

/* Screen: Interactive Quiz (WisEdoo Colors) */
.quiz-active-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
}

.quiz-prompt-header {
  background: var(--wis-white);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  border: 1px solid var(--wis-line);
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.quiz-prompt-header .tag {
  font-size: 12px;
  font-weight: 700;
  color: var(--wis-teal);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.quiz-prompt-header h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--wis-ink);
  line-height: 1.35;
  margin-top: 4px;
}

.quiz-buttons-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 6px;
}

.btn-quiz-option {
  width: 100%;
  min-height: 72px;
  padding: 16px 20px;
  border-radius: var(--radius-lg);
  border: none;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  color: #ffffff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.15s cubic-bezier(.4, 0, .2, 1);
  text-align: left;
}

.btn-quiz-option:active {
  transform: scale(0.97);
  filter: brightness(0.92);
}

.btn-quiz-option.selected {
  outline: 4px solid var(--wis-ink);
  filter: brightness(1.05);
}

.btn-quiz-option.opt-A { background: var(--wis-teal); }
.btn-quiz-option.opt-B { background: var(--wis-red); }
.btn-quiz-option.opt-C { background: var(--wis-yellow-700); }
.btn-quiz-option.opt-D { background: var(--wis-brown); }

.opt-badge-pill {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  flex-shrink: 0;
}

.opt-label-text {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
}

.submission-status-card {
  background: var(--wis-teal-50);
  border: 1px solid var(--wis-teal-200);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  text-align: center;
  font-size: 14px;
  color: var(--wis-teal);
  font-weight: 600;
  margin-top: 10px;
  display: none;
}

/* Result Reveal Feedback */
.result-feedback-card {
  background: var(--wis-white);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-md);
  text-align: center;
  margin-top: 16px;
  display: none;
}

.result-feedback-card.correct {
  border: 2px solid #2f8a55;
  background: #f2f9f4;
}

.result-feedback-card.wrong {
  border: 2px solid var(--wis-red);
  background: #fdf3f4;
}

.result-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 6px;
}

.result-feedback-card.correct .result-title { color: #2f8a55; }
.result-feedback-card.wrong .result-title { color: var(--wis-red); }

.result-desc {
  font-size: 14px;
  color: #5b5b63;
  line-height: 1.5;
}

/* ---------- Always-On Bottom Q&A Action Bar ---------- */
.bottom-qa-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 72px;
  padding: 12px 20px;
  background: var(--wis-white);
  border-top: 1px solid var(--wis-line);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 80;
}

.btn-open-qa {
  width: 100%;
  max-width: 480px;
  background: var(--wis-teal-50);
  border: 1.5px solid var(--wis-teal);
  color: var(--wis-teal);
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  font-family: var(--font-brand);
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-open-qa:active {
  background: var(--wis-teal-100);
  transform: scale(0.98);
}

/* ---------- Q&A Drawer (Bottom Sheet) ---------- */
.qa-drawer-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(7, 7, 10, 0.5);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: none;
  align-items: flex-end;
  justify-content: center;
}

.qa-drawer-backdrop.open {
  display: flex;
}

.qa-drawer-content {
  background: var(--wis-paper);
  border-radius: 28px 28px 0 0;
  width: 100%;
  max-width: 540px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: slideUp 0.28s cubic-bezier(.22, .61, .36, 1);
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.drawer-header {
  padding: 18px 24px 14px;
  border-bottom: 1px solid var(--wis-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--wis-white);
}

.drawer-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--wis-ink);
}

.btn-close-drawer {
  background: none;
  border: none;
  font-size: 20px;
  color: #7b7b83;
  cursor: pointer;
  padding: 4px;
}

.drawer-scroll-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.ask-box-wrapper {
  background: var(--wis-white);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--wis-line);
  margin-bottom: 20px;
}

.ask-textarea {
  width: 100%;
  height: 72px;
  border: 1px solid var(--wis-line);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  font-family: var(--font-brand);
  font-size: 16px;
  resize: none;
  background: #fbf9f5;
  color: var(--wis-ink);
  touch-action: manipulation;
  box-sizing: border-box;
}

.ask-textarea:focus {
  outline: none;
  border-color: var(--wis-teal);
  background: #ffffff;
}

.ask-options-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #5b5b63;
  cursor: pointer;
}

.btn-send-question {
  background: var(--wis-teal);
  color: #ffffff;
  border: none;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  font-family: var(--font-brand);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.student-qa-item {
  background: var(--wis-white);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  border: 1px solid var(--wis-line);
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.student-qa-text {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--wis-ink);
}

.student-qa-meta {
  font-size: 12px;
  color: #7b7b83;
  margin-top: 6px;
}

.btn-upvote {
  background: var(--wis-teal-50);
  border: 1px solid var(--wis-teal-200);
  color: var(--wis-teal);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  font-family: var(--font-brand);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  flex-shrink: 0;
}

.btn-upvote.voted {
  background: var(--wis-teal);
  color: #ffffff;
}

/* ============================================================
   Audience Timer Progress Bar & Locked State (AhaSlides Mobile)
   ============================================================ */
.audience-timer-bar-wrapper {
  width: 100%;
  height: 6px;
  background: #f4f4f6;
  border-radius: 999px;
  overflow: hidden;
  margin: 10px 0 16px;
}

.audience-timer-fill {
  height: 100%;
  background: #7c3aed; /* Tím đặc trưng AhaSlides */
  width: 100%;
  border-radius: 999px;
  transition: width 0.9s linear;
}

.btn-poll-submit.locked {
  background: #e4e4e7 !important;
  color: #71717a !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
  opacity: 0.85;
}

/* ============================================================
   OPEN-ENDED SUBMISSION (Chuẩn 1:1 AhaSlides Mobile)
   ============================================================ */
.phone-openended-note {
  font-size: 14px;
  color: #475569;
  text-align: center;
  margin: 14px 10px;
  font-weight: 500;
  line-height: 1.45;
}

.phone-openended-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
  border: 1px solid #e2e8f0;
  width: 100%;
  box-sizing: border-box;
}

.phone-openended-textarea-wrap {
  position: relative;
  width: 100%;
}

.phone-openended-textarea {
  width: 100%;
  min-height: 120px;
  border-radius: 8px;
  border: 1.5px solid #cbd5e1;
  padding: 10px 12px 28px 12px;
  font-size: 16px;
  font-family: inherit;
  resize: vertical;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s;
  color: #1e293b;
  line-height: 1.45;
  touch-action: manipulation;
}

.phone-openended-textarea:focus {
  border-color: #7c3aed;
  box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.12);
}

.phone-openended-counter {
  position: absolute;
  right: 10px;
  bottom: 8px;
  font-size: 12px;
  color: #94a3b8;
  font-weight: 500;
  pointer-events: none;
}

.phone-openended-attach-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-size: 13.5px;
  color: #475569;
  cursor: pointer;
  padding: 4px 2px;
  transition: color 0.15s;
}

.phone-openended-attach-row:hover {
  color: #0d9488;
}

.phone-openended-status-msg {
  margin-top: 12px;
  font-size: 13px;
  color: #475569;
  text-align: center;
  line-height: 1.45;
  background: #f8fafc;
  border-radius: 6px;
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
}

.btn-phone-oe-submit {
  margin-top: 12px;
  width: 100%;
  background: #6d28d9;
  color: #ffffff;
  font-weight: 600;
  font-size: 15px;
  padding: 12px 16px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}

.btn-phone-oe-submit:hover {
  background: #5b21b6;
}

.btn-phone-oe-submit:active {
  transform: scale(0.98);
}

/* ==========================================
   MOBILE Q&A PARTICIPANT STYLES (AhaSlides 1:1 Layout)
   ========================================== */
.qa-mobile-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}

.phone-qa-main-view {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
}

.phone-qa-brand-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 12px;
  font-weight: 700;
  font-size: 17px;
  color: #0f172a;
}

.phone-qa-sparkle {
  color: #ec4899;
  font-size: 18px;
}

.phone-qa-brand-text {
  letter-spacing: -0.2px;
}

.phone-qa-heading {
  font-size: 24px;
  font-weight: 800;
  color: #0f172a;
  text-align: center;
  margin: 0 0 16px 0;
  letter-spacing: -0.3px;
}

.btn-phone-qa-open {
  width: 100%;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  transition: all 0.15s ease;
  margin-bottom: 20px;
}

.btn-phone-qa-open:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.phone-qa-reactions-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 24px;
}

.phone-qa-thank-card {
  width: 100%;
  background: #f1f5f9;
  border-radius: 14px;
  padding: 20px 16px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  box-sizing: border-box;
}

.phone-qa-thank-msg {
  font-size: 15px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 6px;
}

.btn-phone-qa-action {
  width: 100%;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13.5px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.02);
  transition: all 0.15s ease;
}

.btn-phone-qa-action:hover {
  background: #f8fafc;
}

.btn-phone-qa-action svg {
  width: 15px;
  height: 15px;
  color: #64748b;
}

.phone-qa-footer-promo {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 4px;
}

.phone-qa-promo-icon {
  color: #ec4899;
}

/* Phone Q&A Drawer Overlay */
.phone-qa-drawer-overlay {
  position: absolute;
  top: 44px;
  left: 0;
  right: 0;
  bottom: 0;
  background: #f8fafc;
  z-index: 50;
  padding: 14px 14px 18px;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  animation: fadeInPhoneDrawer 0.2s ease;
}

@keyframes fadeInPhoneDrawer {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.phone-qa-drawer-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.phone-qa-drawer-heading {
  font-size: 17px;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
}

.btn-phone-qa-close {
  background: #0f172a;
  color: #ffffff;
  border: none;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.2px;
  transition: opacity 0.15s;
}

.btn-phone-qa-close:hover {
  opacity: 0.85;
}

.phone-qa-form-card {
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  box-sizing: border-box;
}

.phone-qa-textarea-wrap {
  position: relative;
  width: 100%;
}

.phone-qa-textarea {
  width: 100%;
  min-height: 85px;
  border: none;
  resize: none;
  outline: none;
  font-size: 16px;
  font-family: inherit;
  color: #1e293b;
  padding-bottom: 24px;
  box-sizing: border-box;
  line-height: 1.45;
  touch-action: manipulation;
}

.phone-qa-counter {
  position: absolute;
  right: 4px;
  bottom: 4px;
  font-size: 11.5px;
  color: #94a3b8;
  font-weight: 500;
  pointer-events: none;
}

.phone-qa-author-row {
  display: flex;
  align-items: center;
  gap: 8px;
  border-top: 1px solid #f1f5f9;
  padding-top: 8px;
  margin-top: 4px;
  margin-bottom: 6px;
}

.phone-qa-options-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 2px 10px;
}

.phone-qa-anonymous-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 500;
  color: #64748b;
  cursor: pointer;
  user-select: none;
  transition: color 0.15s ease;
}

.phone-qa-anonymous-label:hover {
  color: #1e293b;
}

.phone-qa-anonymous-label input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: #7c3aed;
  cursor: pointer;
  border-radius: 4px;
}

.phone-qa-avatar-badge {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #ec4899;
  color: #ffffff;
  font-weight: 700;
  font-size: 13.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.phone-qa-author-input {
  flex: 1;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 16px;
  outline: none;
  color: #1e293b;
  font-family: inherit;
  touch-action: manipulation;
}

.btn-phone-qa-submit {
  background: #e4e4e7;
  color: #71717a;
  border: none;
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-phone-qa-submit.has-text {
  background: #7c3aed;
  color: #ffffff;
}

.btn-phone-qa-submit:disabled {
  background: #e4e4e7;
  color: #a1a1aa;
  cursor: not-allowed;
}

.phone-qa-filter-tabs {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 8px;
  margin-bottom: 10px;
}

.phone-qa-tab {
  font-size: 12.5px;
  font-weight: 500;
  color: #64748b;
  cursor: pointer;
  padding-bottom: 4px;
  position: relative;
  user-select: none;
}

.phone-qa-tab.active {
  color: #7c3aed;
  font-weight: 700;
}

.phone-qa-tab.active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 2px;
  background: #7c3aed;
  border-radius: 2px;
}

.phone-qa-tab-counter {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12.5px;
  color: #94a3b8;
  font-weight: 600;
}

.phone-qa-questions-scroll {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

.phone-qa-empty-msg {
  text-align: center;
  color: #94a3b8;
  padding: 30px 10px;
  font-size: 13.5px;
}

.phone-qa-items-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.phone-qa-item-card {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  background: #ffffff;
}

.phone-qa-item-content {
  flex: 1;
}

.phone-qa-item-text {
  font-size: 13.5px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 4px;
  line-height: 1.4;
  word-break: break-word;
}

.phone-qa-item-meta {
  font-size: 11.5px;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 6px;
}

.phone-qa-item-upvote {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  transition: all 0.15s;
}

.phone-qa-item-upvote.voted {
  background: #7c3aed;
  color: #ffffff;
  border-color: #7c3aed;
}

