/* ─────────────────────────────────────────────────────────────
   «Nytt i iFisk» – forsidekort, nyhetsside og meny-teller.
   Global (ikke scoped) fordi MudBlazor-komponentene ellers ikke treffes.
   ───────────────────────────────────────────────────────────── */

/* Forsidekort */
.whats-new-card {
    padding: 16px 20px;
    border-left: 4px solid var(--mud-palette-primary);
}

.whats-new-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.whats-new-card-title {
    flex: 1;
    min-width: 0;
    font-weight: 600;
}

.whats-new-card .whats-new-chip {
    margin: 0;
}

.whats-new-card-list {
    list-style: none;
    margin: 0 0 12px;
    padding: 0;
}

.whats-new-card-list li {
    position: relative;
    padding: 5px 0 5px 18px;
    line-height: 1.35;
}

.whats-new-card-list li::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 0.85em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--mud-palette-text-secondary);
}

.whats-new-card-list li.is-new::before {
    background: var(--mud-palette-success);
    box-shadow: 0 0 0 3px color-mix(in oklab, var(--mud-palette-success) 25%, transparent);
}

.whats-new-card-list a {
    color: var(--mud-palette-text-primary);
    text-decoration: none;
    font-weight: 500;
}

.whats-new-card-list li.is-new a {
    font-weight: 600;
}

.whats-new-card-list a:hover {
    text-decoration: underline;
}

.whats-new-card-meta {
    display: block;
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
}

.whats-new-card-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--mud-palette-primary);
    text-decoration: none;
}

.whats-new-card-link:hover {
    text-decoration: underline;
}

/* Nyhetsside */
.whats-new-title-icon {
    vertical-align: -4px;
    margin-right: 4px;
}

.whats-new-filter {
    flex-wrap: wrap;
}

.whats-new-panels .whats-new-panel .mud-expand-panel-header {
    align-items: flex-start;
    padding-top: 14px;
    padding-bottom: 14px;
}

.whats-new-panel-title {
    min-width: 0;
}

.whats-new-panel-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 4px;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--mud-palette-text-secondary);
}

.whats-new-area {
    font-weight: 700;
    color: var(--mud-palette-primary);
}

.whats-new-badge,
.nav-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    padding: 1px 7px;
    border-radius: 999px;
    background: var(--mud-palette-success);
    color: var(--mud-palette-success-text);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.5;
}

.nav-count-badge {
    margin-left: 8px;
    text-transform: none;
}

.whats-new-panel-heading {
    font-weight: 600;
    line-height: 1.3;
}

.whats-new-panel-summary {
    margin-top: 2px;
}

/* Innholdet i et oppslag */
.whats-new-entry {
    padding: 4px 0 8px;
}

.whats-new-paragraph {
    margin-bottom: 12px;
    max-width: 78ch;
}

.whats-new-paragraph code,
.whats-new-steps code,
.whats-new-tips code {
    font-size: 0.85em;
    padding: 1px 5px;
    border-radius: 4px;
    background: color-mix(in oklab, var(--mud-palette-text-primary) 8%, transparent);
    color: var(--mud-palette-text-primary);
}

.whats-new-section {
    margin-top: 16px;
}

.whats-new-section-title {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
    font-weight: 600;
}

.whats-new-steps {
    margin: 0;
    padding-left: 22px;
    max-width: 78ch;
}

.whats-new-steps li {
    margin-bottom: 6px;
    line-height: 1.45;
}

.whats-new-tips {
    padding: 12px 16px;
    border-radius: 8px;
    background: color-mix(in oklab, var(--mud-palette-warning) 14%, var(--mud-palette-surface));
    border: 1px solid color-mix(in oklab, var(--mud-palette-warning) 45%, transparent);
    max-width: 78ch;
}

.whats-new-tips ul {
    margin: 0;
    padding-left: 20px;
}

.whats-new-tips li {
    margin-bottom: 6px;
    line-height: 1.45;
}

.whats-new-tips li:last-child,
.whats-new-steps li:last-child {
    margin-bottom: 0;
}

.whats-new-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
    margin: 4px 0 16px;
}

.whats-new-figure {
    margin: 0;
    cursor: zoom-in;
    border: 1px solid var(--mud-palette-divider);
    border-radius: 8px;
    overflow: hidden;
    background: var(--mud-palette-surface);
}

.whats-new-figure img {
    display: block;
    width: 100%;
    height: auto;
}

.whats-new-figure figcaption {
    padding: 6px 10px;
    font-size: 0.78rem;
    color: var(--mud-palette-text-secondary);
    border-top: 1px solid var(--mud-palette-divider);
}

.whats-new-actions {
    margin-top: 16px;
}

/* Mobil */
@media (max-width: 599px) {
    .whats-new-card {
        padding: 14px 16px;
    }

    .whats-new-images {
        grid-template-columns: 1fr;
    }

    .whats-new-panels .whats-new-panel .mud-expand-panel-header {
        padding-left: 14px;
        padding-right: 8px;
    }
}
