/* UzQuiz 4.4.2 — Light-mode readability hotfix R1
   Loaded AFTER styles.css/admin.css. All rules are scoped to light theme.
   Dark theme styles, page structure, API and data are not modified. */

html[data-theme="light"] {
  --text: #09245b;
  --muted: #435474;
  --muted-2: #526380;
  --uq-readable-blue: #123a83;
  --uq-readable-pink: #8a124d;
  --uq-readable-green: #17633d;
  --uq-readable-red: #9d2b45;
  --uq-readable-gold: #765008;
  --uq-readable-border: rgba(43, 65, 129, .18);
}

/* Global secondary text, form labels and field hints */
html[data-theme="light"] .muted,
html[data-theme="light"] .form-group label,
html[data-theme="light"] .checkbox,
html[data-theme="light"] .share-detail > .form-group > span,
html[data-theme="light"] .auth-feature-row span,
html[data-theme="light"] .editor-checklist div,
html[data-theme="light"] .quiz-card-date,
html[data-theme="light"] .field-help,
html[data-theme="light"] .table-subtext,
html[data-theme="light"] .participant-answer-head small,
html[data-theme="light"] .archive-card-head time {
  color: var(--muted);
}
html[data-theme="light"] input::placeholder,
html[data-theme="light"] textarea::placeholder,
html[data-theme="light"] .input::placeholder,
html[data-theme="light"] .textarea::placeholder,
html[data-theme="light"] .admin-search input::placeholder {
  color: #5d6b83;
  opacity: 1;
}
html[data-theme="light"] .text-link,
html[data-theme="light"] .back-link span,
html[data-theme="light"] .contact-card a:hover {
  color: var(--uq-readable-pink);
}
html[data-theme="light"] .error-message,
html[data-theme="light"] .modal-error {
  color: var(--uq-readable-red);
  background: #fff1f3;
  border-color: rgba(157, 43, 69, .24);
}
html[data-theme="light"] .success-message {
  color: var(--uq-readable-green);
  background: #eefbf3;
  border-color: rgba(23, 99, 61, .22);
}

/* Quiz states, readable icons and small badges */
html[data-theme="light"] .quiz-status.active,
html[data-theme="light"] .status-active,
html[data-theme="light"] .share-status.active,
html[data-theme="light"] .editor-checklist span,
html[data-theme="light"] .editor-save-note span {
  color: var(--uq-readable-green);
}
html[data-theme="light"] .quiz-status.closed,
html[data-theme="light"] .status-closed,
html[data-theme="light"] .share-status.inactive {
  color: var(--uq-readable-red);
}
html[data-theme="light"] .quiz-status.live,
html[data-theme="light"] .live-meta-pill {
  color: var(--uq-readable-blue) !important;
  border-color: rgba(19, 58, 172, .28) !important;
  background: #edf3ff;
}
html[data-theme="light"] .editor-hero-graphic span,
html[data-theme="light"] .section-number,
html[data-theme="light"] .auth-preview-option span,
html[data-theme="light"] .sidebar-tip > span {
  color: var(--uq-readable-blue);
}
html[data-theme="light"] .question-count-badge,
html[data-theme="light"] .live-pulse-icon,
html[data-theme="light"] .archive-hero-icon,
html[data-theme="light"] .archive-card-icon,
html[data-theme="light"] .results-tab-icon,
html[data-theme="light"] .question-index {
  color: var(--uq-readable-blue);
  background-color: #eef3ff;
}

/* Editor + file import: several old dark-only text/background pairs */
html[data-theme="light"] .editor-actions {
  color: var(--text);
  background: rgba(255,255,255,.97);
  border-color: var(--uq-readable-border);
  box-shadow: 0 16px 38px rgba(6,33,112,.12);
}
html[data-theme="light"] .file-drop,
html[data-theme="light"] .file-drop:hover,
html[data-theme="light"] .file-drop.dragging,
html[data-theme="light"] .inline-import-guide,
html[data-theme="light"] .import-preview-question {
  color: var(--text);
  background: #f5f8ff;
  border-color: var(--uq-readable-border);
}
html[data-theme="light"] .file-drop:hover,
html[data-theme="light"] .file-drop.dragging {
  background: #eaf2ff;
  border-color: #6883c9;
}
html[data-theme="light"] .file-drop strong,
html[data-theme="light"] .inline-import-guide > strong,
html[data-theme="light"] .import-preview-question h3 {
  color: var(--text);
}
html[data-theme="light"] .file-drop > span:last-child,
html[data-theme="light"] .inline-import-guide p,
html[data-theme="light"] .import-preview-options {
  color: var(--muted);
}
html[data-theme="light"] .file-drop-icon,
html[data-theme="light"] .editor-import-icon {
  color: var(--uq-readable-blue);
  background: #e7efff;
}
html[data-theme="light"] .format-example {
  color: #21395f;
  background: #edf3ff;
  border-color: var(--uq-readable-border);
}
html[data-theme="light"] .import-preview-options > div {
  color: #283c5e;
  background: #fff;
  border: 1px solid rgba(43,65,129,.1);
}
html[data-theme="light"] .import-preview-options .correct-preview {
  color: var(--uq-readable-green);
  background: #eafaef;
  border-color: rgba(23,99,61,.25);
}
html[data-theme="light"] .import-warnings {
  color: var(--uq-readable-gold);
  background: #fff8e7;
  border-color: rgba(118,80,8,.22);
}
html[data-theme="light"] .inline-import-success {
  color: var(--uq-readable-green);
  background: #edf9f2;
  border-color: rgba(23,99,61,.23);
}
html[data-theme="light"] .inline-import-success strong {
  color: #174d34;
}
html[data-theme="light"] .inline-import-success p {
  color: #3b6452;
}

/* Public quiz — answer options must be readable in both selected states */
html[data-theme="light"] .answer-btn,
html[data-theme="light"] .host-option {
  color: var(--text);
  border-color: rgba(43,65,129,.20);
  background: #f6f8ff;
}
html[data-theme="light"] .answer-btn:hover,
html[data-theme="light"] .host-option:hover {
  color: var(--text);
  border-color: rgba(210,0,107,.30);
  background: #eef2ff;
}
html[data-theme="light"] .answer-btn.selected {
  color: var(--text);
  border-color: #ae3d78;
  background: #fff0f7;
  box-shadow: inset 0 0 0 1px rgba(174,61,120,.14);
}
html[data-theme="light"] .answer-letter {
  color: var(--uq-readable-blue);
  background: #e4ebfb;
}
html[data-theme="light"] .answer-btn.selected .answer-letter,
html[data-theme="light"] .host-option > span {
  color: #fff;
  background: #133a86;
}
html[data-theme="light"] .timer:not(.phase-timer) {
  color: var(--uq-readable-gold);
  background: #fff7e8;
  border-color: rgba(118,80,8,.23);
}

/* Live quiz, host view and lobby panels */
html[data-theme="light"] .live-lobby-card strong,
html[data-theme="light"] .overall-title strong,
html[data-theme="light"] .session-code-card strong,
html[data-theme="light"] .live-answer-progress span,
html[data-theme="light"] .participant-score strong {
  color: var(--uq-readable-blue);
}
html[data-theme="light"] .live-lobby-card small,
html[data-theme="light"] .participant-total,
html[data-theme="light"] .podium-place.is-own > strong {
  color: var(--uq-readable-pink);
}
html[data-theme="light"] .live-timing-settings,
html[data-theme="light"] .overall-row,
html[data-theme="light"] .participant-item {
  color: var(--text);
  background: #f8faff;
  border-color: var(--uq-readable-border);
}
html[data-theme="light"] .overall-row.is-own {
  background: #f0f3ff;
  border-color: rgba(19,58,172,.3);
}
html[data-theme="light"] .overall-correct,
html[data-theme="light"] .own-result.correct {
  color: var(--uq-readable-green);
}
html[data-theme="light"] .overall-row > strong,
html[data-theme="light"] .own-result.missed {
  color: var(--uq-readable-blue);
}
html[data-theme="light"] .own-result.wrong {
  color: var(--uq-readable-red);
}
html[data-theme="light"] .participant-rank {
  color: var(--muted);
}
html[data-theme="light"] .live-answer-progress,
html[data-theme="light"] .host-answer-meter {
  color: var(--text);
  background-color: #e2e8f6;
}
/* Keep light text inside dark timer and gradient avatars/podiums */
html[data-theme="light"] .phase-timer,
html[data-theme="light"] .phase-timer.timer-danger,
html[data-theme="light"] .podium-step,
html[data-theme="light"] .participant-avatar,
html[data-theme="light"] .podium-avatar,
html[data-theme="light"] .winner-extra-avatar {
  color: #fff;
}

/* Results, speeds, ranking and tables */
html[data-theme="light"] .speed-rating-head > strong,
html[data-theme="light"] .speed-points-rating .speed-rating-head > strong,
html[data-theme="light"] .ranking-score,
html[data-theme="light"] .result-rank {
  color: var(--text);
}
html[data-theme="light"] .speed-points-badge,
html[data-theme="light"] .response-time-cell > strong,
html[data-theme="light"] .ranking-speed {
  color: var(--uq-readable-blue);
}
html[data-theme="light"] .speed-badge.speed-excellent {
  color: #17633d;
  background: #e8f8ef;
  border-color: rgba(23,99,61,.2);
}
html[data-theme="light"] .speed-badge.speed-fast {
  color: #12567d;
  background: #e7f5fc;
  border-color: rgba(18,86,125,.20);
}
html[data-theme="light"] .speed-badge.speed-medium {
  color: #553795;
  background: #f0eafd;
  border-color: rgba(85,55,149,.22);
}
html[data-theme="light"] .speed-badge.speed-slow {
  color: #7d5005;
  background: #fff7e8;
  border-color: rgba(125,80,5,.20);
}
html[data-theme="light"] .speed-badge.speed-very-slow {
  color: #a12a47;
  background: #fff0f4;
  border-color: rgba(161,42,71,.20);
}
html[data-theme="light"] .answer-status.correct,
html[data-theme="light"] .answer-state-badge.correct {
  color: var(--uq-readable-green);
}
html[data-theme="light"] .answer-status.wrong,
html[data-theme="light"] .answer-state-badge.wrong,
html[data-theme="light"] .wrong-answer-number,
html[data-theme="light"] .participant-answer-card.wrong .participant-answer-details > div:first-child strong {
  color: var(--uq-readable-red);
}
html[data-theme="light"] .answer-state-badge.unanswered {
  color: #4d5971;
}
html[data-theme="light"] .estimated-time-note {
  color: var(--uq-readable-gold);
}
html[data-theme="light"] .question-analytics-item,
html[data-theme="light"] .archive-card-metrics > div,
html[data-theme="light"] .participant-answer-details > div {
  color: var(--text);
  background: #f0f4ff;
  border-color: rgba(43,65,129,.13);
}
html[data-theme="light"] .archive-card-metrics strong,
html[data-theme="light"] .question-analytics-head strong,
html[data-theme="light"] .participant-answer-details strong {
  color: var(--text);
}
html[data-theme="light"] .report-session-code strong {
  color: var(--uq-readable-blue);
}
html[data-theme="light"] .share-modal .modal-close {
  color: var(--uq-readable-blue);
}

/* Admin: tiny secondary labels were too pale on white cards */
html[data-theme="light"] .admin-sidebar-title,
html[data-theme="light"] .admin-section-head p,
html[data-theme="light"] .admin-panel-head small,
html[data-theme="light"] .admin-kpi small,
html[data-theme="light"] .admin-kpi em,
html[data-theme="light"] .admin-mini-user small,
html[data-theme="light"] .admin-identity small,
html[data-theme="light"] .admin-mini-meta,
html[data-theme="light"] .admin-result-count,
html[data-theme="light"] .admin-table th,
html[data-theme="light"] .admin-live-chip span:not(.admin-live-dot),
html[data-theme="light"] .admin-sidebar-foot small,
html[data-theme="light"] .chart-day small,
html[data-theme="light"] .chart-legend,
html[data-theme="light"] .system-mini-list span {
  color: #465879;
}
html[data-theme="light"] .admin-text-btn {
  color: var(--uq-readable-blue);
}
html[data-theme="light"] .admin-action-btn,
html[data-theme="light"] .admin-page-btn {
  color: var(--text);
}
