/*
 * Таблицы 2026.
 *
 * <div class="table26-scroll">
 *   <table class="table26 table26-2b">
 *     <thead>
 *       <tr>
 *         <th colspan="2">Программа</th>
 *         <th>Бюджетные места</th>
 *       </tr>
 *     </thead>
 *     <tbody>
 *       <tr>
 *         <td>21.05.05</td>
 *         <td>Название</td>
 *         <td>10</td>
 *       </tr>
 *     </tbody>
 *   </table>
 * </div>
 *
 * table26-1b … table26-8b — жирным и по левому краю первые 1…8 колонок тела.
 * table26-fit — на десктопе (от 768px) уложить таблицу в контейнер без
 * горизонтальной прокрутки. На мобильном min-width и прокрутка как у обычной.
 * Класс можно вешать на table или на table26-scroll.
 * Шрифт наследуется от сайта.
 * Прокрутка перетаскиванием — js/table2026.js, одним CSS это не делается.
 */

.table26-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  background: #fff;
  border-radius: 40px;
  box-shadow: 0 10px 10px rgba(0, 0, 0, 0.1);
  padding-bottom: 6px;
  cursor: grab;
}

.table26-scroll.is-dragging {
  cursor: grabbing;
  user-select: none;
}

/* Кнопку «показать колонки справа» скрипт больше не создаёт.
   Прячем её и на случай старого закэшированного js/table2026.js. */
.table26-nav,
.table26-frame > button {
  display: none !important;
}

.table26-scroll::-webkit-scrollbar {
  height: 14px;
}

.table26-scroll::-webkit-scrollbar-button,
.table26-scroll::-webkit-scrollbar-button:single-button,
.table26-scroll::-webkit-scrollbar-button:horizontal:start:decrement,
.table26-scroll::-webkit-scrollbar-button:horizontal:end:increment,
.table26-scroll::-webkit-scrollbar-corner {
  display: none;
  width: 0;
  height: 0;
  background: transparent;
}

.table26-scroll::-webkit-scrollbar-track {
  background: transparent;
  margin: 0 36px 4px;
}

.table26-scroll::-webkit-scrollbar-thumb {
  background: rgba(40, 110, 171, 0.4);
  border-radius: 999px;
  border: 4px solid transparent;
  background-clip: padding-box;
}

@supports (scrollbar-width: thin) {
  @supports not selector(::-webkit-scrollbar) {
    .table26-scroll {
      scrollbar-width: thin;
      scrollbar-color: rgba(40, 110, 171, 0.4) transparent;
    }
  }
}

.table26 {
  width: 100%;
  min-width: 980px;
  margin: 0;
  border-collapse: separate;
  border-spacing: 0;
  border: 0;
  background: #fff;
  color: #000;
  font-family: inherit;
  font-size: 17px;
  line-height: 1.25;
  border-radius: 40px;
  box-shadow: 0 10px 10px rgba(0, 0, 0, 0.1);
}

.table26-scroll .table26 {
  border-radius: 0;
  box-shadow: none;
}

.table26 th,
.table26 td {
  box-sizing: border-box;
  border: 0;
  padding: 20px 14px;
  vertical-align: middle;
  text-align: center;
  word-break: normal;
  overflow-wrap: break-word;
}

.table26 p {
  margin: 0;
}

.table26 thead th {
  height: 150px;
  min-width: 124px;
  background: #286eab;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  text-transform: uppercase;
  text-wrap: balance;
  padding: 24px 12px;
}

.table26 thead th:first-child {
  text-align: left;
  padding-left: 22px !important;
  border-top-left-radius: 40px;
}

.table26 thead th:last-child {
  padding-right: 22px !important;
  border-top-right-radius: 40px;
}

.table26 tbody td {
  height: 100px;
  font-weight: 400;
}

.table26 tbody td:first-child {
  padding-left: 22px;
}

.table26 tbody td:last-child {
  padding-right: 22px;
}

/* Первая строка белая, чётные — заливка #286eab на 7%. */
.table26 tbody tr:nth-child(odd) td {
  background: #fff;
}

.table26 tbody tr:nth-child(even) td {
  background: rgba(40, 110, 171, 0.07);
}

.table26 tbody tr:last-child td:first-child {
  border-bottom-left-radius: 40px;
}

.table26 tbody tr:last-child td:last-child {
  border-bottom-right-radius: 40px;
}

.table26-1b tbody td:nth-child(-n+1),
.table26-2b tbody td:nth-child(-n+2),
.table26-3b tbody td:nth-child(-n+3),
.table26-4b tbody td:nth-child(-n+4),
.table26-5b tbody td:nth-child(-n+5),
.table26-6b tbody td:nth-child(-n+6),
.table26-7b tbody td:nth-child(-n+7),
.table26-8b tbody td:nth-child(-n+8) {
  font-weight: 700;
  text-align: left;
}

.table26-1b tbody td:nth-child(1) {
  white-space: normal;
  min-width: 220px;
}

.table26-2b tbody td:nth-child(1) {
  width: 1%;
  white-space: nowrap;
}

.table26-2b tbody td:nth-child(2) {
  white-space: normal;
  min-width: 240px;
}

@media (max-width: 767px) {
  .table26-scroll {
    border-radius: 20px;
  }

  .table26-scroll::-webkit-scrollbar-track {
    margin: 0 16px 4px;
  }

  .table26 {
    border-radius: 20px;
    font-size: 15px;
  }

  .table26 thead th {
    height: auto;
    min-height: 108px;
    font-size: 14px;
    line-height: 1.35;
    padding: 18px 10px;
  }

  .table26 thead th:first-child {
    border-top-left-radius: 20px;
    padding-left: 16px !important;
  }

  .table26 thead th:last-child {
    border-top-right-radius: 20px;
    padding-right: 16px !important;
  }

  .table26 tbody td {
    height: auto;
    min-height: 72px;
    padding: 16px 10px;
  }

  .table26 tbody td:first-child {
    padding-left: 16px;
  }

  .table26 tbody td:last-child {
    padding-right: 16px;
  }

  .table26 tbody tr:last-child td:first-child {
    border-bottom-left-radius: 20px;
  }

  .table26 tbody tr:last-child td:last-child {
    border-bottom-right-radius: 20px;
  }
}

/* Вся таблица в ширину контейнера, без горизонтального скролла. Только десктоп. */
@media (min-width: 768px) {
  .table26-scroll.table26-fit,
  .table26-scroll:has(> .table26.table26-fit) {
    overflow-x: hidden;
    cursor: auto;
  }

  .table26-scroll.table26-fit.is-dragging,
  .table26-scroll:has(> .table26.table26-fit).is-dragging {
    cursor: auto;
  }

  .table26-scroll.table26-fit .table26,
  .table26-fit.table26 {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
  }

  .table26-scroll.table26-fit .table26 th,
  .table26-scroll.table26-fit .table26 td,
  .table26-fit.table26 th,
  .table26-fit.table26 td,
  .table26-fit.table26 tbody td:nth-child(n) {
    min-width: 0;
    width: auto;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .table26-scroll.table26-fit .table26 thead th,
  .table26-fit.table26 thead th {
    height: auto;
    min-height: 96px;
  }

  .table26-scroll.table26-fit .table26 tbody td,
  .table26-fit.table26 tbody td {
    height: auto;
    min-height: 72px;
  }
}
