﻿/* _content/Microsoft.AspNetCore.Components.QuickGrid/Columns/ColumnBase.razor.rz.scp.css */
/* Contains the title text and sort indicator, and expands to fill as much of the col width as it can */
.basicGrid .col-title {
    display: flex; /* So that we can make col-title-text expand as much as possible, and still hide overflow with ellipsis */
    min-width: 0px;
    flex-grow: 1;
    padding: 0;
}

/* If the column is sortable, its title is rendered as a button element for accessibility and to support navigation by tab */
.basicGrid button.col-title {
    border: none;
    background: none;
    position: relative;
    cursor: pointer;
}

.basicGrid .col-justify-center .col-title {
    justify-content: center;
}

.basicGrid .col-justify-end .col-title {
    flex-direction: row-reverse; /* For end-justified cols, the sort indicator should appear before the title text */
}

/* We put the column title text in its own element primarily so that it can use text-overflow: ellipsis */
.basicGrid .col-title-text {
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    font-family: var(--titleFont);
    color: var(--gray);
    font-size: var(--smallFont);
    letter-spacing: calc(1px / 2);
    text-transform: uppercase;
    opacity: 1;
    font-weight: var(--regularWeight);
    padding: var(--listSpace);
}
/* _content/Microsoft.AspNetCore.Components.QuickGrid/Pagination/Paginator.razor.rz.scp.css */
.basicGrid .paginator {
    display: flex;
    border-top: unset;
    margin-top: unset;
    padding: var(--listSpace);
    align-items: flex-end;
}

.basicGrid .pagination-text {
    margin: 0 0.5rem;
}

.basicGrid nav {
    display: flex;
    margin-left: auto;
    gap: 0.5rem;
    align-items: center;
    flex-direction: row;
}

    .basicGrid nav button {
        border: 0;
        background: none center center / 1rem no-repeat;
        width: 10px;
        height: 10px;
        margin: 0;
        padding: 0px 10px;
    }

    .basicGrid nav button[disabled] {
        opacity: 0.4;
        pointer-events: none;
    }

.basicGrid nav button:not([disabled]):hover {
    background-color: transparent;
}

.basicGrid nav button:not([disabled]):active {
    background-color: transparent;
}

/*.basicGrid .go-first, .basicGrid .go-last {
    background-image: url('data:image/svg+xml;utf8,<svg 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>');
}*/

.basicGrid .go-first, .basicGrid .go-last {
    background: url(../svg/doubleArrowLeft.svg);
    background-size: contain;
    background-repeat: no-repeat;
    width: 10px;
    height: 10px;
}

.basicGrid .go-previous, .basicGrid .go-next {
    background: url(../svg/arrowLeft.svg);
    background-size: contain;
    background-repeat: no-repeat;
    width: 10px;
    height: 10px;
}





.basicGrid .go-next, .basicGrid .go-last {
    transform: scaleX(-1);
}
/* _content/Microsoft.AspNetCore.Components.QuickGrid/QuickGrid.razor.rz.scp.css */
/*
    TODO: Don't actually used scoped CSS for QuickGrid.razor, because it's so perf-critical we don't even want to
    add the extra attributes on all the tr/td elements. We can hook everything onto the table.quickgrid class,
    remembering to be specific about matching closest tr/td only, not any child tables.
*/

.basicGrid th {
    position: relative; /* So that col-options appears next to it */
}

.basicGrid .col-header-content {
    /* We want the th elements to be display:flex, but they also have to be display:table-cell to avoid breaking the layout.
       So .col-header-content is an immediate child with display:flex. */
    position: relative;
    display: flex;
    align-items: flex-start;
}

/* Deep to make it easy for people adding a sort-indicator element in a custom HeaderTemplate */
.basicGrid th .sort-indicator {
    /* Preset width so the column width doen't change as the sort indicator appears/disappears */
    width: 1rem;
    height: 1rem;
    align-self: center;
    text-align: center;
}

.basicGrid .col-sort-desc .sort-indicator, ..basicGrid col-sort-asc .sort-indicator {
    /*background-image: url('data:image/svg+xml;utf8,<svg 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>');*/
    background: url(../svg/doubleArrowDown.svg);
}

.basicGrid .col-sort-asc .sort-indicator {
    transform: scaleY(-1);
}

/* Deep to make it easy for people adding a col-options-button element in a custom HeaderTemplate */
.basicGrid th .col-options-button {
    border: none;
    padding: 0; /* So that even if the text on the button is wide, it gets properly centered */
    width: 1rem;
    align-self: stretch;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="1.5 0 21 24" stroke="currentColor" stroke-width="2"><path d="M4 6h16M4 12h16M4 18h16" /></svg>') center center / 1rem no-repeat;
}

.basicGrid .col-options {
    position: absolute;
    background: white;
    border: 1px solid silver;
    left: 0;
    padding: 1rem;
    z-index: 1;
}

.basicGrid .col-justify-end .col-options {
    left: unset;
    right: 0;
}

.basicGrid .col-width-draghandle {
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0rem;
    cursor: ew-resize;
}

    .basicGrid .col-width-draghandle:after {
        content: ' ';
        position: absolute;
        top: 0;
        bottom: 0;
        border-left: 1px solid black;
    }

.basicGrid td.col-justify-center {
    text-align: center;
}

.basicGrid td.col-justify-end {
    text-align: right;
}

/* Unfortunately we can't use the :dir pseudoselector due to lack of browser support. Instead we have to rely on
    the developer setting <html dir="rtl"> to detect if we're in RTL mode. */
html[dir=rtl] .basicGrid td.col-justify-end {
    text-align: left;
}

html[dir=rtl] .basicGrid .col-options {
    left: unset;
    right: 0;
}

html[dir=rtl] .basicGrid .col-justify-end .col-options {
    right: unset;
    left: 0;
}
/* _content/Microsoft.AspNetCore.Components.QuickGrid/Themes/Default.css */
.basicGrid .quickgrid[theme=default] {
    --col-gap: 1rem;
    border-top-left-radius: var(--smallRadius);
    border-top-right-radius: var(--smallRadius);
    overflow: hidden;
}

    .basicGrid .quickgrid[theme=default] .col-header-content {
        padding-right: unset;
    }

    .basicGrid .quickgrid[theme=default] > thead > tr > th {
        font-weight: normal;
    }

    .basicGrid .quickgrid[theme=default].loading > tbody {
        opacity: 0.25;
        transition: opacity linear 100ms;
        transition-delay: 25ms; /* Don't want flicker if the queries are resolving almost immediately */
    }

    .basicGrid .quickgrid[theme=default] .col-title {
        padding: unset;
    }

    .basicGrid .quickgrid[theme=default] > tbody > tr > td {
        padding: var(--listSpace);
        line-height: 24px;
        vertical-align: bottom;
    }

    @media screen and (max-width: 768px) {
        .basicGrid .quickgrid[theme=default] > tbody > tr > td {
            line-height: unset;
            font-size: 14px;
        }
    }

    .basicGrid .quickgrid[theme=default] .col-title {
        gap: 0.4rem; /* Separate the sort indicator from title text */
        font-weight: bold;
    }

    .basicGrid .quickgrid[theme=default] .sort-indicator {
        opacity: 0.5;
    }

    .basicGrid .quickgrid[theme=default] .col-options-button {
        width: 1.5rem;
        
    }

    .basicGrid .quickgrid[theme=default] button.col-title:hover, .quickgrid[theme=default] .col-options-button:hover {
        background-color: rgba(128, 128, 128, 0.2);
    }

    .basicGrid .quickgrid[theme=default] button.col-title:active, .quickgrid[theme=default] .col-options-button:active {
        background-color: rgba(128, 128, 128, 0.5);
    }

    .basicGrid .quickgrid[theme=default] > thead .col-width-draghandle {
        width: 1rem;
        right: calc(var(--col-gap)/2 - 0.5rem);
    }

        .basicGrid .quickgrid[theme=default] > thead .col-width-draghandle:hover {
            background: rgba(128, 128, 128, 0.2);
        }

        .basicGrid .quickgrid[theme=default] > thead .col-width-draghandle:active {
            background: rgba(128, 128, 128, 0.4);
        }

            .basicGrid .quickgrid[theme=default] > thead .col-width-draghandle:hover:after, .basicGrid .quickgrid[theme=default] > thead .col-width-draghandle:active:after {
                border-color: black;
            }

        .basicGrid .quickgrid[theme=default] > thead .col-width-draghandle:after {
            border-color: #ccc;
            left: 0.5rem;
            top: 5px;
            bottom: 5px;
        }

    .basicGrid .quickgrid[theme=default] .col-options {
        box-shadow: 0 3px 8px 1px #aaa;
        border-color: #ddd;
        border-radius: 0.3rem;
    }

    .basicGrid .quickgrid[theme=default] > tbody > tr > td.grid-cell-placeholder:after {
        content: '\2026';
        opacity: 0.75;
    }



/* unique ones */
thead tr {
    background-color: var(--lightGray);
    border-bottom: 1px solid #e6e6e6;
}

.basicGrid {
    overflow: auto;
    display: flex;
    flex-direction: column;
    padding-bottom: var(--smallSpace);
}

    .basicGrid .summary {
        flex-direction: row;
        gap: var(--smallSpace);
    }

    .basicGrid .pagination-text {
        margin: 0;
        flex-direction: row;
        gap: var(--smallSpace);
    }

tr:nth-of-type(even) {
    background-color: #fbfbfb;
}