/* ==========================================================================
   Modul "Neuigkeiten" — Liste der Nachrichten und Verwaltungsvorschau
   ========================================================================== */

.news-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.news-item {
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    background: var(--surface-raised);
    overflow: hidden;
}
.news-item.is-unread {
    border-color: var(--brand);
    box-shadow: inset 3px 0 0 var(--brand);
}

.news-item-head {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    width: 100%;
    padding: var(--space-3) var(--space-4);
    border: 0;
    background: none;
    color: var(--text-primary);
    text-align: left;
    cursor: pointer;
}
.news-item-head:hover { background: var(--surface-sunken); }

.news-item-dot {
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-radius: var(--radius-pill);
    background: var(--brand);
    visibility: hidden;
}
.news-item.is-unread .news-item-dot { visibility: visible; }

.news-item-title {
    flex: 1;
    min-width: 0;
    font-size: var(--fs-15);
    font-weight: var(--fw-medium);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.news-item.is-unread .news-item-title { font-weight: var(--fw-semibold); }

.news-item-date {
    flex-shrink: 0;
    font-size: var(--fs-13);
    color: var(--text-muted);
}

.news-item-chevron {
    flex-shrink: 0;
    color: var(--text-muted);
    transition: transform var(--duration-fast) var(--ease-out);
}
.news-item.is-open .news-item-chevron { transform: rotate(180deg); }

/* Typografie des Nachrichtentextes – geteilt von Übersicht und Vorschau. */
.news-prose {
    color: var(--text-secondary);
    font-size: var(--fs-14);
    line-height: 1.65;
}
.news-prose > *:first-child { margin-top: 0; }
.news-prose > *:last-child  { margin-bottom: 0; }
.news-prose h3,
.news-prose h4,
.news-prose h5,
.news-prose h6 {
    margin: var(--space-4) 0 var(--space-2);
    color: var(--text-primary);
    font-size: var(--fs-15);
    font-weight: var(--fw-semibold);
}
.news-prose p  { margin: 0 0 var(--space-3); }
.news-prose ul,
.news-prose ol { margin: 0 0 var(--space-3); padding-left: var(--space-5); }
.news-prose li { margin-bottom: var(--space-1); }
.news-prose code {
    padding: 1px 4px;
    border-radius: var(--radius-sm);
    background: var(--surface-sunken);
    font-family: var(--font-mono);
    font-size: var(--fs-13);
}

.news-item-body {
    padding: var(--space-4);
    border-top: 1px solid var(--border-light);
}

/* ── Verwaltung: Vorschau unter dem Eingabefeld ──────────────────────── */

.news-preview {
    min-height: 100px;
    max-height: 300px;
    padding: var(--space-3);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    background: var(--surface-sunken);
    overflow-y: auto;
}

@media (max-width: 720px) {
    .news-item-date { display: none; }
}
