/* ==========================================================================
   BILIKIDS TEENS - PRUEBAS SABER 9° A 11° SIMULATOR STYLES
   Comfortable, immersive reading layout with font-size controls,
   independent dual-pane scrolling, and English-first UI.
   ========================================================================== */

:root {
  --saber-font-size: 1.08rem;
  --saber-line-height: 1.85;
  --saber-primary: #4338ca;
  --saber-primary-light: #6366f1;
  --saber-bg: #f8fafc;
  --saber-card-bg: #ffffff;
  --saber-border: #e2e8f0;
  --saber-text-main: #0f172a;
  --saber-text-muted: #64748b;
}

body.saber-body {
  background-color: var(--saber-bg);
  color: var(--saber-text-main);
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.saber-app-container {
  max-width: 1520px;
  margin: 0 auto;
  padding: 1rem 1.5rem 3rem;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* TOP SELECTION & TITLE BAR */
.saber-test-selection-bar {
  background: #ffffff;
  border: 1px solid var(--saber-border);
  border-radius: 20px;
  padding: 1.2rem 1.5rem;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.04);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.saber-bar-intro {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.saber-badge-official {
  background: #e0e7ff;
  color: #3730a3;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 4px 14px;
  border-radius: 999px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.saber-exit-btn {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #475569;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: 999px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.saber-exit-btn:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #991b1b;
}

.saber-bar-title {
  margin: 0;
  font-family: var(--font-display, inherit);
  font-size: 1.6rem;
  font-weight: 800;
  color: #1e1b4b;
}

/* 10 TESTS CAROUSEL */
.saber-tests-carousel {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: thin;
}

.test-pill-btn {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  padding: 8px 16px;
  cursor: pointer;
  text-align: left;
  white-space: nowrap;
  transition: all 0.18s ease;
  flex-shrink: 0;
}

.test-pill-btn:hover {
  border-color: var(--saber-primary-light);
  background: #f5f3ff;
}

.test-pill-btn.active {
  background: var(--saber-primary);
  border-color: var(--saber-primary);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(67, 56, 202, 0.28);
}

.test-pill-btn .pill-name {
  font-weight: 800;
  font-size: 0.9rem;
}

.test-pill-btn .pill-meta {
  font-size: 0.72rem;
  opacity: 0.85;
}

.test-pill-btn.active .pill-meta {
  color: #e0e7ff;
}

/* CONTROL & TIMER BAR */
.saber-control-bar {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 60%, #4338ca 100%);
  border-radius: 20px;
  padding: 1.15rem 1.6rem;
  color: #ffffff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  box-shadow: 0 8px 24px rgba(49, 46, 129, 0.22);
}

.saber-active-test-meta {
  flex: 1;
  min-width: 280px;
}

.saber-active-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  color: #ffffff;
}

.saber-active-subtitle {
  margin: 4px 0 0;
  font-size: 0.85rem;
  color: #c7d2fe;
}

/* Direct Test Switcher Arrows in Control Bar */
.saber-test-nav-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.saber-test-step-btn {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.saber-test-step-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.saber-test-step-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* TIMER WIDGET */
.saber-timer-widget {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: rgba(255, 255, 255, 0.1);
  padding: 8px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.saber-progress-stat {
  display: flex;
  flex-direction: column;
}

.saber-stat-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #a5b4fc;
  font-weight: 700;
}

.saber-stat-value {
  font-size: 0.95rem;
  font-weight: 800;
  color: #ffffff;
}

.saber-digital-clock {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.25);
  padding: 6px 12px;
  border-radius: 10px;
}

.saber-clock-icon {
  font-size: 1.1rem;
}

.saber-clock-time {
  font-family: "Courier New", Courier, monospace;
  font-size: 1.25rem;
  font-weight: 900;
  color: #facc15;
  letter-spacing: 1px;
}

.saber-clock-controls {
  display: flex;
  gap: 6px;
}

.btn-timer-action {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.btn-timer-action:hover {
  background: rgba(255, 255, 255, 0.35);
}

/* READING TABS & FONT TOOLBAR */
.saber-reading-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.saber-readings-navbar {
  display: flex;
  gap: 8px;
}

.reading-tab-btn {
  background: #ffffff;
  border: 1.5px solid var(--saber-border);
  padding: 8px 18px;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--saber-text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.18s ease;
}

.reading-tab-btn:hover {
  border-color: var(--saber-primary-light);
  color: var(--saber-primary);
}

.reading-tab-btn.active {
  background: #eef2ff;
  border-color: var(--saber-primary);
  color: var(--saber-primary);
  box-shadow: 0 2px 8px rgba(67, 56, 202, 0.15);
}

/* Font Size Switcher */
.saber-font-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid var(--saber-border);
  padding: 4px 10px;
  border-radius: 12px;
}

.font-ctrl-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--saber-text-muted);
  margin-right: 4px;
}

.font-size-btn {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #334155;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.font-size-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.font-size-btn.active {
  background: var(--saber-primary);
  border-color: var(--saber-primary);
  color: #ffffff;
}

/* SPLIT-SCREEN WORKSPACE */
.saber-split-workspace {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 1024px) {
  .saber-split-workspace {
    grid-template-columns: 1fr;
  }
}

/* LEFT PANE: CRITICAL READING PASSAGE */
.saber-passage-pane {
  background: #ffffff;
  border: 1px solid var(--saber-border);
  border-radius: 24px;
  padding: 2.25rem;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.04);
  position: sticky;
  top: 1rem;
  max-height: calc(100vh - 4rem);
  overflow-y: auto;
  scrollbar-width: thin;
}

.saber-passage-header {
  border-bottom: 1.5px solid #f1f5f9;
  padding-bottom: 1.25rem;
  margin-bottom: 1.5rem;
}

.saber-passage-topic {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--saber-primary);
  background: #eef2ff;
  padding: 4px 12px;
  border-radius: 999px;
  display: inline-block;
}

.saber-passage-headline {
  margin: 0.75rem 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.7rem;
  font-weight: 700;
  line-height: 1.35;
  color: #0f172a;
}

.saber-passage-content {
  font-family: Georgia, "Times New Roman", serif;
  font-size: var(--saber-font-size);
  line-height: var(--saber-line-height);
  color: #1e293b;
  white-space: pre-line;
  letter-spacing: 0.01em;
}

.saber-passage-content p {
  margin-bottom: 1.4rem;
}

/* RIGHT PANE: QUESTIONS & OPTIONS */
.saber-questions-pane {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.saber-questions-scroll {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-height: calc(100vh - 9rem);
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
}

.question-box {
  background: #ffffff;
  border: 1.5px solid var(--saber-border);
  border-radius: 20px;
  padding: 1.5rem 1.6rem;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.03);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.question-box.answered {
  border-color: #a5b4fc;
}

.question-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.question-number-badge {
  background: #f1f5f9;
  color: #475569;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
  letter-spacing: 0.04em;
}

.question-box.answered .question-number-badge {
  background: #dcfce7;
  color: #15803d;
}

.question-competency-tag {
  font-size: 0.72rem;
  font-weight: 700;
  color: #6366f1;
}

.question-stem {
  margin: 0 0 1rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.5;
}

/* OPTIONS A, B, C, D */
.options-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.option-btn {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
  width: 100%;
}

.option-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.option-bullet {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  color: #475569;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.option-text {
  font-size: 0.95rem;
  font-weight: 500;
  color: #1e293b;
  line-height: 1.4;
}

.option-btn.selected {
  background: #eef2ff;
  border-color: var(--saber-primary);
  box-shadow: 0 2px 8px rgba(67, 56, 202, 0.15);
}

.option-btn.selected .option-bullet {
  background: var(--saber-primary);
  border-color: var(--saber-primary);
  color: #ffffff;
}

.option-btn.selected .option-text {
  color: #1e1b4b;
  font-weight: 700;
}

/* FOOTER ACTIONS */
.saber-pane-footer {
  background: #ffffff;
  border: 1px solid var(--saber-border);
  border-radius: 18px;
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.saber-nav-btn {
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  padding: 10px 20px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.saber-nav-btn.secondary {
  background: transparent;
  border: 1.5px solid #cbd5e1;
  color: #475569;
}

.saber-nav-btn.secondary:hover:not(:disabled) {
  background: #f1f5f9;
  color: #0f172a;
}

.saber-nav-btn.secondary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.saber-nav-btn.primary {
  background: var(--saber-primary);
  border: none;
  color: #ffffff;
}

.saber-nav-btn.primary:hover {
  background: #3730a3;
  transform: translateY(-1px);
}

.saber-nav-btn.finish {
  background: #10b981;
  border: none;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.saber-nav-btn.finish:hover {
  background: #059669;
  transform: translateY(-1px);
}

/* MODAL RESULTS & PEDAGOGICAL FEEDBACK */
.saber-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 1.25rem;
}

.saber-modal-dialog {
  background: #ffffff;
  width: 100%;
  max-width: 860px;
  max-height: 92vh;
  border-radius: 28px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.saber-modal-header {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
  color: #ffffff;
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-close-icon-btn {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

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

.saber-modal-body {
  padding: 1.75rem 2rem;
  overflow-y: auto;
}

.saber-score-overview-card {
  background: #f8fafc;
  border: 1.5px solid var(--saber-border);
  border-radius: 20px;
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.score-big-circle {
  text-align: center;
}

.score-big-num {
  font-family: var(--font-display, inherit);
  font-size: 3rem;
  font-weight: 900;
  line-height: 1;
}

.score-big-denom {
  font-size: 0.85rem;
  color: var(--saber-text-muted);
  font-weight: 700;
}

.feedback-breakdown-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feedback-item-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  padding: 12px 16px;
}

.feedback-item-card.correct {
  border-left: 6px solid #10b981;
}

.feedback-item-card.incorrect {
  border-left: 6px solid #ef4444;
}

.saber-modal-footer {
  background: #f8fafc;
  border-top: 1px solid var(--saber-border);
  padding: 1.25rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
