/* ─── ACP Academy — print.css ───────────────────────────────────────────
   Используется для сертификатов, дипломов и отчётов кабинета.
   Подключается дополнительно к main.css через <link media="print">.
──────────────────────────────────────────────────────────────────────── */

@media print {
  /* Базовый сброс */
  *,
  *::before,
  *::after {
    box-shadow: none !important;
    text-shadow: none !important;
    animation: none !important;
    transition: none !important;
  }

  /* Цвета — белый фон, чёрный текст (читаемость на бумаге) */
  body {
    background: #ffffff !important;
    color: #000000 !important;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 11pt;
    line-height: 1.55;
  }

  /* Скрыть интерфейсные блоки */
  .site-header,
  .site-footer,
  .navbar,
  nav,
  .actions,
  .button,
  .btn,
  .skip-link,
  form,
  .application-form,
  .cabinet-header form,
  .chip,
  .catalog-filters,
  .progress-bar,
  .nav-toggle,
  [aria-label="Основные действия"] {
    display: none !important;
  }

  /* Основной контент — полный лист A4 */
  .site-main,
  .cabinet-dashboard {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    min-height: auto !important;
  }

  .content-block {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 1cm !important;
  }

  /* Страничный разрыв */
  .page-break-before { page-break-before: always; }
  .page-break-after  { page-break-after: always; }
  .no-page-break     { page-break-inside: avoid; }

  /* Заголовки — чёрные */
  h1, h2, h3, h4 {
    color: #000000 !important;
    page-break-after: avoid;
  }

  /* Ссылки — показывать URL */
  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 9pt;
    color: #555555;
  }
  a[href^="#"]::after,
  a[href^="javascript:"]::after {
    content: "" !important;
  }

  /* Таблицы */
  table { border-collapse: collapse; width: 100%; }
  th, td {
    border: 1px solid #aaaaaa;
    padding: 0.4rem 0.6rem;
    color: #000000 !important;
  }
  thead { display: table-header-group; }
  tr { page-break-inside: avoid; }

  /* ─── Сертификат ──────────────────────────────────────────────────── */
  .certificate {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 25cm;
    padding: 2cm 3cm;
    text-align: center;
    border: 4px double #000000;
    page-break-inside: avoid;
  }
  .certificate__logo {
    width: 80px;
    margin-bottom: 1cm;
  }
  .certificate__title {
    font-size: 22pt;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5cm;
  }
  .certificate__subtitle {
    font-size: 13pt;
    margin-bottom: 1cm;
    color: #333333 !important;
  }
  .certificate__recipient {
    font-size: 20pt;
    font-weight: bold;
    border-bottom: 2px solid #000000;
    padding-bottom: 0.3cm;
    margin-bottom: 0.5cm;
    min-width: 12cm;
  }
  .certificate__program {
    font-size: 13pt;
    font-style: italic;
    margin-bottom: 1cm;
  }
  .certificate__meta {
    font-size: 10pt;
    color: #444444 !important;
    margin-top: 1.5cm;
    display: flex;
    gap: 3cm;
    justify-content: center;
  }
  .certificate__seal {
    margin-top: 1cm;
    font-size: 9pt;
    color: #666666 !important;
  }

  /* ─── Список модулей в кабинете при печати ────────────────────────── */
  .module-list, .module-item a {
    display: block !important;
    background: none !important;
    border: none !important;
    padding: 0.2rem 0 !important;
    color: #000000 !important;
    text-decoration: none !important;
  }

  /* Прогресс-бар при печати — текст */
  .progress-bar { display: none !important; }
  .cabinet-course::before {
    content: "Прогресс: " attr(data-completion) "%";
    display: block;
    font-weight: bold;
    margin-bottom: 0.5rem;
  }
}
