/**
 * Стили для матрицы ответственности RACI
 * Версия 2025-05-03-003: Повышенная специфичность селекторов
 */

/* Общие стили для всех таблиц */
.table-scroll-wrapper table.responsibility-matrix-table {
    width: 100% !important;
    table-layout: fixed !important;
    border-collapse: collapse !important;
    margin-bottom: 30px !important;
}

/* Стили для ячеек */
.table-scroll-wrapper table.responsibility-matrix-table th,
.table-scroll-wrapper table.responsibility-matrix-table td {
    padding: 8px !important;
    border: 1px solid #ddd !important;
    vertical-align: middle !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.table-scroll-wrapper table.responsibility-matrix-table th {
    background-color: #f2f2f2 !important;
    text-align: center !important;
    font-weight: bold !important;
}

/* Первый столбец для всех таблиц */
.table-scroll-wrapper table.responsibility-matrix-table td:first-child,
.table-scroll-wrapper table.responsibility-matrix-table th:first-child {
    text-align: left !important;
    width: 20% !important;
    min-width: 180px !important;
    max-width: 250px !important;
}

/* Остальные столбцы: выравнивание по центру */
.table-scroll-wrapper table.responsibility-matrix-table td:not(:first-child),
.table-scroll-wrapper table.responsibility-matrix-table th:not(:first-child) {
    text-align: center !important;
}

/* Стили для первой таблицы (6 столбцов) */
.table-scroll-wrapper table.responsibility-matrix-table.table-1 td:not(:first-child),
.table-scroll-wrapper table.responsibility-matrix-table.table-1 th:not(:first-child) {
    width: 16% !important;
}

/* Стили для второй и третьей таблицы (12 столбцов) */
.table-scroll-wrapper table.responsibility-matrix-table.table-2 td:not(:first-child),
.table-scroll-wrapper table.responsibility-matrix-table.table-2 th:not(:first-child),
.table-scroll-wrapper table.responsibility-matrix-table.table-3 td:not(:first-child),
.table-scroll-wrapper table.responsibility-matrix-table.table-3 th:not(:first-child) {
    width: 7.27% !important; /* (100% - 20%) / 11 */
}

/* Стили для colgroup и col элементов */
.table-scroll-wrapper table.responsibility-matrix-table colgroup col {
    width: inherit !important;
}

/* Стили для colgroup в первой таблице */
.table-scroll-wrapper table.responsibility-matrix-table.table-1 colgroup col:first-child {
    width: 20% !important;
}
.table-scroll-wrapper table.responsibility-matrix-table.table-1 colgroup col:not(:first-child) {
    width: 16% !important;
}

/* Стили для colgroup во второй и третьей таблицах */
.table-scroll-wrapper table.responsibility-matrix-table.table-2 colgroup col:first-child,
.table-scroll-wrapper table.responsibility-matrix-table.table-3 colgroup col:first-child {
    width: 20% !important;
}
.table-scroll-wrapper table.responsibility-matrix-table.table-2 colgroup col:not(:first-child),
.table-scroll-wrapper table.responsibility-matrix-table.table-3 colgroup col:not(:first-child) {
    width: 7.27% !important;
}

/* Стили для RACI-обозначений */
.table-scroll-wrapper table.responsibility-matrix-table strong,
.table-scroll-wrapper table.responsibility-matrix-table b {
    font-weight: bold !important;
}

/* Улучшение читаемости на мобильных устройствах */
@media (max-width: 768px) {
    .table-scroll-wrapper table.responsibility-matrix-table {
        font-size: 12px !important;
    }
    
    .table-scroll-wrapper table.responsibility-matrix-table th,
    .table-scroll-wrapper table.responsibility-matrix-table td {
        padding: 4px !important;
    }
    
    .table-scroll-wrapper table.responsibility-matrix-table td:first-child,
    .table-scroll-wrapper table.responsibility-matrix-table th:first-child {
        min-width: 120px !important;
    }
}

/* Обертка для горизонтальной прокрутки */
.table-scroll-wrapper {
    overflow-x: auto !important;
    margin-bottom: 20px !important;
    max-width: 100% !important;
} 