/*
 * Modul Benachrichtigungen – Übersicht, Vorlagen-Editor mit mitlaufender Vorschau, Versandprotokoll,
 * Einstellungen und Rundschreiben. Nur Tokens des Designsystems, keine eigenen Farben.
 */

/* ---- Übersicht: Anlässe + Seitenspalte ------------------------------------- */

.ntf-overview {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(17rem, 22rem);
    gap: var(--space-5);
    align-items: start;
    margin-top: var(--space-5);
}

@media (max-width: 1100px) {
    .ntf-overview {
        grid-template-columns: minmax(0, 1fr);
    }
}

.ntf-status {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    white-space: nowrap;
}

.ntf-status svg {
    width: 1em;
    height: 1em;
}

/* ---- Vorlagen-Editor ----------------------------------------------------- */

.ntf-editor {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(20rem, 34rem);
    gap: var(--space-5);
    align-items: start;
}

@media (max-width: 1180px) {
    .ntf-editor {
        grid-template-columns: minmax(0, 1fr);
    }
}

.ntf-editor__form,
.ntf-preview {
    min-width: 0;
}

.ntf-preview {
    position: sticky;
    top: calc(4rem + var(--space-4));
}

@media (max-width: 1180px) {
    .ntf-preview {
        position: static;
    }
}

.ntf-language > summary {
    cursor: pointer;
    padding: var(--space-2) 0;
    font-weight: var(--weight-medium);
}

.ntf-language__fields {
    border: 0;
    margin: 0;
    padding: 0;
    min-width: 0;
}

.ntf-language__fields > legend {
    margin-bottom: var(--space-2);
}

.ntf-language__fields textarea {
    font-family: var(--font);
    line-height: var(--lh-base);
}

.ntf-placeholders {
    border-top: 1px solid var(--c-line);
    padding-top: var(--space-3);
}

.ntf-placeholders > summary {
    cursor: pointer;
}

.ntf-placeholders__group h3 {
    margin: var(--space-3) 0 var(--space-2);
    font-size: var(--fs-small);
    color: var(--c-muted);
}

.ntf-placeholders__list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin: 0;
    padding: 0;
    list-style: none;
}

.ntf-placeholder {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    min-height: var(--target-min);
    border: 1px solid var(--c-border);
    text-align: start;
    text-transform: none;
}

.ntf-placeholder code {
    font-size: var(--fs-tiny);
    color: var(--c-text-strong);
}

.ntf-placeholder__label {
    font-size: var(--fs-tiny);
    color: var(--c-muted);
}

.ntf-preview__languages {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.ntf-preview__subject {
    margin: 0;
    overflow-wrap: anywhere;
}

.ntf-preview__problems {
    margin: 0;
    padding: 0;
    list-style: none;
    color: var(--c-danger-text);
}

.ntf-preview__problems:empty {
    display: none;
}

.ntf-preview__frame {
    display: block;
    width: 100%;
    height: 40rem;
    max-height: 75vh;
    border: 1px solid var(--c-border);
    border-radius: var(--radius-sm);
    background: var(--c-page);
}

.ntf-preview__text {
    max-height: 24rem;
    overflow: auto;
    padding: var(--space-3);
    background: var(--c-page);
    border: 1px solid var(--c-line);
    border-radius: var(--radius-sm);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font-size: var(--fs-small);
}

.ntf-preview__sms {
    padding: var(--space-3);
    background: var(--c-page);
    border-radius: var(--radius-sm);
}

.ntf-preview__sms p {
    margin: 0;
}

.ntf-override-form {
    align-items: end;
}

.ntf-override-form__action {
    display: flex;
    align-items: flex-end;
}

/* ---- Einstellungen und Rundschreiben ------------------------------------- */

.ntf-choices {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2) var(--space-5);
}

.ntf-circular-preview {
    border-top: 1px solid var(--c-line);
}

.ntf-circular-preview h3 {
    margin-top: 0;
}

/* ---- Lesbarkeit in schmalen Ansichten ------------------------------------ */

.ntf-state .badge,
.ntf-occasions .badge {
    white-space: nowrap;
    overflow-wrap: normal;
}

.ntf-editor__form > .panel__footer {
    position: sticky;
    bottom: 0;
    z-index: 1;
    background: var(--surface);
    border-top: 1px solid var(--c-line);
}
