﻿.page-title {
    margin-bottom: .25rem;
}

.page-lead {
    margin-bottom: 1rem;
    color: #6b7280;
}


/* Rutenett med faste kolonner per breakpoint */
.employee-grid {
    display: grid !important;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr)); /* mobil */
}

@media (min-width: 640px) {
    .employee-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 768px) {
    .employee-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .employee-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}
/* 5 pr rad */
@media (min-width: 1280px) {
    .employee-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

@media (min-width: 1600px) {
    .employee-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}


.employee-card {
    min-width: 0;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #fff;
    user-select: none;
}

    .employee-card:hover {
        box-shadow: 0 4px 20px rgba(0,0,0,.06);
    }


.thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 1/1;
    border-radius: 12px;
    overflow: hidden;
    background: #f3f4f6;
    display: grid;
    place-items: center;
}

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

    .thumb.fallback {
        background: #eef2ff;
        color: #3730a3;
    }

.fallback-avatar {
    display: none;
    font-size: 28px;
    font-weight: 700;
}

.thumb.fallback .fallback-avatar {
    display: block;
}


.meta {
    line-height: 1.2;
}

.name {
    font-size: .95rem;
    font-weight: 600;
}

.title {
    font-size: .8rem;
    color: #6b7280;
}


/* Valg-variant */
.employee-card--select {
    cursor: pointer;
}

    .employee-card--select .checkmark {
        position: absolute;
        top: 8px;
        right: 8px;
        width: 28px;
        height: 28px;
        border-radius: 9999px;
        border: 2px solid white;
        background: #22c55e;
        color: white;
        display: grid;
        place-items: center;
        font-weight: 900;
        opacity: 0;
        transform: scale(.9);
        transition: opacity .12s ease, transform .12s ease;
    }

    .employee-card--select.selected, .employee-card--select:has(input[type="checkbox"]:checked) {
        outline: 2px solid #2563eb;
        outline-offset: 2px;
        border-color: #2563eb33;
        box-shadow: 0 0 0 4px #3b82f633;
    }

        .employee-card--select:has(input[type="checkbox"]:checked) .checkmark, .employee-card--select.selected .checkmark {
            opacity: 1;
            transform: scale(1);
        }


/* Info-variant (AlleAnsatte): bruker <details> */
.employee-card--info summary {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    cursor: pointer;
}

    .employee-card--info summary::-webkit-details-marker {
        display: none;
    }

.employee-card--info[open] {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
    border-color: #2563eb33;
    box-shadow: 0 0 0 4px #3b82f633;
}

.employee-card--info .info {
    margin-top: 6px;
    display: grid;
    gap: 4px;
    font-size: .9rem;
}

.employee-card--info a {
    text-decoration: none;
}


/* Skjul checkbox visuelt, behold tilgjengelighet */
.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}


.form-actions {
    margin-top: 1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .6rem 1rem;
    border-radius: .75rem;
    border: 1px solid #1d4ed8;
}

.btn-primary {
    background: #2563eb;
    color: white;
}

    .btn-primary:hover {
        background: #1d4ed8;
    }






.employee-card--info {
    padding: 10px;
}

    .employee-card--info summary {
        list-style: none;
        cursor: pointer;
    }

        .employee-card--info summary::-webkit-details-marker {
            display: none;
        }

    /* header-layout */
    .employee-card--info .card-head {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .employee-card--info .info {
        margin-top: 8px;
        display: grid;
        gap: 4px;
        font-size: .9rem;
    }

    /* visuelt fokus når åpen */
    .employee-card--info[open] {
        outline: 2px solid #2563eb;
        outline-offset: 2px;
        border-color: #2563eb33;
        box-shadow: 0 0 0 4px #3b82f633;
    }