﻿.dashboard-grid {
    display: grid;
    gap: 1rem;
}

    /* Standard: 4 kort per rad */
    .dashboard-grid.four-column {
        grid-template-columns: repeat(4, 1fr);
    }

    /* Alternativer */
    .dashboard-grid.two-column {
        grid-template-columns: repeat(2, 1fr);
    }

    .dashboard-grid.three-column {
        grid-template-columns: repeat(3, 1fr);
    }

    .dashboard-grid.eight-column {
        grid-template-columns: repeat(8, 1fr);
    }
    .dashboard-grid.eight-column .dashboard-title {
        font-size: 0.7rem;
    }
    .dashboard-grid.eight-column .dashboard-value {
        font-size: 0.85rem;
        position: static;
        margin-top: 0;
    }
    .dashboard-grid.eight-column .dashboard-card {
        padding: 0.4rem 0.5rem;
    }

/* Kortstil */
.dashboard-card {
    background-color: var(--bs-card-bg);
    border: 1px solid rgba(0, 0, 0, 0.15);
    color: var(--bs-body-color);
    border-radius: 0.5rem;
    min-width: 0;
    width: 100%;
    height: 100%;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 0.25rem 0.4rem rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.3s ease, background-color 0.3s ease, transform 0.2s ease;
    overflow: hidden;
}

/* DARK MODE-tilpasning */
html[data-bs-theme='dark'] .dashboard-card {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0.25rem rgba(255, 255, 255, 0.1);
}

/* Hover-effekt */
.dashboard-card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

html[data-bs-theme='dark'] .dashboard-card:hover {
    box-shadow: 0 0 0.5rem rgba(255, 255, 255, 0.15);
}

/* Header */
.dashboard-card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    width: 100%;
}

/* Tittel */
.dashboard-title {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--bs-primary);
    opacity: 0.85;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

/* Verdi */
.dashboard-value {
    color: var(--bs-primary);
    position: relative;
    font-size: 1.6rem;
    font-weight: bold;
    text-align: center;
    margin-top: auto;
    margin-bottom: auto;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Sub-verdi */
.dashboard-subvalue {
    font-size: 0.75rem;
    color: var(--bs-secondary-color);
    text-align: center;
    margin-top: -0.3em;
}

/* Footer: event indicators at bottom of card */
.dashboard-footer {
    position: absolute;
    bottom: 6px;
    left: 0;
    right: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    justify-content: center;
    font-size: 0.6rem;
}

/* Action row: compact cards, fixed 6 columns */
.dashboard-actions {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.5rem;
}
.dashboard-actions .dashboard-card {
    padding: 0.4rem 0.5rem;
}
.dashboard-actions .dashboard-card-header {
    gap: 0;
}
.dashboard-actions .dashboard-title {
    font-size: 0.7rem;
}
.dashboard-actions .dashboard-value {
    font-size: 0.8rem;
    position: static;
    margin-top: 0;
}

/* Variant: Warning */
.dashboard-card-warning {
    border-left: 4px solid var(--bs-warning);
}

.dashboard-card-warning .dashboard-value {
    color: var(--bs-warning);
}

/* Variant: Danger */
.dashboard-card-danger {
    border-left: 4px solid var(--bs-danger);
}

.dashboard-card-danger .dashboard-value {
    color: var(--bs-danger);
}

/* Variant: Success */
.dashboard-card-success {
    border-left: 4px solid var(--bs-success);
}

.dashboard-card-success .dashboard-value {
    color: var(--bs-success);
}
