﻿.cards-section {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    grid-auto-rows: 1fr;
    gap: 0.75rem;
    width: 100%;
    margin-top: 20px;
}

.card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    text-align: center;
}

    /* Color modification for special usecases like placeholders. */
    .card.gray {
        background-color: #c0c0c0;
        color: black;
        cursor: not-allowed;
    }

    .card.ghost {
        display: grid;
        place-content: center;
        height: 100%;
        border: 5px dashed gray;
        background-color: rgba(255, 255, 255, 0.4);
        cursor: pointer;
    }

        .card.ghost .source-name {
            display: none;
        }

        .card.ghost h2 {
            font-size: 52pt;
            color: var(--muted-clr);
            margin: 20px;
        }

    .card.pickableCard {
        cursor: pointer;
    }

        .card.pickableCard:hover {
            background-color: #e0e0ff;
        }

    .card.non-pickable {
        opacity: 0.7;
        cursor: auto !important;
    }

        .card.non-pickable:hover {
            background-color: #c0c0c0;
        }

    /* Color modification for Error state. */
    .card.red {
        background-color: #f44336;
        color: white;
    }

        .card.red span.timestamp {
            color: white;
        }

    /* Color modification for Warning state. */
    .card.yellow {
        background-color: #ffeb3b;
        color: black;
    }

        .card.yellow span.timestamp,
        .card.gray span.timestamp {
            color: black;
        }

    .card h2 {
        font-size: 24px;
        margin: 10px 0;
    }

    .card p {
        font-size: 1rem;
        margin: 0;
    }

        .card span.timestamp {
            font-size: 0.75rem;
            color: #666;
            font-style: italic;
            line-height: 1.25;
        }

.card-nav-btn {
    position: absolute;
    right: 0;
    bottom: 0;
    background: transparent;
    border: none;
}

/* The NoData status message and the loading ring animation is showcased on FluentUI.Overlay */
.fluent-overlay {
    border-radius: 8px;
    z-index: 0 !important;
}

.switch-on-card {
    margin: 3px;
    padding: 0px;
    text-align: right;
}

/* Ghost element while dragging */
.sortable-ghost {
    opacity: 0.4;
    background-color: #f0f0f0;
}

.inColumn {
    grid-template-columns: none !important;
}

.cards-section .card {
    padding: 0.25rem;
}

.card > div {
    height: 100%;
    display: grid;
}

.card > div > div {
    display: grid;
    align-items: end;
}

p.source-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.5;
}

/* Edit part of the sections */
.editBtn_closed {
    color: blue;
    display: inline-flex;
}

.editBtn_opened {
    display: none;
}

.editDiv_closed {
    display: none;
}

.editDiv_opened {
    display: block;
}

.chartbuttons {
    float: right;
    top: 4px;
    right: 4px;
    position: absolute;
    display: block;
}

.marked-for-deletion {
    opacity: 0.3;
    pointer-events: none;
}

/* Chart card */
.value-card {
    display: flex;
    justify-content: space-around;
    gap: 1rem;
    padding: 0.5rem;
    margin-top: 0.5rem;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    background: #f3f3f3;
}

.value-card .value-container {
    display: grid;
    gap: 0.25rem;
}

.value-container label {
    font-weight: 500;
}

.value-container .value {
    font-size: 1.125rem;
}

@media (max-width: 480px) {
    .value-card {
        flex-direction: column;
    }
}

.cameras-wrapper {
    display: grid;
    column-gap: 1rem;
    row-gap: 2rem;
}

@media(min-width: 1200px) {
    .cameras-wrapper {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}