/* Отчёт 2024: таблица на всю ширину контейнера, без вынужденного min-width страницы */
.report-pdf-root.report-table-version {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    overflow: hidden;
}

/* Горизонтальный скролл только у обёртки таблицы, не у всей страницы */
.report-pdf-wrap {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    padding-bottom: 1rem;
    box-sizing: border-box;
    overflow-x: hidden;
}

.report-table-scroll {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1rem;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

main#main .report-table-scroll table.report-events-table {
    display: table !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    border-collapse: collapse !important;
    table-layout: fixed !important;
    margin-bottom: 0 !important;
}

main#main .report-table-scroll table.report-events-table thead,
main#main .report-table-scroll table.report-events-table tbody {
    display: table-row-group !important;
}

main#main .report-table-scroll table.report-events-table tr {
    display: table-row !important;
}

main#main .report-table-scroll table.report-events-table th,
main#main .report-table-scroll table.report-events-table td {
    display: table-cell !important;
    vertical-align: top !important;
    float: none !important;
    position: static !important;
    overflow-wrap: anywhere;
    word-break: break-word;
    /* Bootstrap .text-nowrap в шаблоне/классах иначе режет ячейки по горизонтали */
    white-space: normal !important;
}

main#main .report-table-scroll table.report-events-table td {
    max-width: 0;
}

.report-events-table .rpt-num {
    font-weight: 700;
    white-space: normal;
    font-size: 0.88rem;
    width: 4%;
}

.report-events-table .rpt-date {
    width: 10%;
    color: inherit;
    font-size: inherit;
    line-height: inherit;
    font-weight: inherit;
}

/* Участники + организаторы (одна колонка) */
.report-events-table thead .rpt-th-participants,
.report-events-table td.rpt-participants {
    width: 30%;
    min-width: 11rem;
    box-sizing: border-box;
}

main#main .report-table-scroll table.report-events-table td.rpt-participants {
    max-width: none !important;
}

.report-events-table thead .rpt-th-participants {
    white-space: normal;
    line-height: 1.25;
    hyphens: none;
}

.report-events-table .rpt-cell-text {
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: anywhere;
    hyphens: auto;
}

.report-events-table .rpt-photo {
    vertical-align: middle !important;
    text-align: center;
    width: 22%;
}

.report-events-table thead .rpt-th-num,
.report-events-table thead .rpt-th-date {
    text-align: center;
    vertical-align: middle;
}

.report-ev-photo {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    width: auto;
    height: auto;
    max-height: 160px;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

@media (max-width: 767.98px) {
    .report-events-table .rpt-ev-photo,
    .report-ev-photo {
        max-height: 120px;
    }

    main#main .report-table-scroll table.report-events-table {
        font-size: 0.82rem;
    }

    main#main .report-table-scroll table.report-events-table th,
    main#main .report-table-scroll table.report-events-table td {
        padding: 0.4rem 0.25rem !important;
    }
}

/* Старый экспорт PDF (абсолютное позиционирование) */
.report-pdf-root:not(.report-table-version) {
    font-family: "Times New Roman", Times, serif;
}

.report-pdf-page {
    margin: 0 auto 2.5rem;
    display: flex;
    justify-content: flex-start;
}

.report-pdf-page > div[id^="pdf-page-"] {
    position: relative;
    flex: 0 0 auto;
    margin: 0 auto;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}

.report-pdf-root:not(.report-table-version) p {
    position: absolute;
    margin: 0;
    padding: 0;
    white-space: pre-wrap;
}

.report-pdf-root:not(.report-table-version) .report-pdf-page img {
    position: absolute;
    max-width: none;
}
