/**
 * Кастомные стили для DataTables
 * Переиспользуемые на всех страницах
 */

/* Dropdown кнопки - убираем конфликты с pointer-events */
.dropdown-btn-clickable {
    pointer-events: auto !important;
}

.dropdown-icon-no-events {
    pointer-events: none !important;
}

/* DataTables кнопка действий - полное переопределение */
.dt-actions-container {
    all: unset !important;
    width: auto !important;
    height: auto !important;
    display: block !important;
}

.dt-actions-container:hover,
.dt-actions-container:focus,
.dt-actions-container:active {
    all: unset !important;
    display: block !important;
}

/* Выравнивание кнопок действий справа */
.datatables-projects_wrapper .dt-layout-row:first-child .dt-layout-cell:last-child,
.datatables-custom_wrapper .dt-layout-row:first-child .dt-layout-cell:last-child,
.datatables-keywords_wrapper .dt-layout-row:first-child .dt-layout-cell:last-child,
.datatables-users_wrapper .dt-layout-row:first-child .dt-layout-cell:last-child,
.datatables-tickets_wrapper .dt-layout-row:first-child .dt-layout-cell:last-child,
.datatables-links_wrapper .dt-layout-row:first-child .dt-layout-cell:last-child {
    text-align: right !important;
}

/* Контейнер для наших кнопок */
.dt-action-buttons {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
}

/* Стандартизация высоты кнопок */
.dt-action-buttons .btn {
    min-height: 38px !important;
    display: inline-flex !important;
    align-items: center !important;
}

/* Статус точки */
.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.badge .status-dot {
    background-color: currentColor !important;
    opacity: 1;
}

.badge {
    text-transform: none !important;
    display: inline-flex;
    align-items: center;
}

/* Иконки в таблице */
.icon-base {
    font-size: inherit;
    vertical-align: middle;
}

.icon-16px {
    font-size: 16px;
}

.icon-20px {
    font-size: 20px;
}

.icon-24px {
    font-size: 24px;
}


/* RowGroup заголовок для групп доменов */
/* Стили заголовков групп как в демо Row Grouping */
table.table.dataTable > tbody > tr.dtrg-group > th,
table.table.dataTable > tbody > tr.dtrg-group > td {
    background-color: var(--bs-gray-100) !important;
    color: inherit !important;
}
tr.dtrg-group td,
tr.dtrg-group th {
    cursor: pointer;
}
tr.dtrg-group .group-toggle-icon {
    transition: transform .2s ease;
    display: inline-block;
}
tr.dtrg-group.collapsed .group-toggle-icon {
    transform: rotate(-90deg);
}

/* DataTables select background */
select[name*="_length"],
select[id*="dt-length"],
.dataTables_wrapper select.form-select {
    background-color: #30334e;
}