/* ====== GLOBALT ====== */
body {
    background: #fafafa;
    font-family: system-ui, sans-serif;
}

/* ====== FOOTER ====== */
footer {
    flex-shrink: 0;
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
    text-align: center;
    color: #6c757d;
    font-size: 0.9rem;
}

    footer a {
        color: #0d6efd;
        text-decoration: none;
    }

        footer a:hover {
            text-decoration: underline;
        }

/* ====== BILLEDER & GALLERI ====== */
.card {
    border-radius: 1rem;
}

.mb-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: .75rem;
}

.mb-item {
    position: relative;
    border-radius: .75rem;
    overflow: hidden;
    background: #e9ecef;
    aspect-ratio: 1 / 1;
}

    .mb-item > img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    .mb-item > .mb-open {
        position: absolute;
        inset: 0;
        background: transparent;
        border: 0;
        cursor: zoom-in;
        z-index: 1;
    }

.mb-item-overlay {
    position: absolute;
    left: .5rem;
    right: .5rem;
    bottom: .5rem;
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .4rem .6rem;
    border-radius: .5rem;
    background: rgba(0,0,0,.55);
    color: #fff;
    opacity: 0;
    transition: opacity .15s ease;
    z-index: 2;
    pointer-events: auto;
}

.mb-item:hover .mb-item-overlay {
    opacity: 1;
}

.mb-filename {
    font-size: .85rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1 1 auto;
}

.mb-download {
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    border-radius: .4rem;
    background: rgba(255,255,255,.9);
    display: inline-block;
    text-decoration: none;
    position: relative;
}

    .mb-download::before, .mb-lightbox-dl::before {
        content: "";
        position: absolute;
        inset: 7px;
        border-left: 2px solid #333;
        border-bottom: 2px solid #333;
        transform: rotate(-45deg);
    }

    .mb-download::after, .mb-lightbox-dl::after {
        content: "";
        position: absolute;
        left: 50%;
        top: 4px;
        width: 2px;
        height: 14px;
        background: #333;
        transform: translateX(-50%);
    }

/* ====== LIGHTBOX ====== */
.mb-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.9);
    display: grid;
    grid-template-columns: 64px 1fr 64px;
    grid-template-rows: 52px 1fr;
    align-items: center;
    justify-items: center;
    z-index: 1000;
}

    .mb-lightbox[hidden] {
        display: none;
    }

.mb-lightbox-toolbar {
    grid-column: 1 / -1;
    align-self: start;
    width: 100%;
    height: 52px;
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .5rem .75rem;
    color: #fff;
}

.mb-lightbox-name {
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    opacity: .9;
}

.mb-lightbox-dl {
    position: relative;
    width: 36px;
    height: 36px;
    margin-right: .25rem;
    background: #fff;
    border-radius: .4rem;
}

.mb-btn {
    background: rgba(255,255,255,.15);
    color: #fff;
    border: 0;
    width: 40px;
    height: 40px;
    border-radius: .5rem;
    cursor: pointer
}

#mb-lightbox-img {
    grid-column: 2;
    grid-row: 2;
    max-width: 100%;
    max-height: calc(100vh - 52px - 2rem);
    width: auto; /* lad billedet skaleres proportionalt */
    height: auto;
    object-fit: contain;
    display: block;
}

/* Lidt small-screen love */
@media (max-width: 576px) {
    .mb-lightbox {
        grid-template-columns: 24px 1fr 24px;
    }
}
 
/* Afrundede hjørner nederst på tabellen */
.table.rounded-bottom

{
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 0 0 12px 12px;
    overflow: hidden;
}

.table.rounded-bottom thead th:first-child {
    border-top-left-radius: 12px;
}

.table.rounded-bottom thead th:last-child {
    border-top-right-radius: 12px;
}

/* Klikbar tabelrække */
.clickable-row,
.clickable-row td,
.clickable-row th {
    cursor: pointer;
}