.ag-root-wrapper,
.ag-theme-alpine {
    --ag-font-size: 12px;
}

/*processing-activity-grid-empty: body collapses naturally in autoHeight — sibling panel handles empty state */
.ag-center-cols-container, .ag-center-cols-viewport {
    min-height: auto !important;
}
.ag-layout-normal.ag-root-wrapper-body,
.ag-layout-normal {
    height: 100% !important;
    min-height: 100%;
}

/* When grid has no rows: hide the horizontal scrollbar strip and collapse body area
   so the sibling empty-state panel connects flush to the column headers */
.pcl-grid-empty .ag-body-horizontal-scroll,
.pcl-grid-empty .ag-body-horizontal-scroll-viewport,
.pcl-grid-empty .ag-body-horizontal-scroll-container,
.pcl-grid-empty .ag-body-viewport,
.pcl-grid-empty .ag-center-cols-clipper,
.pcl-grid-empty .ag-center-cols-viewport,
.pcl-grid-empty .ag-center-cols-container {
    height: 0 !important;
    min-height: 0 !important;
    overflow: hidden !important;
}
.pcl-grid-empty .ag-root-wrapper-body {
    min-height: 0 !important;
}
.pcl-grid-empty .ag-paging-panel {
    display: none !important;
}
.centered-table-header .ag-header-cell-label {
    justify-content: center;
}
.ag-header-cell-resize::after {
    background-color: var(--gray-6);
}
.ag-header-cell {
    background: var(--pcl-table-header-bg);
    color: var(--pcl-text);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.ag-row:nth-child(even) .ag-cell {
    background: var(--pcl-table-stripe);
}

.ag-root-wrapper {
    border-radius: var(--pcl-radius-control);
    overflow: hidden;
    border: 1px solid var(--pcl-surface-border);
}

/* Grid count badges (linked entities, assessments, respondents, etc.) */
.grid-count-pill-badge {
    border-radius: 35% !important;
}
.table-cell-pill {
    display: inline-flex;
}
.table-cell-pill p {
    margin-bottom: 0px;
}

.table-cell-pill i {
    line-height: 1.1;
}
.table-cell-pill p, .table-cell-pill i {
    font-size: 12px;
}
.grid-search-box, .grid-search-box:focus {
    border: 0px;
    box-shadow: var(--box-shadow);
}
.centered-table-cell {
    text-align: center;
}
.grid-cell-line-height-auto {
    line-height: normal;
}
.grid-cell-y-center {
    top: 50%;
    bottom: 0;
}
.dropstart .data-grid-dropdown-toggle::before {
    display: none;
}
.data-grid-dropdown-menu {
    border: 1px solid #cccccc;
    overflow:hidden;
}
.data-grid-dropdown-menu li {
    line-height: normal;
}
    .data-grid-dropdown-menu li:not(:first-child) {
        border-top: 1px solid #f4f4f4;
    }
.grid-cell-overflow-visible {
    overflow: visible;
}
.ag-cell:focus, .ag-cell:focus-within {
    border-color: transparent !important;
}
.dropdown-item-with-icon {
    display: flex;
    align-items: center;
}
.data-grid-dropdown-menu li a, .data-grid-dropdown-menu li i {
    font-weight: 400;
    letter-spacing: 0.1px;
}
.data-grid-dropdown-menu li i {
    margin-right: 2px;
}
.data-grid-dropdown-menu .dropdown-item-with-icon {
    cursor: pointer;
}
.dropdown-item-with-icon:hover {
    background: rgb(var(--meant-foam-rgb)) !important;
}
.dropdown-item-with-icon:hover a, .dropdown-item-with-icon:hover i {
    color: var(--custom-white);
}

/* Processing Activity search clear icon */
.search-clear-btn {
    border: 0;
    background: transparent;
}

.search-clear-btn:hover,
.search-clear-btn:focus {
    color: rgb(var(--primary-rgb));
    background: transparent;
    box-shadow: none;
}
.ag-row-odd.ag-row-not-inline-editing.ag-row.ag-row-focus {
    z-index: 1;
}
.ag-row-even.ag-row-not-inline-editing.ag-row.ag-row-focus {
    z-index: 1;
}
.status-badge {
    font-size:13px;
    line-height:normal;
    letter-spacing:0.2px;
    min-width:90px;
    font-weight:300;
    padding:0.1rem 1rem;
}
.data-grid-dropdown-toggle:focus, .data-grid-dropdown-toggle:focus-visible, .data-grid-dropdown-toggle:active {
    box-shadow: none !important;
}
.data-grid-dropdown-toggle {
    line-height: 12px;
    padding: 0.4rem 0.55rem !important;
}
.data-grid-dropdown-toggle-icon {
    line-height: normal;
}
.grid-action-cell {
    display: grid;
    margin: auto;
    line-height: normal;
    align-items: center;
}
.grid-badge {
    font-weight: 400;
    letter-spacing: 0.5px;
    font-size: 12px;
}
.grid-avatar-badge {
    color: white;
    padding: 4px 6px;
}
.avatar-popover .popover-header {
    background: rgb(var(--primary-rgb));
    color: white;
}

.avatar-popover .popover-body {
    background: rgb(var(--primary-rgb));
    color: white;
}

.avatar-popover {
    border: 0px;
    box-shadow: 0px 0px 0.7px 0.7px rgb(255 255 255 / 30%);
}
.avatar-popover .popover-body {
    border-radius: 0px 0px 6px 6px;
}
.avatar-popover.bs-popover-auto[data-popper-placement^=left] > .popover-arrow::after, .avatar-popover.bs-popover-left > .popover-arrow::before {
    border-left-color: rgb(var(--primary-rgb)) !important;
}
.avatar-popover.bs-popover-auto[data-popper-placement^=top] > .popover-arrow::after, .avatar-popover.bs-popover-top > .popover-arrow::before {
    border-top-color: rgb(var(--primary-rgb)) !important;
}

/*Primary Popover*/
.primary-popover .popover-header {
    background: rgb(var(--primary-rgb));
    color: white;
}
.primary-popover .popover-body {
    background: rgb(var(--primary-rgb));
    color: white;
}
.primary-popover {
    border: 0px;
    box-shadow: 0px 0px 0.7px 0.7px rgb(255 255 255 / 30%);
}
.primary-popover .popover-body {
    border-radius: 0px 0px 6px 6px;
}
.primary-popover.bs-popover-auto[data-popper-placement^=left] > .popover-arrow::after, .avatar-popover.bs-popover-left > .popover-arrow::before {
    border-left-color: rgb(var(--primary-rgb)) !important;
}
.primary-popover.bs-popover-auto[data-popper-placement^=top] > .popover-arrow::after, .avatar-popover.bs-popover-top > .popover-arrow::before {
    border-top-color: rgb(var(--primary-rgb)) !important;
}
/* Platform popovers — see platform-ui.css (.pcl-popover) */
/*
#processingActivityGrid .ag-root-wrapper-body, #processingActivityGrid .ag-layout-normal {
    height: auto !important;
    min-height: 0 !important;
}*/
.primary-popover {
    --bs-popover-max-width: 100%;
}
/*Search Box clear selection*/
.search-text-clear-icon {
    position: absolute;
    right: 0.2rem;
    top: 20%;
    bottom: 0;
    display: flex;
    align-items: center;
    font-size: 1.4rem;
    height: max-content;
    cursor: pointer;
}
.search-text-clear-icon::before {
    line-height: normal;
}
.search-text-wrapper {
    position: relative;
}
button[data-ref="applyFilterButton"].ag-filter-apply-panel-button {
    color: var(--custom-white) !important;
    background-color: var(--cobalt-depth) !important;
    padding: 0.5rem 0.85rem;
    border-radius: 0.35rem;
}
button[data-ref="resetFilterButton"].ag-filter-apply-panel-button {
    color: var(--custom-white) !important;
    background-color: var(--danger-color) !important;
    padding: 0.5rem 0.85rem;
    border-radius: 0.35rem;
}
/* agGridSetFilter (custom checkbox set filter, Community-compatible) */
.ag-grid-set-filter-root {
    min-width: 220px;
    display: flex;
    flex-direction: column;
}
.ag-grid-set-filter-root .ag-set-filter {
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.ag-grid-set-filter-root .ag-grid-set-filter-list {
    max-height: 260px;
    overflow-y: auto;
    padding: 2px 0;
}
.ag-grid-set-filter-root .ag-grid-set-filter-row {
    display: flex;
    align-items: center;
    padding: 4px 6px;
    cursor: pointer;
    user-select: none;
}
.ag-grid-set-filter-root .ag-grid-set-filter-row:hover {
    background-color: var(--gray-2, rgba(0, 0, 0, 0.04));
}
.ag-grid-set-filter-root .ag-grid-set-filter-row .ag-set-filter-item,
.ag-grid-set-filter-root .ag-grid-set-filter-row .ag-set-filter-item-checkbox {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 6px;
}
.ag-grid-set-filter-root .ag-grid-set-filter-row .ag-checkbox-label {
    margin: 0;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ag-grid-set-filter-root .ag-grid-set-filter-no-matches {
    padding: 8px 6px;
    color: var(--gray-7, #6c757d);
    font-size: 0.875rem;
}
.ag-grid-set-filter-root .ag-grid-set-filter-apply-panel {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    padding: 6px;
    border-top: 1px solid var(--gray-3, #e5e7eb);
}
.ag-grid-set-filter-root .ag-grid-set-filter-search-input {
    width: 100%;
}
.ag-virtual-list-item {
    position: initial !important;
}