﻿.quickgrid[theme=portal] {
    --col-gap: .25rem;
}

    .quickgrid[theme=portal] .col-header-content {
        padding-right: var(--col-gap);
    }

    .quickgrid[theme=portal] > thead > tr > th {
        font-weight: normal;
    }

    .quickgrid[theme=portal].loading > tbody {
        opacity: 0.25;
        transition: opacity linear 100ms;
        transition-delay: 25ms; /* Don't want flicker if the queries are resolving almost immediately */
    }

    .quickgrid[theme=portal] .col-title {
        padding: 0.1rem 0.4rem;
    }

    .quickgrid[theme=portal] > tbody > tr > td {
        padding: 0.1rem calc(0.4rem + var(--col-gap)) 0.1rem 0.4rem;
    }

    .quickgrid[theme=portal] .col-title {
        gap: 0.4rem; /* Separate the sort indicator from title text */
        font-weight: bold;
    }

    .quickgrid[theme=portal] .sort-indicator {
        opacity: 0.5;
    }

    .quickgrid[theme=portal] .col-options-button {
        width: 1.5rem;
        background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="1.5 0 21 24" stroke="%23FFF" stroke-width="2"><path d="M4 6h16M4 12h16M4 18h16" /></svg>') center center / 1rem no-repeat !important;
    }

        .quickgrid[theme=portal] button.col-title:hover, .quickgrid[theme=portal] .col-options-button:hover {
            background-color: rgba(128, 128, 128, 0.2);
        }

        .quickgrid[theme=portal] button.col-title:active, .quickgrid[theme=portal] .col-options-button:active {
            background-color: rgba(128, 128, 128, 0.5);
        }

    .quickgrid[theme=portal] > thead .col-width-draghandle {
        width: 1rem;
        right: calc(var(--col-gap)/2 - 0.5rem);
    }

        .quickgrid[theme=portal] > thead .col-width-draghandle:hover {
            background: rgba(128, 128, 128, 0.2);
        }

        .quickgrid[theme=portal] > thead .col-width-draghandle:active {
            background: rgba(128, 128, 128, 0.4);
        }

            .quickgrid[theme=portal] > thead .col-width-draghandle:hover:after, .quickgrid[theme=portal] > thead .col-width-draghandle:active:after {
                border-color: black;
            }

        .quickgrid[theme=portal] > thead .col-width-draghandle:after {
            border-color: #ccc;
            left: 0.5rem;
            top: 5px;
            bottom: 5px;
        }

    .quickgrid[theme=portal] .col-options {
        box-shadow: 0 3px 8px 1px rgb(11 21 35);
        border-color: rgb(21 31 45);
        border-radius: 0.3rem;
        background-color: rgb(31 41 55);
    }
        .quickgrid[theme=portal] .col-options input {
            width:unset;
        }

        .quickgrid[theme=portal] > tbody > tr > td.grid-cell-placeholder:after {
            content: '\2026';
            opacity: 0.75;
        }


.go-next,.go-previous {
    background-image: url('data:image/svg+xml;utf8,<svg fill="%23FFF" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g transform="rotate(90)" transform-origin="12 12"><path d="M 2 3.25 L 12 20.75 L 22 3.25 L 12 11 z" /></g></svg>') !important;
}

.go-first,.go-last {
    background-image: url('data:image/svg+xml;utf8,<svg fill="%23FFF" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g transform="rotate(90) scale(0.8)" transform-origin="12 12"><path d="m 2,1.5 l 10,17.5 l 10,-17.5 l -10,7.75 l -10,-7.75 z"/><rect height="2" width="20" y="20.5" x="2"/></g></svg>') !important;
}


.col-sort-desc .sort-indicator, .col-sort-asc .sort-indicator {
    background-image: url('data:image/svg+xml;utf8,<svg fill="%23FFF" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M 2 3.25 L 12 20.75 L 22 3.25 L 12 10 z" /></svg>') !important;
}

table {
    border-spacing:0;
}
table td, table th {
    border-width:1px;
    border-color: rgb(75 85 99);
    border-style: solid;
    border-collapse: collapse;
    border-top-width:0;
}

    table > tbody > tr:first-child td,
    table > thead > tr:first-child th {
        border-top-width: 1px;
    }

table th:first-child {
    border-top-left-radius: 0.5rem;
    border-left-width: 1px;
    border-top-width: 1px;
    
}
table th:last-child {
    border-color: rgb(75 85 99);
    border-top-right-radius: 0.5rem;
    border-right-width: 1px;
    border-top-width: 1px;
}

    table td.highlight {
        color: #fff;
        font-weight:bold;
    }