/* Nachrichten und Geburtstage sind eigenständige Dashboard-Inhalte und lassen
   sich dadurch später unabhängig erweitern oder ausblenden. */
.news-list {
    display: grid;
    gap: 16px;
}

.news-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 24px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, .06);
    scroll-margin-top: 24px;
}

.news-card h2 {
    margin: 10px 0;
    font-size: 1.25rem;
}

.news-card p {
    color: var(--muted);
    line-height: 1.65;
}

/* Die Archivansicht bleibt als kompakte Liste schnell erfassbar. Erst das
   bewusste Öffnen einer Zeile zeigt den vollständigen Nachrichteninhalt. */
.news-filter-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    padding-bottom: 5px;
    overflow-x: auto;
    scrollbar-width: thin;
}

.news-filter-bar button {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 13px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--ink);
    font-family: inherit;
    font-size: .72rem;
    font-weight: 700;
}

.news-filter-bar button span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 999px;
    background: #eee;
    font-size: .62rem;
}

.news-filter-bar button:hover,
.news-filter-bar button.active {
    border-color: #090909;
    background: #090909;
    color: #fff;
}

.news-filter-bar button.active span {
    background: #e30613;
    color: #fff;
}

.news-accordion {
    display: grid;
    gap: 9px;
}

.news-list-item {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .04);
    overflow: hidden;
    scroll-margin-top: 24px;
}

.news-list-item[hidden] {
    display: none;
}

.news-list-item[open] {
    border-color: #111;
    box-shadow: 0 8px 26px rgba(0, 0, 0, .08);
}

.news-list-item summary {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr) 42px;
    align-items: stretch;
    min-height: 105px;
    cursor: pointer;
    list-style: none;
}

.news-list-item summary::-webkit-details-marker {
    display: none;
}

.news-list-item summary > img,
.news-list-placeholder {
    width: 92px;
    height: 100%;
    min-height: 105px;
    object-fit: cover;
}

.news-list-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #090909;
    color: #e30613;
    font-size: 1.55rem;
}

.news-list-summary {
    min-width: 0;
    padding: 16px 18px;
}

.news-list-summary small {
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--muted);
    font-size: .65rem;
}

.news-list-summary small span {
    color: #e30613;
    font-weight: 800;
    text-transform: uppercase;
}

.news-list-summary small .news-visibility-label {
    color: var(--muted);
    font-weight: 700;
    text-transform: none;
}

.news-list-summary strong,
.news-list-summary em {
    display: block;
}

.news-list-summary strong {
    margin: 6px 0 4px;
    font-size: 1rem;
}

.news-list-summary em {
    overflow: hidden;
    color: var(--muted);
    font-size: .76rem;
    font-style: normal;
    line-height: 1.45;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.news-list-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    border-left: 1px solid var(--line);
    color: #e30613;
}

.news-list-toggle i {
    transition: transform .2s;
}

.news-list-item[open] .news-list-toggle i {
    transform: rotate(180deg);
}

.news-list-detail {
    padding: 25px 30px 28px;
    border-top: 1px solid var(--line);
}

.news-list-detail .action-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 20px;
}

/* Editor und Ausgabe teilen dieselben Bildregeln, damit die Vorschau dem
   späteren Erscheinungsbild der Nachricht möglichst genau entspricht. */
.news-form-card {
    max-width: 1100px;
}

.field-label {
    display: block;
    margin-bottom: 8px;
}

.news-visibility-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.news-date-field input {
    max-width: 360px;
}

.news-visibility-options label,
.news-scope-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-height: 82px;
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #fafafa;
    cursor: pointer;
}

.news-visibility-options label:has(input:checked) {
    border-color: #e30613;
    box-shadow: inset 0 0 0 1px #e30613;
    background: #fff;
}

.news-visibility-options input {
    width: 1.1rem;
    min-width: 1.1rem;
    max-width: 1.1rem;
    height: 1.1rem;
    min-height: 1.1rem;
    padding: 0;
    border-radius: 50%;
    flex: 0 0 auto;
    margin-top: 4px;
}

.news-visibility-options input:checked {
    border-color: #e30613;
    background-color: #e30613;
}

.news-visibility-options span,
.news-scope-note span,
.news-visibility-options strong,
.news-visibility-options small,
.news-scope-note strong,
.news-scope-note small {
    display: block;
}

.news-visibility-options i,
.news-scope-note > i {
    color: #e30613;
    font-size: 1rem;
}

.news-visibility-options small,
.news-scope-note small {
    margin-top: 4px;
    color: var(--muted);
    font-weight: 400;
    line-height: 1.4;
}

.news-scope-note {
    min-height: 0;
    cursor: default;
}

.news-editor-toolbar.ql-toolbar {
    border-color: var(--line);
    border-radius: 10px 10px 0 0;
    background: #f8f8f8;
}

.news-editor.ql-container {
    border-color: var(--line);
    border-radius: 0 0 10px 10px;
    background: #fff;
    font-family: inherit;
    font-size: 1rem;
}

.news-editor .ql-editor {
    min-height: 320px;
    line-height: 1.65;
}

.news-gallery-button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
}

.news-image-delete-button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    color: #a00009 !important;
}

.news-image-delete-button:disabled {
    cursor: not-allowed;
    opacity: .3;
}

.ql-editor img {
    cursor: pointer;
}

.ql-editor img.is-selected-for-delete,
.ql-editor .news-gallery.is-selected-for-delete {
    outline: 3px solid #e30613;
    outline-offset: 3px;
}

.news-editor-help,
.news-upload-status {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: .78rem;
}

.news-upload-status {
    min-height: 1.2em;
    color: #287346;
}

.news-upload-status.is-error {
    color: var(--red, #b00020);
}

.news-content {
    color: var(--muted);
    line-height: 1.65;
}

.news-content h2,
.news-content h3 {
    color: var(--ink);
    margin: 1.4em 0 .55em;
}

.news-content blockquote {
    border-left: 4px solid var(--coral);
    margin: 1.25rem 0;
    padding: .4rem 0 .4rem 1rem;
}

.news-content img,
.ql-editor > img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 1rem 0;
    border-radius: 10px;
}

.news-gallery,
.ql-editor .news-gallery {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin: 1.25rem 0;
}

.news-gallery img,
.ql-editor .news-gallery img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    margin: 0;
    object-fit: cover;
    border-radius: 10px;
}

/* Die Startseite zeigt Nachrichten als eigenständige Vorschauen statt als
   generische Aktivitätszeilen. Bild und Metadaten bleiben dabei kompakt. */
.dashboard-news-list {
    display: grid;
    gap: 10px;
}

.dashboard-news-card {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    transition: border-color .2s, transform .2s, box-shadow .2s;
}

.dashboard-news-card:hover {
    border-color: #e30613;
    transform: translateY(-2px);
    box-shadow: 0 7px 18px rgba(0, 0, 0, .08);
}

.dashboard-news-card > img,
.dashboard-news-placeholder {
    width: 82px;
    height: 100%;
    min-height: 112px;
    object-fit: cover;
}

.dashboard-news-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #090909;
    color: #e30613;
    font-size: 1.35rem;
}

.dashboard-news-card > div {
    min-width: 0;
    padding: 12px 13px;
}

.dashboard-news-card small,
.dashboard-news-card strong,
.dashboard-news-card em {
    display: block;
}

.dashboard-news-card small {
    color: var(--muted);
    font-size: .62rem;
}

.dashboard-news-card small span {
    color: #e30613;
    font-weight: 800;
    text-transform: uppercase;
}

.dashboard-news-card strong {
    margin-top: 4px;
    font-size: .88rem;
    line-height: 1.3;
}

.dashboard-news-card p {
    margin: 4px 0 7px;
    color: var(--muted);
    font-size: .7rem;
    line-height: 1.4;
}

.dashboard-news-card em {
    color: #e30613;
    font-size: .65rem;
    font-style: normal;
    font-weight: 800;
}

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

.news-content img {
    cursor: zoom-in;
}

/* Die native Dialog-Basis vermeidet eine weitere Bibliothek und bietet
   Tastatur-, Fokus- und Escape-Verhalten direkt im Browser. */
.news-lightbox {
    width: min(94vw, 1200px);
    height: min(92vh, 900px);
    max-width: none;
    max-height: none;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: #090909;
    color: #fff;
    overflow: hidden;
}

.news-lightbox::backdrop {
    background: rgba(0, 0, 0, .86);
}

.news-lightbox figure {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 55px 70px 44px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.news-lightbox figure img {
    min-width: 0;
    min-height: 0;
    max-width: 100%;
    max-height: calc(100% - 35px);
    object-fit: contain;
}

.news-lightbox figcaption {
    margin-top: 12px;
    color: #ddd;
    font-size: .8rem;
}

.news-lightbox-close,
.news-lightbox-nav {
    position: absolute;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .14);
    color: #fff;
}

.news-lightbox-close {
    top: 14px;
    right: 14px;
}

.news-lightbox-nav {
    top: 50%;
    transform: translateY(-50%);
}

.news-lightbox-nav.previous {
    left: 14px;
}

.news-lightbox-nav.next {
    right: 14px;
}

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

.news-lightbox-close:hover,
.news-lightbox-nav:hover {
    background: #e30613;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    color: var(--muted);
    font-size: .7rem;
}

.news-preview p {
    line-height: 1.45;
}

.birthday-panel {
    margin-top: 24px;
}

.birthday-panel .panel-head > i {
    color: var(--coral);
    font-size: 1.6rem;
}

.birthday-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.birthday-list article {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px;
    background: var(--cream);
    border-radius: 10px;
}

.birthday-list time {
    width: 44px;
    text-align: center;
}

.birthday-list time strong,
.birthday-list time span,
.birthday-list article > div strong,
.birthday-list article > div small {
    display: block;
}

.birthday-list time strong {
    font-size: 1.35rem;
    line-height: 1;
}

.birthday-list time span,
.birthday-list article small {
    color: var(--muted);
    font-size: .65rem;
}

.birthday-list article > div strong {
    font-size: .82rem;
    margin-bottom: 3px;
}

/* Nur das Präsidium sieht nicht freigegebene Geburtstage als deutliche Sperrinformation. */
.birthday-list article.birthday-blocked {
    border: 1px solid #c8c8c8;
    background: #e5e5e5;
    filter: grayscale(1);
    opacity: .86;
}

.birthday-list article.birthday-blocked em {
    display: block;
    margin-top: 5px;
    color: #e30613;
    font-size: .63rem;
    font-style: normal;
    font-weight: 900;
    letter-spacing: .04em;
}

.birthday-list article.birthday-blocked em i {
    margin-right: 4px;
}

@media (max-width: 900px) {
    .birthday-list {
        grid-template-columns: 1fr;
    }

    .news-gallery,
    .ql-editor .news-gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .news-lightbox figure {
        padding: 55px 15px 30px;
    }

    .news-lightbox-nav {
        top: auto;
        bottom: 12px;
        transform: none;
    }

    .news-list-item summary {
        grid-template-columns: 74px minmax(0, 1fr) 34px;
        min-height: 92px;
    }

    .news-list-item summary > img,
    .news-list-placeholder {
        width: 74px;
        min-height: 92px;
    }

    .news-list-summary {
        padding: 12px;
    }

    .news-list-summary small {
        display: block;
    }

    .news-list-summary time {
        display: block;
        margin-top: 2px;
    }

    .news-list-summary em {
        display: none;
    }

    .news-list-detail {
        padding: 20px 16px 24px;
    }

    .news-visibility-options {
        grid-template-columns: 1fr;
    }
}

