/* 
 * Стили для таблиц и мобильной адаптации
 * Добавлено: 2025-05-02 для принудительного обновления
 */

/* Общие стили для таблиц */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 14px;
    table-layout: fixed;
}

th, td {
    padding: 8px;
    border: 1px solid #ddd;
    word-wrap: break-word; /* Для корректного разрыва длинных слов */
    vertical-align: top;
}

th {
    background-color: #f2f2f2;
    font-weight: bold;
    text-align: center;
}

tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* Стили для таблицы в разделе 06 - Operational Development Processes */
.operational-processes-table {
    table-layout: fixed;
    width: 100%;
}

.operational-processes-table col:nth-child(1) { width: 3%; }
.operational-processes-table col:nth-child(2) { width: 12%; }
.operational-processes-table col:nth-child(3) { width: 10%; } /* Уже в 1.5 раза */
.operational-processes-table col:nth-child(4) { width: 12%; }
.operational-processes-table col:nth-child(5) { width: 15%; }
.operational-processes-table col:nth-child(6) { width: 25%; } /* Шире в 1.5 раза */
.operational-processes-table col:nth-child(7) { width: 23%; }

/* Для всех таблиц на странице 06 */
[data-md-component="content"] h1:contains("Операционные процессы") ~ table {
    table-layout: fixed;
}

[data-md-component="content"] h1:contains("Операционные процессы") ~ table col:nth-child(1) { width: 3%; }
[data-md-component="content"] h1:contains("Операционные процессы") ~ table col:nth-child(2) { width: 12%; }
[data-md-component="content"] h1:contains("Операционные процессы") ~ table col:nth-child(3) { width: 10%; }
[data-md-component="content"] h1:contains("Операционные процессы") ~ table col:nth-child(4) { width: 12%; }
[data-md-component="content"] h1:contains("Операционные процессы") ~ table col:nth-child(5) { width: 15%; }
[data-md-component="content"] h1:contains("Операционные процессы") ~ table col:nth-child(6) { width: 25%; }
[data-md-component="content"] h1:contains("Операционные процессы") ~ table col:nth-child(7) { width: 23%; }

/* Стили для таблицы в разделе 05 - Value Creation Chain */
.value-chain-table {
    table-layout: fixed;
    width: 100%;
}

.value-chain-table col:nth-child(1) { width: 6%; }
.value-chain-table col:nth-child(2) { width: 12%; }
.value-chain-table col:nth-child(3) { width: 18%; }
.value-chain-table col:nth-child(4) { width: 25%; }
.value-chain-table col:nth-child(5) { width: 39%; }

/* Для всех таблиц на странице 05 */
[data-md-component="content"] h1:contains("Цепочка создания ценности") ~ table {
    table-layout: fixed;
}

[data-md-component="content"] h1:contains("Цепочка создания ценности") ~ table col:nth-child(1) { width: 6%; }
[data-md-component="content"] h1:contains("Цепочка создания ценности") ~ table col:nth-child(2) { width: 12%; }
[data-md-component="content"] h1:contains("Цепочка создания ценности") ~ table col:nth-child(3) { width: 18%; }
[data-md-component="content"] h1:contains("Цепочка создания ценности") ~ table col:nth-child(4) { width: 25%; }
[data-md-component="content"] h1:contains("Цепочка создания ценности") ~ table col:nth-child(5) { width: 39%; }

/* Стили для таблицы в разделе 02 - Investment Thesis Filters */
.investment-thesis-table {
    table-layout: fixed;
    width: 100%;
}

.investment-thesis-table col:nth-child(1) { width: 5%; }
.investment-thesis-table col:nth-child(2) { width: 23.75%; }
.investment-thesis-table col:nth-child(3) { width: 23.75%; }
.investment-thesis-table col:nth-child(4) { width: 23.75%; }
.investment-thesis-table col:nth-child(5) { width: 23.75%; }

/* Стили для таблицы в разделе 08 - Responsibility Matrix */
.responsibility-matrix-table {
    table-layout: fixed;
    width: 100%;
}

/* Первая таблица с 6 столбцами */
.responsibility-matrix-table.table-1 col:nth-child(1) { width: 20%; }
.responsibility-matrix-table.table-1 col:nth-child(2) { width: 16%; }
.responsibility-matrix-table.table-1 col:nth-child(3) { width: 16%; }
.responsibility-matrix-table.table-1 col:nth-child(4) { width: 16%; }
.responsibility-matrix-table.table-1 col:nth-child(5) { width: 16%; }
.responsibility-matrix-table.table-1 col:nth-child(6) { width: 16%; }

/* Вторая и третья таблицы с 12 столбцами */
.responsibility-matrix-table.table-2 col:nth-child(1),
.responsibility-matrix-table.table-3 col:nth-child(1) { width: 20%; }

.responsibility-matrix-table.table-2 col:nth-child(n+2),
.responsibility-matrix-table.table-3 col:nth-child(n+2) { width: 7.27%; } /* (100% - 20%) / 11 */

/* Глобальные селекторы для страницы матрицы ответственности */
body[data-md-url*="08_Responsibility_Matrix"] table {
    width: 100%;
    table-layout: fixed;
}

/* Настройка первого столбца для всех таблиц матрицы ответственности */
body[data-md-url*="08_Responsibility_Matrix"] table td:first-child,
body[data-md-url*="08_Responsibility_Matrix"] table th:first-child {
    width: 20%;
    min-width: 180px;
}

/* Настройка остальных столбцов */
body[data-md-url*="08_Responsibility_Matrix"] table td:not(:first-child),
body[data-md-url*="08_Responsibility_Matrix"] table th:not(:first-child) {
    width: auto; /* Все остальные столбцы равные */
    min-width: 40px;
}

/* Стили для таблицы в разделе 11 - Competencies Checklist */
.competencies-checklist-table {
    table-layout: fixed;
    width: 100%;
}

.competencies-checklist-table col:nth-child(1) { width: 3%; }
.competencies-checklist-table col:nth-child(2) { width: 15%; }
.competencies-checklist-table col:nth-child(3) { width: 57%; }
.competencies-checklist-table col:nth-child(4) { width: 10%; }
.competencies-checklist-table col:nth-child(5) { width: 15%; }

/* Стили для таблицы в разделе 07 - Operational Roadmap */
.operational-roadmap-table {
    table-layout: fixed;
    width: 100%;
}

.operational-roadmap-table tr {
    height: 35px; /* Уменьшенная высота строк */
}

.operational-roadmap-table col:nth-child(1) { width: 5%; }
.operational-roadmap-table col:nth-child(2) { width: 7%; } /* В 3 раза уже */
.operational-roadmap-table col:nth-child(3) { width: 15%; } /* В 1.5 раза уже */
.operational-roadmap-table col:nth-child(4) { width: 48%; } /* В 2 раза шире */
.operational-roadmap-table col:nth-child(5) { width: 25%; } /* В 1.5 раза шире */

/* Прямые селекторы для страниц с конкретными путями */
/* 06 - Operational Development Processes */
body[data-md-url*="06_Operational_Development_Processes"] table {
    width: 100%;
    table-layout: fixed;
}

body[data-md-url*="06_Operational_Development_Processes"] table td:nth-child(1) { width: 3%; }
body[data-md-url*="06_Operational_Development_Processes"] table td:nth-child(2) { width: 12%; }
body[data-md-url*="06_Operational_Development_Processes"] table td:nth-child(3) { width: 10%; }
body[data-md-url*="06_Operational_Development_Processes"] table td:nth-child(4) { width: 12%; }
body[data-md-url*="06_Operational_Development_Processes"] table td:nth-child(5) { width: 15%; }
body[data-md-url*="06_Operational_Development_Processes"] table td:nth-child(6) { width: 25%; }
body[data-md-url*="06_Operational_Development_Processes"] table td:nth-child(7) { width: 23%; }

/* 05 - Value Creation Chain */
body[data-md-url*="05_Value_Creation_Chain"] table {
    width: 100%;
    table-layout: fixed;
}

body[data-md-url*="05_Value_Creation_Chain"] table td:nth-child(1) { width: 6%; }
body[data-md-url*="05_Value_Creation_Chain"] table td:nth-child(2) { width: 12%; }
body[data-md-url*="05_Value_Creation_Chain"] table td:nth-child(3) { width: 18%; }
body[data-md-url*="05_Value_Creation_Chain"] table td:nth-child(4) { width: 25%; }
body[data-md-url*="05_Value_Creation_Chain"] table td:nth-child(5) { width: 39%; }

/* Дополнительные стили для мобильной адаптации */
@media (max-width: 768px) {
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
} 