﻿.overview {
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: 100%;
    /*grid-template-rows: max-content 50px 40px 1fr;
    grid-template-areas: "toolbar"
                        "overviewtitle"
                        "overviewheader"
                        "overviewcontent";*/
    grid-template-rows: max-content 50px 1fr;
    grid-template-areas: "toolbar"
                        "overviewtitle"
                        "overviewcontent";
}

@media (min-width: 1024px) {
    .overview {
        grid-template-rows: max-content 50px 40px 1fr;
        grid-template-areas: "toolbar"
                            "overviewtitle"
                            "overviewheader"
                            "overviewcontent";
    }
}

.overview.use-cards {
}

@media (min-width: 1024px) {
    .overview.use-cards {
        grid-template-rows: max-content 50px 1fr;
        grid-template-areas: "toolbar"
                            "overviewtitle"
                            "overviewcontent";
    }
}

overview.sidepanel-visible {
    /* OLIFANT: figure out what sidepanels should look like on mobile devices */
}

@media (min-width: 1024px) {
    .overview.sidepanel-visible {
        grid-template-columns: calc(100% - 310px) 300px;
        grid-template-areas: "toolbar sidepanel"
                            "overviewtitle sidepanel"
                            "overviewheader sidepanel"
                            "overviewcontent sidepanel";
        gap: 0 10px;
    }
}

.overview-toolbar {
    grid-area: toolbar;
}

.overview-title {
    grid-area: overviewtitle;
    font-weight: bold;
    font-size: 20px;
    padding: 0 20px;
    display: flex;
    flex-flow: row nowrap;
    align-content: center;
    align-items: center;
    border-width: 0 1px 0 1px;
    border-style: solid;
    border-color: #cccccc;
}

.overview.use-cards .overview-title {
    border-width: 0 1px 1px 1px;
}

.overview-content {
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    border-width: 0 1px 1px 1px;
    border-style: solid;
    border-color: #cccccc;
    border-radius: 0 0 10px 10px;
    overflow-y: auto;
}

.overview.use-cards .overview-content {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(var(--card-width, var(--default-card-width)), 1fr));
    grid-auto-rows: max-content;
    gap: 20px;
    padding: 10px;
}

.overview-item,
.overview-item.overview-header {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 180px 180px 80px;
    grid-template-rows: 100%;
    align-content: center;
    align-items: center;
    gap: 20px;
    padding: 0 20px;
    font-size: 14px;
}

.overview-item.overview-header {
    display: none;
}

@media (min-width: 1024px) {
    .overview-item,
    .overview-item.overview-header {
        width: 100%;
        display: grid;
        /*grid-template-columns: 1fr 180px 180px 80px;*/
        /*grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) 80px;*/
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        grid-template-rows: 100%;
        align-content: center;
        align-items: center;
        gap: 20px;
        padding: 0 20px;
        font-size: 14px;
    }

    .overview.has-item-actions .overview-item,
    .overview.has-item-actions .overview-item.overview-header {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) 80px;
    }

    .overview.use-cards .overview-item.overview-header {
        display: none;
    }
}

.overview-item.overview-header {
    height: 100%;
    border: 1px solid #cccccc;
    font-weight: bold;
}

.overview-item {
    height: 30px;
    position: relative;
}

.overview-item:hover,
.overview-item.selected {
    background-color: #efefef;
}
/*
.overview-item.filtered {
    display: none;
}*/

.overview-item-cell {
    width: 100%;
    height: 100%;
    display: flex;
    flex-flow: row nowrap;
    align-content: center;
    align-items: center;
    gap: 5px;
}

.overview label.cell-label {
    font-weight: bold;
}

@media (min-width: 1024px) {
    .overview:not(.use-cards) label.cell-label {
        display: none;
    }
}


.overview-item-cell svg {
    width: 16px;
    height: 16px;
}

.overview-item-button {
    border: 0;
    padding: 3px 5px;
    width: auto;
    height: auto;
    min-width: 20px;
    min-height: 20px;
    cursor: pointer;
    display: flex;
    flex-flow: row nowrap;
    justify-content: center;
    align-content: center;
    align-items: center;
    gap: 3px;
    border-radius: var(--button-border-radius);
    background-color: var(--button-background-color);
    color: var(--button-text-color);
}

.overview-item-button svg {
    width: 18px;
    height: 18px;
}

.overview-item-button svg path {
    fill: var(--button-text-color);
}
