/* ==========================================================================
   Компактное оформление таблиц на страницах разделов (/partition/*)
   Подключается в application/views/plus/partition.php
   ========================================================================== */

.white-inf .table-scroll {
    margin: 1em 0;
    -webkit-overflow-scrolling: touch;
}

.white-inf table {
    width: 100%;
    min-width: 620px;
    border: none;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
    font-size: .8em;
    line-height: 1.35;
}

.white-inf table p {
    margin: 0;
    padding: 0;
}

/* Ячейки — компактные отступы */
.white-inf table td {
    border: none;
    border-bottom: 1px solid #ececec;
    padding: 5px 7px;
    vertical-align: middle;
    color: #333;
    background: #fff;
    text-align: left;
    word-wrap: break-word;
}

.white-inf table td.tbl-center {
    text-align: center;
}

/* --- Ширины колонок (подсказки для авто-раскладки) --------------------- */
/* Наименование программы — гибкая колонка */
.white-inf table tbody td:nth-child(3),
.white-inf table thead tr:first-child td:nth-child(3) {
    width: 40%;
    -webkit-hyphens: auto;
    -moz-hyphens: auto;
    hyphens: auto;
}

/* Служебные колонки — узкие */
.white-inf table tbody td:nth-child(1),
.white-inf table thead tr:first-child td:nth-child(1) {
    width: 3%;
}

/* Вертикальные заголовки («№ п/п», «Номер программы») — узкие колонки */
.white-inf table thead tr:first-child td.tbl-vert {
    width: 26px;
    text-align: center;
    vertical-align: middle;
    padding: 5px 3px;
}

.white-inf table thead td.tbl-vert .tbl-vert-inner {
    display: inline-block;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    white-space: nowrap;
    line-height: 1;
}

/* --- Шапка таблицы (фиксируется при прокрутке на десктопе) ------------- */
.white-inf table thead td {
    position: sticky;
    width: 10px;
    top: 0;
    z-index: 2;
    background: #212630;
    border-bottom: none;
    border-right: 1px solid #3d3d3d;
    color: #fff;
    font-weight: 600;
    font-size: .95em;
}

/* Ячейки-заполнители шапки (места, где раньше был rowspan) */
.white-inf table thead td.tbl-fill {
    padding: 0 3px;
    font-size: 0;
    line-height: 0;
}

/* Нижняя граница шапки — только под последним рядом */
.white-inf table thead td.tbl-head-last {
    border-bottom: 2px solid #3d3d3d;
}

/* --- Секционные строки ------------------------------------------------- */
.white-inf table tr.tbl-section-row td {
    background: #FADF17;
    border-bottom: 1px solid #d9c100;
    color: #1c1c1c;
    font-weight: 700;
}

/* Текущая секция прилипает под шапкой при прокрутке */
.white-inf table tr.tbl-section-stuck td {
    position: sticky;
    z-index: 1;
}

/* --- Зебра -------------------------------------------------------------- */
.white-inf table tr.tbl-alt td {
    background: #f2f2f2;
}

/* --- Подсветка строки при наведении ------------------------------------- */
.white-inf table tbody tr:hover td {
    background: #fdf6d8;
}

.white-inf table tbody tr.tbl-section-row:hover td {
    background: #FADF17;
}

/* --- Пустые ячейки ------------------------------------------------------- */
.white-inf table td.tbl-empty {
    color: #b5b5b5;
    text-align: center;
}

/* --- Ссылки в таблице (в т.ч. на скачивание программ) ------------------- */
.white-inf table td a {
    color: #16588e;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px dashed #16588e;
    white-space: nowrap;
}

.white-inf table td a:hover {
    color: #a57c00;
    border-bottom-color: #a57c00;
}

.white-inf table td a[href$=".pdf"]::after,
.white-inf table td a[href$=".doc"]::after,
.white-inf table td a[href$=".docx"]::after,
.white-inf table td a[href$=".xls"]::after,
.white-inf table td a[href$=".xlsx"]::after {
    content: " \2193";
    font-weight: 700;
}

/* --- Мобильные: горизонтальная прокрутка --------------------------------- */
@media (max-width: 1059px) {
    .white-inf .table-scroll {
        overflow-x: auto;
    }

    .white-inf table thead td {
        position: static;
    }
}
