/* ====================================================================
   COM_FUGO Simulation Results Styles
   All styles scoped to .simulation-page
   ==================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

.simulation-page *,
.simulation-page *::before,
.simulation-page *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.simulation-page {
  --blue: #22B4F9;
  --green: #8BE0A2;
  --yellow: #FCF875;
  --purple: #9999FF;
  --orange: #D77C5B;
  --pink: #C9597E;
  --gold: #D2A162;
  --ok-bg: #E8F8ED;
  --ok-border: #8BE0A2;
  --ok-text: #1A4A27;
  --warn-bg: #FEF9E0;
  --warn-border: #FCF875;
  --warn-text: #5A4400;
  --bad-bg: #FDECEC;
  --bad-border: #F09595;
  --bad-text: #6B1A1A;
  --surface: #FFFFFF;
  --bg: #F7F8FA;
  --border: #E4E6EA;
  --text: #1A1C20;
  --muted: #6B7280;
  --subtle: #9CA3AF;
  --radius: 12px;
  --font: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  padding: 0;
  max-width: 680px;
  margin: 0 auto;
  padding: 28px 20px 60px;
}

/* ── TOP HEADER BAR ── */
.simulation-page .top-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.simulation-page .logo {
  height: 28px;
}

.simulation-page .top-bar-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  margin-left: 4px;
}

/* ── PROFILE HEADER ── */
.simulation-page .profile {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.simulation-page .avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: #1A1C20;
  flex-shrink: 0;
}

.simulation-page .profile-name {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
}

.simulation-page .profile-sub {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}

/* ── CARD ── */
.simulation-page .card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 14px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .04);
}

/* ── SIM HEADER ── */
.simulation-page .sim-header {
  padding: 16px 20px 14px;
  border-bottom: 1px solid var(--border);
}

.simulation-page .sim-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  color: #1A1C20;
  background: #D6F2FE;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.simulation-page .sim-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 3px;
}

.simulation-page .sim-date {
  font-size: 13px;
  color: var(--muted);
}

/* ── 3 SCORE CELLS ── */
.simulation-page .score-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--border);
}

.simulation-page .score-cell {
  padding: 18px 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.simulation-page .score-cell + .score-cell {
  border-left: 1px solid var(--border);
}

.simulation-page .score-label {
  font-size: 10px;
  font-weight: 600;
  color: #1A1C20;
  text-transform: uppercase;
  letter-spacing: .04em;
  line-height: 1.3;
  display: block;
}

.simulation-page .score-num {
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
  display: block;
  color: #22B4F9;
}

.simulation-page .score-sub {
  font-size: 12px;
  font-weight: 600;
  margin-top: 4px;
  display: block;
}

/* ── PERCENTIL WIDE CELL ── */
.simulation-page .pctile-top {
  border-bottom: 1px solid var(--border);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.simulation-page .pctile-top-left {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.simulation-page .pctile-top-label {
  font-size: 11px;
  color: #1A1C20;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.simulation-page .pctile-info-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.simulation-page .pctile-info-item {
  font-size: 13px;
  font-weight: 400;
  color: #1A1C20;
  display: flex;
  align-items: center;
  gap: 6px;
}

.simulation-page .pctile-info-item::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22B4F9;
  flex-shrink: 0;
}

.simulation-page .pctile-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex-shrink: 0;
}

.simulation-page .pctile-top-value {
  font-size: 36px;
  font-weight: 700;
  color: #F0E87A;
  line-height: 1;
}

.simulation-page .pctile-top-sublabel {
  font-size: 11px;
  color: #1A1C20;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* ── PERCENTIL DETAIL — teplomer ── */
.simulation-page .pctile-section {
  padding: 20px 20px 24px;
  border-bottom: 1px solid var(--border);
}

.simulation-page .pctile-desc {
  font-size: 13px;
  color: #1A1C20;
  line-height: 1.65;
  margin-bottom: 22px;
}

.simulation-page .pctile-desc strong {
  color: #1A1C20;
  font-weight: 700;
}

/* teplomer */
.simulation-page .thermometer-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  position: relative;
}

.simulation-page .thermo-labels-top {
  width: 100%;
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #1A1C20;
  font-weight: 500;
  margin-bottom: 4px;
  padding: 0 2px;
}

.simulation-page .thermo-labels-top span {
  position: relative;
}

.simulation-page .thermo-labels-top .milestone {
  font-size: 11px;
  font-weight: 700;
  color: #1A1C20;
}

.simulation-page .thermo-labels-top .midmark {
  font-size: 10px;
  font-weight: 400;
  color: #6B7280;
}

/* milestone tick lines above track */
.simulation-page .thermo-ticks {
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 2px;
  margin-bottom: 2px;
}

.simulation-page .thermo-tick {
  width: 1px;
  height: 6px;
  background: #1A1C20;
  border-radius: 1px;
}

.simulation-page .thermo-tick.mid {
  background: #D1D5DB;
}

.simulation-page .thermo-track-wrap {
  width: 100%;
  position: relative;
  height: 52px;
  display: flex;
  align-items: center;
}

.simulation-page .thermo-track {
  width: 100%;
  height: 18px;
  border-radius: 20px;
  background: linear-gradient(90deg,
      #C9597E 0%,
      #D77C5B 33%,
      #FCF875 60%,
      #8BE0A2 100%);
  position: relative;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, .15), 0 3px 12px rgba(0, 0, 0, .1);
}

/* milestone vertical lines on track */
.simulation-page .thermo-track::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 20px;
  background:
    linear-gradient(90deg, transparent 24.5%, rgba(255, 255, 255, .5) 24.5%, rgba(255, 255, 255, .5) 25.5%, transparent 25.5%),
    linear-gradient(90deg, transparent 49.5%, rgba(255, 255, 255, .5) 49.5%, rgba(255, 255, 255, .5) 50.5%, transparent 50.5%),
    linear-gradient(90deg, transparent 74.5%, rgba(255, 255, 255, .5) 74.5%, rgba(255, 255, 255, .5) 75.5%, transparent 75.5%);
}

.simulation-page .thermo-pointer {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.simulation-page .thermo-val-label {
  background: #1A1C20;
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 10px;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(26, 28, 32, .3);
  margin-bottom: 2px;
}

.simulation-page .thermo-val-label::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #1A1C20;
}

.simulation-page .thermo-bulb {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #1A1C20;
  border: 3px solid white;
  box-shadow: 0 0 0 3px #1A1C20, 0 4px 16px rgba(26, 28, 32, .4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 8px;
  font-weight: 700;
}

.simulation-page .thermo-labels-bottom {
  width: 100%;
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #1A1C20;
  margin-top: 8px;
  padding: 0 2px;
}

/* ── ACCORDION ── */
.simulation-page .accordion-item {
  border-bottom: 1px solid var(--border);
}

.simulation-page .accordion-item:last-child {
  border-bottom: none;
}

.simulation-page .accordion-trigger {
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  padding: 15px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-align: left;
  transition: background .15s;
}

.simulation-page .accordion-trigger:hover {
  background: #FAFBFC;
}

.simulation-page .accordion-trigger-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.simulation-page .accordion-chevron {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--muted);
  transition: transform .25s;
}

.simulation-page .accordion-item.open .accordion-chevron {
  transform: rotate(180deg);
}

.simulation-page .accordion-body {
  display: none;
  padding: 0 20px 18px;
}

.simulation-page .accordion-item.open .accordion-body {
  display: block;
}

/* ── MATICA ── */
.simulation-page .matrix-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 12px;
}

.simulation-page .matrix-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: auto;
}

.simulation-page .matrix-table th {
  font-size: 10px;
  font-weight: 500;
  color: var(--muted);
  padding: 3px 3px;
  text-align: center;
  vertical-align: bottom;
}

.simulation-page .matrix-table th.cat-head {
  text-align: left;
  min-width: 120px;
  max-width: 140px;
  padding-right: 6px;
  font-size: 10px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: .04em;
  text-transform: uppercase;
}

.simulation-page .cat-label-cell {
  font-size: 10px;
  font-weight: 600;
  color: var(--text);
  padding: 5px 6px 5px 0;
  vertical-align: middle;
  text-transform: uppercase;
  letter-spacing: .02em;
  line-height: 1.2;
}

.simulation-page .cat-q-num {
  font-size: 10px;
  color: var(--muted);
  font-weight: 400;
  margin-left: 4px;
}

.simulation-page .q-td {
  padding: 2px 2px;
  vertical-align: middle;
}

.simulation-page .q-pair {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  white-space: nowrap;
}

.simulation-page .q-pair-num {
  font-size: 9px;
  color: #1A1C20;
  font-weight: 500;
  width: 14px;
  text-align: right;
}

.simulation-page .q-cell {
  min-width: 24px;
  width: auto;
  height: 26px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  border: 2px solid;
  padding: 0 4px;
  white-space: nowrap;
}

.simulation-page .q-ok {
  background: #fff;
  border-color: #22C55E;
  color: #166534;
}

.simulation-page .q-wrong {
  background: #fff;
  border-color: #EF4444;
  color: #991B1B;
}

.simulation-page .q-partial {
  background: #fff;
  border-color: #EAB308;
  color: #713F12;
}

.simulation-page .q-skip {
  background: #fff;
  border-color: #D1D5DB;
  color: #9CA3AF;
}

.simulation-page .bar-td {
  padding: 3px 2px 3px 8px;
  vertical-align: middle;
  min-width: 60px;
}

.simulation-page .mini-bar {
  height: 6px;
  border-radius: 4px;
  margin-bottom: 3px;
  min-width: 2px;
}

.simulation-page .mini-pct {
  font-size: 11px;
  font-weight: 600;
}

.simulation-page .row-gap {
  height: 5px;
}

.simulation-page .legend-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.simulation-page .leg-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #1A1C20;
}

.simulation-page .leg-sq {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 2px solid;
  flex-shrink: 0;
}

/* Table wrapper for horizontal scroll on mobile */
.simulation-page .matrix-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ── ODPORÚČANIA ── */
.simulation-page .rec-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 9px;
  border: 1.5px solid;
  margin-bottom: 9px;
  background: #ffffff;
}

.simulation-page .rec-item:last-child {
  margin-bottom: 0;
}

.simulation-page .rec-item.red {
  background: var(--bad-bg);
  border-color: var(--bad-border);
}

.simulation-page .rec-item.orange {
  background: var(--warn-bg);
  border-color: var(--warn-border);
}

.simulation-page .rec-item.green {
  background: var(--ok-bg);
  border-color: var(--ok-border);
}

.simulation-page .rec-icon {
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 1px;
  line-height: 1;
}

.simulation-page .rec-text {
  font-size: 13px;
  line-height: 1.65;
  color: var(--text);
}

.simulation-page .rec-text strong {
  font-weight: 700;
  display: block;
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: .03em;
}

/* ── AUTO BADGE ── */
.simulation-page .auto-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--muted);
  padding: 11px 20px;
  border-top: 1px solid var(--border);
  background: #F7F8FA;
}

.simulation-page .auto-badge svg {
  color: var(--blue);
}

/* ── CORRECT ANSWERS SECTION ── */
.simulation-page .correct-answers-section {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}

.simulation-page .correct-answers-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.simulation-page .correct-answers-title {
  font-size: 11px;
  font-weight: 700;
  color: #1A1C20;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.simulation-page .correct-answers-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* ── THERMOMETER LABELS ── */
.simulation-page .thermo-label-center {
  text-align: center;
}

.simulation-page .thermo-label-right {
  text-align: right;
}

.simulation-page .pctile-note {
  margin-top: 14px;
  font-size: 12px;
  color: #6B7280;
  font-style: italic;
  line-height: 1.5;
}

/* ── TABLE HEADERS ── */
.simulation-page .answers-header {
  text-align: center;
  font-size: 10px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: .04em;
  text-transform: uppercase;
}

.simulation-page .result-header {
  text-align: left;
  padding-left: 10px;
  font-size: 10px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: .04em;
  text-transform: uppercase;
  min-width: 68px;
}

/* ── LEGEND COLORS ── */
.simulation-page .leg-correct {
  border-color: #22C55E;
}

.simulation-page .leg-partial {
  border-color: #EAB308;
}

.simulation-page .leg-wrong {
  border-color: #EF4444;
}

.simulation-page .leg-skipped {
  border-color: #D1D5DB;
}

/* ── NO RECOMMENDATIONS MESSAGE ── */
.simulation-page .no-recommendations {
  padding: 20px;
  text-align: center;
  color: #6B7280;
  font-size: 13px;
}






