/* OS SimLab - Test Evaluation & Results Modal */

/* Panel testů (v levém sloupci při testovacím režimu) */
.test-panel-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px;
}

.test-badge {
  background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
  color: #fff;
  font-weight: 800;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 12px;
  border: 1px solid #ef4444;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
}

.test-item-card {
  list-style: none;
  background: #08150d;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 8px;
}

.test-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.test-item-num {
  font-weight: 700;
  font-size: 11.5px;
  color: #34d399;
}

.test-item-pts {
  font-size: 11px;
  background: var(--bg-tertiary);
  padding: 1px 6px;
  border-radius: 10px;
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

.test-item-body {
  font-size: 12.5px;
  line-height: 1.4;
  color: #e8f7ee;
}

/* Modální okno výsledků testu */
.test-result-card {
  width: 580px;
}

.test-score-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #07150d;
  border-radius: 8px;
  padding: 16px 20px;
  border: 1px solid var(--border-color);
  box-shadow: inset 0 0 20px rgba(16, 185, 129, 0.05);
}

.test-pct-display {
  font-size: 42px;
  font-weight: 900;
  line-height: 1;
  color: #10b981;
}

.test-grade-display {
  font-size: 18px;
  font-weight: 700;
  text-align: right;
}

.test-progress-bar-container {
  height: 10px;
  background: #0f2317;
  border: 1px solid #1a3826;
  border-radius: 5px;
  overflow: hidden;
}

.test-progress-bar-fill {
  height: 100%;
  width: 0%;
  transition: width 0.6s ease;
}

.test-task-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.test-task-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12.5px;
  background: #08150d;
  border-left: 3px solid #547864;
}

.test-task-item.passed {
  border-left-color: #10b981;
}

.test-task-item.failed {
  border-left-color: #ef4444;
  background: #1a0a0d; /* Červený detail pozadí pro neúspěšné úlohy */
}

.test-task-icon {
  font-weight: 800;
  font-size: 14px;
}

.test-task-item.passed .test-task-icon {
  color: #10b981;
}

.test-task-item.failed .test-task-icon {
  color: #ef4444;
  text-shadow: 0 0 6px rgba(239, 68, 68, 0.6);
}

.test-task-desc {
  flex: 1;
  color: #e8f7ee;
}

.test-task-pts {
  font-weight: 700;
  font-family: monospace;
  font-size: 11.5px;
  color: var(--text-muted);
}

/* Kód pro učitele (Teacher Verification Code) */
.teacher-code-box {
  background: #07140c;
  border: 1px dashed var(--accent-red); /* Červený rámeček pro kontrolní kód */
  border-radius: 8px;
  padding: 12px 14px;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.1);
}

.teacher-code-title {
  font-size: 11.5px;
  color: #f87171; /* Červený detail nadpisu */
  font-weight: 600;
  margin-bottom: 6px;
}

.teacher-code-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.teacher-code-text {
  font-family: monospace;
  font-size: 13.5px;
  font-weight: 700;
  color: #a7f3d0;
  letter-spacing: 0.5px;
}

/* Tahák / Rosetta stone tabulka */
.cheatsheet-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.cheatsheet-table th, .cheatsheet-table td {
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  text-align: left;
}

.cheatsheet-table th {
  background: #0b2114;
  color: #e8f7ee;
  border-bottom: 2px solid var(--accent-red); /* Červená linka v záhlaví tabulky */
}

.cheatsheet-table code {
  font-family: monospace;
  background: #05120a;
  color: #34d399;
  padding: 2px 6px;
  border-radius: 3px;
  border: 1px solid #142e1f;
}

/* Patička certifikátu o výsledku testu */
.test-certificate-footer {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--border-color);
  font-size: 11px;
  color: var(--text-dim);
  text-align: center;
}

.test-certificate-footer a {
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.15s ease;
}

.test-certificate-footer a:hover {
  color: var(--accent-red);
  text-decoration: underline;
}

/* Styly pro tisk (Export do PDF) */
@media print {
  body * {
    visibility: hidden;
  }
  #test-result-modal, #test-result-modal * {
    visibility: visible;
  }
  #test-result-modal {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: #fff !important;
    color: #000 !important;
  }
  .modal-card {
    border: none !important;
    box-shadow: none !important;
    width: 100% !important;
  }
  .modal-close-btn, .btn {
    display: none !important;
  }
  .test-certificate-footer {
    display: block !important;
    visibility: visible !important;
    margin-top: 25px !important;
    padding-top: 12px !important;
    border-top: 1px solid #bbb !important;
    font-size: 10.5pt !important;
    color: #333 !important;
    text-align: center !important;
  }
  .test-certificate-footer a {
    color: #000 !important;
    text-decoration: underline !important;
  }
}

