﻿
.quickgrid[theme=QuickGrid-Theme] .col-options-button {
    width: 1.5rem;
}

    .quickgrid[theme=QuickGrid-Theme] button.col-title:hover, .quickgrid[theme=QuickGrid-Theme] .col-options-button:hover {
        background-color: rgba(128, 128, 128, 0.2);
    }

    .quickgrid[theme=QuickGrid-Theme] button.col-title:active, .quickgrid[theme=QuickGrid-Theme] .col-options-button:active {
        background-color: rgba(128, 128, 128, 0.5);
    }

.quickgrid[theme=QuickGrid-Theme] .col-options {
    box-shadow: 0 3px 8px 1px #aaa;
    border-color: #ddd;
    border-radius: 0.3rem;
}

.quickgrid[theme=QuickGrid-Theme] .col-options-button {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-search" viewBox="0 0 16 16"> <path d="M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0"/> </svg>');
}
.quickgrid[theme=QuickGrid-Theme] .sort-indicator {
    background-image: url('data:image/svg+xml;utf8,<svg class="w-6 h-6" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd"></path></svg>');
}
.quickgrid thead tr th:first-child {
    padding-left: 5px;
}

.quickgrid tbody tr td:first-child {
    padding-left: 5px;
}
.no-firstchild-padding-grid thead tr th:first-child {
    padding-left: 0 !important;
}

/* Quick Grid */
.grid .quickgrid {
    font-weight: 400;
    font-size: 0.9rem;
    line-height: 2rem;
    text-align: left;
    --tw-text-opacity: 1;    
}

    .grid .quickgrid[theme=QuickGrid-Theme] .col-title {
        font-weight: bold;
    }

.grid :is(.dark .quickgrid) {
    --tw-text-opacity: 1;
}

.grid table {
    min-width: 100%;
    width: 100%;
}

.grid thead {
    position: sticky;
    top: 0;
    background-color: #BCBCBC;
    font-size: 14px;
    font-weight: bold;
    z-index: 10;
}

.grid tr {
    --tw-border-opacity: 1;
    border-color: rgb(229 231 235 / var(--tw-border-opacity));
}

.grid tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.4);
    background-color: #F2F2F2;
}
/*check if all tds under a tr are empty - when no results, pagination adds extra rows*/
.grid tr:nth-child(even):where(:not(:has(td:not(:empty)))) td:empty {
    background-color: white;
}

.grid :is(.dark tr) {
    --tw-border-opacity: 1;
    border-color: rgb(55 65 81 / var(--tw-border-opacity));
}

.grid :is(.dark thead) {
    background-color: rgb(55 65 81 / var(--tw-bg-opacity));
    color: rgb(255 255 255 / var(--tw-text-opacity));
}

.grid :is(.dark .quickgrid[theme=QuickGrid-Theme] .col-options) {
    background-color: rgb(55 65 81 / var(--tw-bg-opacity));
    color: rgb(255 255 255 / var(--tw-text-opacity));
}

.grid :is(.dark .quickgrid[theme=QuickGrid-Theme] input) {
    background-color: rgb(55 65 81 / var(--tw-bg-opacity));
}

/* Hot Row Tracking */
.quickgrid tbody tr:hover {
    background-color: #FFDBBB !important; /* Light orange highlight */
    cursor: pointer;
    transition: background-color 0.2s ease;
}
.quickgrid tbody tr .highlight {
    background-color: #FFCC66 !important;
}

.col-header-content {
    flex-direction: column;
    align-items: flex-start !important; /* Aligns items to the left */
}

/* Column widths for AI KBU grid */
.ai-kbu-grid .quickgrid .category-col {
    width: 10%;
}

.ai-kbu-grid .quickgrid .question-col {
    width: 30%;
}

.ai-kbu-grid .quickgrid .edit-col,
.ai-kbu-grid .quickgrid .delete-col,
.admin-grid .quickgrid .edit-col {
    width: 3%;
}