/* Standalone mock exam — nav frame (timer + score row + prev/next) */
.mock-exam-page {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "Segoe UI", Tahoma, sans-serif;
  /* Day theme: cool slate + soft blue (less “washed” than flat gray) */
  background: linear-gradient(165deg, #dce6f5 0%, #e8eef7 38%, #f2f5fb 72%, #eef1f8 100%);
  color: #0f172a;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

.mock-exam-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.mock-exam-root {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  padding: 16px 18px 40px;
  box-sizing: border-box;
}

.mock-exam-session {
  margin: 0 0 14px;
  padding: 0;
  text-align: center;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #475569;
}

.mock-difficulty {
  display: inline-block;
  margin-inline-start: 0.35em;
  padding: 0.12em 0.55em;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  vertical-align: middle;
  text-transform: uppercase;
}

.mock-difficulty--hard {
  color: #fff;
  background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
  border: 1px solid rgba(185, 28, 28, 0.65);
  box-shadow: 0 1px 6px rgba(220, 38, 38, 0.35);
}

.mock-difficulty--medium {
  color: #78350f;
  background: #fef3c7;
  border: 1px solid #f59e0b;
}

.mock-difficulty--easy {
  color: #14532d;
  background: #dcfce7;
  border: 1px solid #22c55e;
}

.mock-exam-layout {
  display: block;
  max-width: 100%;
}

.mock-exam-main {
  min-width: 0;
}

.mock-exam-nav-frame {
  margin-bottom: 18px;
  background: #fff;
  border-radius: 16px;
  border: 1px solid rgba(30, 60, 114, 0.1);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

.mock-exam-nav-frame--mobile {
  display: none;
}

.mock-exam-nav-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(30, 60, 114, 0.12);
  background: linear-gradient(180deg, #e2eaf6 0%, #e8eef5 100%);
}

@media (max-width: 480px) {
  .mock-exam-nav-stats {
    justify-content: center;
  }
}

.mock-exam-stat {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(30, 60, 114, 0.14);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  font-weight: 600;
  font-size: 0.875rem;
  color: #1e293b;
}

.mock-exam-stat__ic {
  font-size: 1.1rem;
  line-height: 1;
}

.mock-exam-stat__lab {
  color: #475569;
}

.mock-exam-stat__lab-text {
  font-weight: 600;
}

.mock-exam-stat__time,
.mock-exam-timer-digits {
  font-size: 1.15rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #1e3c72;
  letter-spacing: 0.02em;
}

.mock-exam-timer-digits.warning {
  color: #c0392b;
}
.mock-exam-timer-digits.danger {
  color: #e74c3c;
  animation: mockPulse 1s ease-in-out infinite;
}
@keyframes mockPulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.65;
  }
}

.mock-exam-stat__num {
  font-size: 1.05rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  min-width: 1.25ch;
  text-align: end;
}

.mock-exam-stat--ok .mock-exam-stat__num {
  color: #1e7e34;
}
.mock-exam-stat--bad .mock-exam-stat__num {
  color: #c0392b;
}

.mock-exam-nav-frame .mock-exam-qnav {
  margin-bottom: 0;
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: #fff;
}

.mock-exam-qnav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  margin-bottom: 18px;
  background: #fff;
  border-radius: 16px;
  border: 1px solid rgba(30, 60, 114, 0.1);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.mock-exam-qnav button {
  padding: 10px 18px;
  border-radius: 10px;
  border: 2px solid #1e3c72;
  background: #1e3c72;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.95rem;
  min-height: 44px;
  -webkit-tap-highlight-color: transparent;
}
.mock-exam-qnav button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Global styles.css uses .test-nav-btn (+ .prev/.next) with orange gradient — override for mock day theme only */
body.mock-exam-page:not(.theme-dark) .mock-exam-qnav button.test-nav-btn,
body.mock-exam-page:not(.theme-dark) .mock-exam-qnav button.test-nav-btn.prev,
body.mock-exam-page:not(.theme-dark) .mock-exam-qnav button.test-nav-btn.next {
  border: 2px solid #16305a;
  background: linear-gradient(180deg, #2a5594 0%, #1e3c72 55%, #1a3566 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(22, 48, 90, 0.22);
}

body.mock-exam-page:not(.theme-dark) .mock-exam-qnav button.test-nav-btn:hover:not(:disabled) {
  border-color: #2c5282;
  background: linear-gradient(180deg, #3560a3 0%, #254a8c 55%, #1e3c72 100%);
  color: #fff;
  transform: none;
  box-shadow: 0 4px 14px rgba(22, 48, 90, 0.28);
}

body.mock-exam-page:not(.theme-dark) .mock-exam-qnav button.test-nav-btn:active:not(:disabled) {
  transform: translateY(1px);
  box-shadow: 0 1px 6px rgba(22, 48, 90, 0.2);
}

.mock-exam-qnav .question-label {
  font-weight: 800;
  color: #1e3c72;
  margin-inline-end: 6px;
}

.mock-exam-qnav .question-number-display {
  font-weight: 700;
  color: #334155;
}

.mock-exam-qnav--mobile {
  display: none;
}

@media (max-width: 900px) {
  .mock-exam-nav-frame--desktop {
    display: none !important;
  }
  .mock-exam-nav-frame--mobile {
    display: block;
  }
  .mock-exam-qnav--desktop {
    display: none !important;
  }
  .mock-exam-qnav--mobile {
    display: flex;
  }
}

.mock-exam-test-container {
  min-width: 0;
}

.mock-exam-question-card {
  background: #fff;
  padding: 28px 26px 32px;
  border-radius: 18px;
  border: 1px solid rgba(30, 60, 114, 0.1);
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.07);
  min-height: 120px;
}

.mock-exam-q-fa {
  font-size: 1.18rem;
  font-weight: 700;
  color: #1e3c72;
  margin: 0 0 14px;
  direction: rtl;
  text-align: right;
  line-height: 1.55;
}

/* Same preference as book summary / exams: topbar "Persian sections" ↔ body[data-show-fa] */
body.mock-exam-page[data-show-fa="no"] .mock-exam-q-fa {
  display: none !important;
}

.mock-exam-q-en {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0 0 22px;
  direction: ltr;
  text-align: left;
  font-size: 1.02rem;
  color: #334155;
  line-height: 1.5;
}

.mock-exam-q-en .mock-exam-copy-q {
  flex-shrink: 0;
  margin-top: 2px;
  cursor: pointer;
  font-size: 1.15rem;
  line-height: 1;
  padding: 4px;
  border: none;
  background: transparent;
  border-radius: 8px;
}
.mock-exam-q-en .mock-exam-copy-q:hover {
  background: rgba(30, 60, 114, 0.08);
}

.mock-exam-options {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.mock-exam-option {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  box-sizing: border-box;
  padding: 16px 18px;
  margin: 0;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  font-size: 1.02rem;
  color: #0f172a;
  text-align: left;
  direction: ltr;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  -webkit-tap-highlight-color: transparent;
  font-family: inherit;
}
.mock-exam-option:hover:not(:disabled) {
  border-color: #94a3b8;
  background: #f8fafc;
  box-shadow: 0 0 0 2px rgba(30, 60, 114, 0.12);
}
.mock-exam-option:focus-visible {
  outline: none;
  border-color: #1e3c72;
  box-shadow: 0 0 0 3px rgba(30, 60, 114, 0.2);
}

.mock-exam-option--correct {
  background: #d4edda !important;
  border-color: #28a745 !important;
  font-weight: 600;
  color: #155724;
}
.mock-exam-option--incorrect {
  background: #f8d7da !important;
  border-color: #dc3545 !important;
  font-weight: 600;
  color: #721c24;
}
.mock-exam-option--reveal-correct {
  background: #d4edda !important;
  border-color: #28a745 !important;
  font-weight: 600;
  color: #155724;
}

.mock-exam-opt-ic {
  flex-shrink: 0;
  color: #64748b;
}
.mock-exam-option--correct .mock-exam-opt-ic,
.mock-exam-option--reveal-correct .mock-exam-opt-ic {
  color: #1e7e34;
}
.mock-exam-option--incorrect .mock-exam-opt-ic {
  color: #c0392b;
}

.mock-exam-opt-text {
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.mock-exam-opt-copy {
  flex-shrink: 0;
  cursor: pointer;
  font-size: 1rem;
  padding: 6px;
  border: none;
  background: transparent;
  border-radius: 8px;
  line-height: 1;
}
.mock-exam-opt-copy:hover {
  background: rgba(30, 60, 114, 0.08);
}

/* Subscription block inside mock page — match readable card */
.mock-exam-page .test-area-subscription-block {
  max-width: min(28rem, calc(100% - 1.5rem));
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 16px;
  padding: 0;
  border-radius: 12px;
  line-height: 1.5;
  box-sizing: border-box;
  direction: ltr;
  text-align: left;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.mock-exam-page .test-area-subscription-block .subscription-input,
.mock-exam-page .test-area-subscription-block .subscription-input::placeholder,
.mock-exam-page .test-area-subscription-block .subscription-btn {
  font-family: inherit;
}
.mock-exam-page .test-area-subscription-block .subscription-buttons {
  justify-content: flex-start;
}
.mock-exam-page .test-area-subscription-block .subscription-input {
  direction: ltr;
  text-align: left;
}
.mock-exam-page .test-area-subscription-block .test-area-sub-title,
.mock-exam-page .test-area-subscription-block .test-area-sub-intro,
.mock-exam-page .test-area-subscription-block .subscription-question,
.mock-exam-page .test-area-subscription-block .subscription-pay-lead,
.mock-exam-page .test-area-subscription-block p {
  text-align: left;
}

html[data-theme="dark"] .mock-exam-page .test-area-subscription-block {
  background: #121a2b;
  border-color: rgba(255, 255, 255, 0.2);
  color: #f1f5f9;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}

html[data-theme="dark"] .mock-exam-page .test-area-subscription-block .test-area-sub-title,
html[data-theme="dark"] .mock-exam-page .test-area-subscription-block .subscription-question {
  color: #f8fafc;
}

html[data-theme="dark"] .mock-exam-page .test-area-subscription-block .test-area-sub-intro,
html[data-theme="dark"] .mock-exam-page .test-area-subscription-block .subscription-pay-lead {
  color: #e2e8f0;
}

html[data-theme="dark"] .mock-exam-page .test-area-subscription-block .subscription-input {
  color: #f8fafc;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.38);
  -webkit-text-fill-color: #f8fafc;
}

html[data-theme="dark"] .mock-exam-page .test-area-subscription-block .subscription-input::placeholder {
  color: #cbd5e1;
  opacity: 1;
  -webkit-text-fill-color: #cbd5e1;
}

/* Mock tests: payment by email only — no mobile request block */
.mock-exam-page .subscription-pay-section--mobile,
.mock-exam-page #testAreaSubRequestMsg,
.mock-exam-page #subscriptionModal .subscription-pay-section--mobile,
.mock-exam-page #subscriptionModal #subModalRequestMsg {
  display: none !important;
}

.mock-exam-page .subscription-email-value,
.mock-exam-page .subscription-telegram-value {
  overflow: visible;
  white-space: normal;
}

.mock-exam-page .mock-exam-results {
  margin-top: 20px;
}

/* Results panel (theme-aware) */
.mock-exam-results {
  margin-top: 24px;
  padding: 24px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  direction: rtl;
  text-align: right;
}
.mock-exam-results__title {
  color: #1e3c72;
  margin-bottom: 20px;
  font-size: 1.6em;
  text-align: center;
}
.mock-exam-results__score {
  font-size: 2.5em;
  font-weight: bold;
  color: #1e3c72;
  text-align: center;
  margin: 16px 0;
}
.mock-exam-results__score-text {
  font-size: 1.1em;
  color: #555;
  text-align: center;
  margin-bottom: 18px;
}
.mock-exam-results__actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.mock-exam-results__btn {
  padding: 12px 24px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.95em;
  font-weight: bold;
}
.mock-exam-results__btn--primary {
  background: linear-gradient(135deg, #1e3c72 0%, #2c5282 100%);
  color: #fff;
}
.mock-exam-results__btn--next {
  background: linear-gradient(135deg, #f1c40f 0%, #f39c12 100%);
  color: #1e3c72;
}

/* Dark theme — match site `html[data-theme="dark"]` + `body.theme-dark` */
html[data-theme="dark"] body.mock-exam-page,
body.mock-exam-page.theme-dark {
  background: linear-gradient(165deg, #141820 0%, #0d1016 55%, #0a0c10 100%);
  color: #e8eaed;
}

html[data-theme="dark"] .mock-exam-session,
body.mock-exam-page.theme-dark .mock-exam-session {
  color: #94a3b8;
}

html[data-theme="dark"] .mock-exam-nav-frame,
body.mock-exam-page.theme-dark .mock-exam-nav-frame {
  background: #1e2430;
  border-color: rgba(255, 255, 255, 0.09);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

html[data-theme="dark"] .mock-exam-nav-stats,
body.mock-exam-page.theme-dark .mock-exam-nav-stats {
  background: #171c26;
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .mock-exam-stat,
body.mock-exam-page.theme-dark .mock-exam-stat {
  background: #262d3d;
  border-color: rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
}

html[data-theme="dark"] .mock-exam-stat__lab,
body.mock-exam-page.theme-dark .mock-exam-stat__lab {
  color: #e2e8f0;
}

html[data-theme="dark"] .mock-exam-stat__time,
html[data-theme="dark"] .mock-exam-timer-digits,
body.mock-exam-page.theme-dark .mock-exam-stat__time,
body.mock-exam-page.theme-dark .mock-exam-timer-digits {
  color: #93c5fd;
}
html[data-theme="dark"] .mock-exam-timer-digits.warning,
body.mock-exam-page.theme-dark .mock-exam-timer-digits.warning {
  color: #fca5a5;
}
html[data-theme="dark"] .mock-exam-timer-digits.danger,
body.mock-exam-page.theme-dark .mock-exam-timer-digits.danger {
  color: #f87171;
}

html[data-theme="dark"] .mock-exam-nav-frame .mock-exam-qnav,
body.mock-exam-page.theme-dark .mock-exam-nav-frame .mock-exam-qnav {
  background: #1e2430;
}

html[data-theme="dark"] .mock-exam-qnav,
body.mock-exam-page.theme-dark .mock-exam-qnav {
  background: #1e2430;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

html[data-theme="dark"] .mock-exam-qnav .question-label,
body.mock-exam-page.theme-dark .mock-exam-qnav .question-label {
  color: #93c5fd;
}
html[data-theme="dark"] .mock-exam-qnav .question-number-display,
body.mock-exam-page.theme-dark .mock-exam-qnav .question-number-display {
  color: #e2e8f0;
}

html[data-theme="dark"] .mock-exam-qnav button,
body.mock-exam-page.theme-dark .mock-exam-qnav button {
  border: 1px solid rgba(147, 197, 253, 0.35);
  background: linear-gradient(180deg, #2a4a7a 0%, #1e3c72 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
html[data-theme="dark"] .mock-exam-qnav button:disabled,
body.mock-exam-page.theme-dark .mock-exam-qnav button:disabled {
  opacity: 0.4;
}

html[data-theme="dark"] .mock-exam-question-card,
body.mock-exam-page.theme-dark .mock-exam-question-card {
  background: #1e2430;
  border-color: rgba(255, 255, 255, 0.09);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
}

html[data-theme="dark"] .mock-exam-q-fa,
body.mock-exam-page.theme-dark .mock-exam-q-fa {
  color: #e8f0ff;
}
html[data-theme="dark"] .mock-exam-q-en,
body.mock-exam-page.theme-dark .mock-exam-q-en {
  color: #d1dae9;
}
html[data-theme="dark"] .mock-exam-q-en .mock-exam-copy-q:hover,
body.mock-exam-page.theme-dark .mock-exam-q-en .mock-exam-copy-q:hover {
  background: rgba(147, 197, 253, 0.14);
}

html[data-theme="dark"] .mock-exam-option,
body.mock-exam-page.theme-dark .mock-exam-option {
  background: #2a3140;
  border-color: rgba(255, 255, 255, 0.12);
  color: #f1f5f9;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
html[data-theme="dark"] .mock-exam-option:hover:not(:disabled),
body.mock-exam-page.theme-dark .mock-exam-option:hover:not(:disabled) {
  border-color: rgba(251, 191, 36, 0.45);
  background: #323a4a;
  box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.12);
}
html[data-theme="dark"] .mock-exam-opt-copy:hover,
body.mock-exam-page.theme-dark .mock-exam-opt-copy:hover {
  background: rgba(255, 255, 255, 0.08);
}
html[data-theme="dark"] .mock-exam-opt-ic,
body.mock-exam-page.theme-dark .mock-exam-opt-ic {
  color: #cbd5e1;
}

/* Light feedback backgrounds need dark text (dark theme generic .mock-exam-option color would win by order) */
html[data-theme="dark"] .mock-exam-option.mock-exam-option--correct,
html[data-theme="dark"] .mock-exam-option.mock-exam-option--reveal-correct,
body.mock-exam-page.theme-dark .mock-exam-option.mock-exam-option--correct,
body.mock-exam-page.theme-dark .mock-exam-option.mock-exam-option--reveal-correct {
  color: #0f3d1a !important;
}
html[data-theme="dark"] .mock-exam-option.mock-exam-option--incorrect,
body.mock-exam-page.theme-dark .mock-exam-option.mock-exam-option--incorrect {
  color: #5c1018 !important;
}
html[data-theme="dark"] .mock-exam-option--correct .mock-exam-opt-ic,
html[data-theme="dark"] .mock-exam-option--reveal-correct .mock-exam-opt-ic,
body.mock-exam-page.theme-dark .mock-exam-option--correct .mock-exam-opt-ic,
body.mock-exam-page.theme-dark .mock-exam-option--reveal-correct .mock-exam-opt-ic {
  color: #1b5e20 !important;
}
html[data-theme="dark"] .mock-exam-option--incorrect .mock-exam-opt-ic,
body.mock-exam-page.theme-dark .mock-exam-option--incorrect .mock-exam-opt-ic {
  color: #b71c1c !important;
}
html[data-theme="dark"] .mock-exam-option--correct .mock-exam-opt-copy,
html[data-theme="dark"] .mock-exam-option--incorrect .mock-exam-opt-copy,
html[data-theme="dark"] .mock-exam-option--reveal-correct .mock-exam-opt-copy,
body.mock-exam-page.theme-dark .mock-exam-option--correct .mock-exam-opt-copy,
body.mock-exam-page.theme-dark .mock-exam-option--incorrect .mock-exam-opt-copy,
body.mock-exam-page.theme-dark .mock-exam-option--reveal-correct .mock-exam-opt-copy {
  color: inherit;
}
html[data-theme="dark"] .mock-exam-option--correct .mock-exam-opt-copy:hover,
html[data-theme="dark"] .mock-exam-option--incorrect .mock-exam-opt-copy:hover,
html[data-theme="dark"] .mock-exam-option--reveal-correct .mock-exam-opt-copy:hover,
body.mock-exam-page.theme-dark .mock-exam-option--correct .mock-exam-opt-copy:hover,
body.mock-exam-page.theme-dark .mock-exam-option--incorrect .mock-exam-opt-copy:hover,
body.mock-exam-page.theme-dark .mock-exam-option--reveal-correct .mock-exam-opt-copy:hover {
  background: rgba(0, 0, 0, 0.08);
}

html[data-theme="dark"] .mock-exam-results,
body.mock-exam-page.theme-dark .mock-exam-results {
  background: #1e2430;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
}
html[data-theme="dark"] .mock-exam-results__title,
body.mock-exam-page.theme-dark .mock-exam-results__title {
  color: #93c5fd;
}
html[data-theme="dark"] .mock-exam-results__score,
body.mock-exam-page.theme-dark .mock-exam-results__score {
  color: #f1f5f9;
}
html[data-theme="dark"] .mock-exam-results__score-text,
body.mock-exam-page.theme-dark .mock-exam-results__score-text {
  color: #cbd5e1;
}
html[data-theme="dark"] .mock-exam-results__btn--primary,
body.mock-exam-page.theme-dark .mock-exam-results__btn--primary {
  background: linear-gradient(135deg, #2d3748 0%, #1e3c72 100%);
  color: #fff;
}
html[data-theme="dark"] .mock-exam-results__btn--next,
body.mock-exam-page.theme-dark .mock-exam-results__btn--next {
  background: linear-gradient(135deg, #f1c40f 0%, #f39c12 100%);
  color: #1a1d24;
}

/* Collapsed SEO block on free mock run pages (Test1–5) */
.mockRunSeo {
  margin: 24px auto 32px;
  max-width: 1100px;
  padding: 0 16px;
}
