/* ==========================================
   ПедАссистент — основные стили
   Вынесено из index.html (Шаг A, P0.10)
   ========================================== */

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", sans-serif;
  background-color: #e2e8f0;
}

/* ---------- Таблицы в #output ---------- */
#output table {
  width: 100%; border-collapse: separate; border-spacing: 0; margin: 18px 0;
  font-size: 10.5pt; border: 1px solid #cbd5e1; border-radius: 14px;
  overflow: hidden; background: #ffffff; box-shadow: 0 1px 4px rgba(0,0,0,0.02);
}
#output th {
  background-color: #e2e8f0; color: #0f172a; font-weight: 700;
  padding: 10px 14px; text-align: left;
  border-bottom: 1.5px solid #cbd5e1; border-right: 1px solid #cbd5e1;
}
#output td {
  border-bottom: 1px solid #e2e8f0; border-right: 1px solid #cbd5e1;
  padding: 10px 14px; vertical-align: top; line-height: 1.5; color: #334155;
}
#output th:last-child, #output td:last-child { border-right: none; }
#output tr:last-child td { border-bottom: none; }

#output blockquote {
  background: linear-gradient(135deg, rgba(238,242,255,0.85) 0%, rgba(250,245,255,0.85) 100%);
  border-left: 4px solid #6366f1; border-radius: 14px;
  padding: 12px 18px; margin: 16px 0; font-size: 11pt; color: #1e1b4b; font-style: normal;
}

/* Перекрывающие стили */
#output table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 10.5pt; border: 1.5px solid #1e293b; table-layout: auto; }
#output th, #output td { border: 1px solid #475569; padding: 9px 12px; text-align: left; vertical-align: top; line-height: 1.45; }
#output th { background-color: #f1f5f9; font-weight: 700; color: #0f172a; border-bottom: 2px solid #1e293b; }
#output tr:nth-child(even) { background-color: #f8fafc; }
#output h1 { font-size: 16pt; font-weight: 700; color: #1e1b4b; margin-top: 24px; margin-bottom: 10px; border-bottom: 2px solid #cbd5e1; padding-bottom: 4px; text-align: center; }
#output h2 { font-size: 13pt; font-weight: 700; color: #312e81; margin-top: 20px; margin-bottom: 8px; border-left: 4px solid #6366f1; padding-left: 8px; }
#output h3 { font-size: 11.5pt; font-weight: 600; color: #4338ca; margin-top: 14px; margin-bottom: 4px; }
#output ul { list-style-type: disc; margin-left: 24px; margin-bottom: 12px; }
#output ol { list-style-type: decimal; margin-left: 24px; margin-bottom: 12px; }
#output li { margin-bottom: 4px; }
#output p { margin-bottom: 10px; line-height: 1.5; }
#output blockquote { border-left: 4px solid #94a3b8; background: #f8fafc; padding: 8px 12px; margin: 12px 0; font-style: italic; }

/* ---------- Точки оценки в характеристике ---------- */
.char-dot { width: 18px; height: 18px; border-radius: 9999px; border: 2px solid; background: transparent; cursor: pointer; padding: 0; display: inline-block; transition: background-color .1s, box-shadow .1s; }
.char-dot-good { border-color: #10b981; }
.char-dot-mid  { border-color: #f59e0b; }
.char-dot-bad  { border-color: #ef4444; }
.char-dot-good.is-selected { background: #10b981; box-shadow: 0 0 0 2px #a7f3d0; }
.char-dot-mid.is-selected  { background: #f59e0b; box-shadow: 0 0 0 2px #fde68a; }
.char-dot-bad.is-selected  { background: #ef4444; box-shadow: 0 0 0 2px #fecaca; }

/* ---------- Совместимость ---------- */
.owl-blend-video { mix-blend-mode: multiply; filter: contrast(1.05) brightness(1.02); }

/* ==========================================
   ПЕЧАТЬ И ЭКСПОРТ В PDF (Способ 1)
   ========================================== */
@page { 
  size: A4 landscape; 
  margin: 1.2cm; 
}

@media print {
  /* 1. Скрываем ВСЁ на странице по умолчанию */
  body * {
    visibility: hidden;
  }
  
  /* 2. Показываем ТОЛЬКО блок с результатом и его содержимое */
  #output, #output * {
    visibility: visible;
  }
  
  /* 3. Прижимаем результат к верхнему левому углу */
  #output {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    padding: 0 !important;
    margin: 0 !important;
  }
  
  /* 4. Убираем фоны, тени и лишние рамки для чистого PDF */
  body { background: white !important; font-size: 10pt !important; color: black !important; }
  #preview-card { border: none !important; box-shadow: none !important; }
  
  /* 5. Делаем таблицы черно-белыми и запрещаем им рваться */
  #output table { border: 1.5px solid black !important; }
  #output th, #output td { border: 1px solid black !important; }
  #output th { background-color: #f0f0f0 !important; color: black !important; -webkit-print-color-adjust: exact; }
  
  /* 6. Запрет разрыва строк таблиц и формул */
  #output tr { page-break-inside: avoid; page-break-after: auto; }
  #output thead { display: table-header-group; }
  .katex { page-break-inside: avoid; }
  .katex-display { page-break-inside: avoid; }
}