/* ============================================================
   LMS CUSTOM STYLES
   Question numbers, score card, certificate link
   ============================================================ */

/* ── Question counter badge ────────────────────────────────── */
.lms-question-counter {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.lms-question-counter .q-num {
  color: #fff;
}

.lms-question-counter .q-total {
  color: rgba(255, 255, 255, 0.65);
}

/* ── Progress bar below question header ────────────────────── */
.lms-progress-bar-wrap {
  background: #e2e8f0;
  border-radius: 0 0 4px 4px;
  height: 6px;
  overflow: hidden;
  margin-bottom: 0;
}

.lms-progress-bar-inner {
  height: 100%;
  background: linear-gradient(90deg, #60a5fa, #2563a8);
  border-radius: 0 4px 4px 0;
  transition: width 0.6s ease;
}

/* ── Score card on course result page ──────────────────────── */
.lms-score-card {
  background: #fff;
  border-radius: 16px;
  padding: 36px 32px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.09);
  border: 1px solid #e2e8f0;
  margin: 24px 0;
  text-align: center;
  max-width: 600px;
}

.lms-score-card .score-status-icon {
  font-size: 2.5rem;
  line-height: 1;
  margin-bottom: 8px;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  margin: 0 auto 12px;
}

.score-status-icon.score-pass {
  background: #dcfce7;
  color: #16a34a;
}

.score-status-icon.score-fail {
  background: #fee2e2;
  color: #dc2626;
}

.lms-score-card .score-status-text {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.score-status-text.score-pass { color: #15803d; }
.score-status-text.score-fail { color: #b91c1c; }

.lms-score-card .score-pct {
  font-size: 4.5rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 4px;
}

.score-pct.score-pass { color: #15803d; }
.score-pct.score-fail { color: #b91c1c; }

.lms-score-bar-outer {
  background: #f1f5f9;
  border-radius: 100px;
  height: 14px;
  overflow: hidden;
  margin: 16px 0 12px;
}

.lms-score-bar-inner {
  height: 100%;
  border-radius: 100px;
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.bar-pass { background: linear-gradient(90deg, #4ade80, #16a34a); }
.bar-fail { background: linear-gradient(90deg, #f87171, #dc2626); }

.lms-score-card .score-detail {
  font-size: 0.85rem;
  color: #94a3b8;
  margin-bottom: 24px;
}

/* Certificate button (both <a> and <button>) */
.lms-certificate-btn a{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #2563a8 0%, #1a3a5c 100%);
  color: #fff !important;
  padding: 14px 32px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none !important;
  box-shadow: 0 4px 14px rgba(37, 99, 168, 0.35);
  transition: all 0.25s ease;
  margin-top: 8px;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.lms-certificate-btn a:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 168, 0.45);
  color: #fff !important;
}

/* Retry message for failed students */
.lms-retry-msg {
  font-size: 0.95rem;
  color: #64748b;
  background: #f8fafc;
  border-radius: 8px;
  padding: 14px 18px;
  border: 1px solid #e2e8f0;
  margin-top: 12px;
}

/* ── Result message box enhancements ───────────────────────── */
.path-group .messages--error {
  background: linear-gradient(135deg, #fff0f0, #fee2e2) !important;
  border: 1.5px solid #fca5a5 !important;
  border-left: 5px solid #ef4444 !important;
  border-radius: 12px !important;
  color: #991b1b !important;
  font-weight: 600 !important;
}

.path-group .messages--status {
  background: linear-gradient(135deg, #f0fdf4, #dcfce7) !important;
  border: 1.5px solid #86efac !important;
  border-left: 5px solid #22c55e !important;
  border-radius: 12px !important;
  color: #15803d !important;
  font-weight: 600 !important;
}

/* ── PDF canvas viewer (view-only, no download) ────────────── */
.wc-pdf-viewer {
  background: #525659;
  border-radius: 8px;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
}

.wc-pdf-toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 8px 16px;
  background:var(--primary_color);
  color: #fff;
}

.wc-pdf-btn {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  padding: 5px 14px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1.4;
  transition: background 0.15s;
}

.wc-pdf-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.28);
}

.wc-pdf-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.wc-pdf-page-info {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.9);
  min-width: 120px;
  text-align: center;
}

.wc-pdf-canvas-container {
  overflow-y: auto;
  max-height: 720px;
  text-align: center;
  background:var(--primary_color);
  padding:5px;
}

.wc-pdf-canvas {
  display: block;
  margin: 0 auto;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.5);
}

.wc-pdf-loading-msg {
  text-align: center;
  padding: 48px 20px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.95rem;
  margin: 0;
}

/* ── Result message box enhancements ───────────────────────── */
.path-group .messages--error {
  background: linear-gradient(135deg, #fff0f0, #fee2e2) !important;
  border: 1.5px solid #fca5a5 !important;
  border-left: 5px solid #ef4444 !important;
  border-radius: 12px !important;
  color: #991b1b !important;
  font-weight: 600 !important;
}

.path-group .messages--status {
  background: linear-gradient(135deg, #f0fdf4, #dcfce7) !important;
  border: 1.5px solid #86efac !important;
  border-left: 5px solid #22c55e !important;
  border-radius: 12px !important;
  color: #15803d !important;
  font-weight: 600 !important;
}
