/* NeXtMail Web – Signaturen (nm-signaturen, signatur.js). © 2026 by Sebastian Hirtreiter */
.sg-seite .gruppe > .sg-gruppenhilfe { margin: 0 0 8px; }

/* Liste */
.sg-liste { display: flex; flex-direction: column; margin: 4px 0 10px; }
.sg-zeile { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 3px 4px 3px 10px; border-radius: 8px; cursor: pointer; outline: none; }
.sg-zeile + .sg-zeile { margin-top: 2px; }
.sg-zeile:hover { background: var(--hover); }
.sg-zeile:focus-visible { box-shadow: 0 0 0 2px var(--accent); }
.sg-zeile.an { background: var(--sel); }
.sg-zeile .t { flex: 1; min-width: 0; }
.sg-zeile .t b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg-marken { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.sg-marke { font-size: 11.5px; line-height: 18px; padding: 0 8px; border-radius: 9px; background: var(--accent-soft); color: var(--akzent-text); font-weight: 600; white-space: nowrap; }
.sg-aktionen { display: flex; gap: 2px; flex: none; }
.sg-aktionen .ik { width: 32px; height: 32px; }
.sg-aktionen .ik.sg-weg:hover { color: var(--gefahr); background: var(--gefahr-soft); }
.sg-neu { margin: 2px 0 6px; }
.sg-leer { margin: 4px 0 12px; }

/* Editor */
.sg-namezeile .feld { max-width: 360px; }
.sg-bearbeiten { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin: 4px 0 8px; }
.sg-leiste.format-leiste { padding: 4px 6px; gap: 2px; align-items: center; border-bottom: 1px solid var(--line); background: var(--panel2); }
.sg-leiste .ik { width: 32px; height: 32px; }
.sg-trenn { width: 1px; height: 20px; background: var(--line); margin: 0 4px; flex: none; }
/* Papier wie beim Empfänger: immer hell, damit Farben so erscheinen wie in der Mail */
.sig-editor.sg-editor { min-height: 150px; max-height: 420px; overflow: auto; border: 0; border-radius: 0; padding: 12px 14px; background: #fff; color: #1c2431;
  color-scheme: light; font: 14px/1.45 "Segoe UI", system-ui, -apple-system, sans-serif; }
.sig-editor.sg-editor:focus { box-shadow: inset 0 0 0 2px var(--accent); border-color: transparent; }
.sig-editor.sg-editor.sg-ziel { box-shadow: inset 0 0 0 2px var(--accent); background: #f3f6ff; }
.sg-editor img { max-width: 100%; height: auto; cursor: pointer; }
.sg-editor img.sg-gewaehlt { outline: 2px solid var(--accent); outline-offset: 2px; }
.sg-editor table { border-collapse: collapse; }
.sg-editor td { min-width: 24px; outline: 1px dashed #d5dbe6; outline-offset: -1px; }
.sg-editor a { color: #1a5fd0; }
.sg-laedt { margin: 0; padding: 6px 12px; border-top: 1px solid var(--line); }
.sg-bildplatz { padding: 0 12px; border-top: 1px solid var(--line); background: var(--panel2); }
.sg-bildplatz > .hilfe { margin: 0; padding: 8px 0; }
.sg-bildregler { padding: 4px 0 10px; }
.sg-bildregler .schalter { border-top: 1px solid var(--line); padding: 4px 0; }
.sg-regler { display: flex; align-items: center; gap: 12px; }
.sg-regler input[type=range] { flex: 1; min-width: 0; accent-color: var(--accent); }
.sg-reglerwert { min-width: 56px; text-align: right; font-variant-numeric: tabular-nums; font-size: 13px; }
.sg-bildinfo { display: block; }

/* Vorschau */
.sg-vorschauen { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; margin: 4px 0 8px; }
.sg-vorschaufeld { min-width: 0; }
.sg-vorschautitel { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--muted); margin: 0 0 4px; }
.sg-vorschautitel svg.ic { width: 16px; height: 16px; }
.sg-vorschau { border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; min-height: 96px; overflow: auto; overflow-wrap: anywhere;
  font: 14px/1.45 "Segoe UI", system-ui, -apple-system, sans-serif; }
.sg-vorschau.hell { background: #fff; color: #1c2431; color-scheme: light; }
.sg-vorschau.dunkel { background: #1f1f1f; color: #e8e8e8; border-color: #3a3f47; color-scheme: dark; }
.sg-vorschau.hell a { color: #1a5fd0; }
.sg-vorschau.dunkel a { color: #8ab4f8; }
.sg-vorschau img { max-width: 100%; height: auto; }
.sg-vorschau p { margin: 0 0 .6em; }
.sg-vorschauleer { color: #8a93a3; font-style: italic; }
.sg-groesse { font-size: 12.5px; color: var(--muted); margin: 0 0 6px; }
.sg-groesse.zu-gross { color: var(--gefahr); font-weight: 600; }
.sg-warnungen .hinweis { margin: 0 0 6px; background: var(--warn-soft); }
.sg-firma { margin: 4px 0 8px; }

/* Standard je Absender */
.sg-absender { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: end; padding: 10px 0; }
.sg-absender + .sg-absender { border-top: 1px solid var(--line); }
.sg-adr { min-width: 0; align-self: center; }
.sg-adr b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg-adr small { display: block; color: var(--muted); font-size: 12px; min-height: 1em; }
.sg-wahlfeld { display: block; min-width: 0; }
.sg-wahlfeld > span { display: block; font-size: 12.5px; color: var(--muted); margin: 0 0 3px; }

/* Auf allen Geräten */
.schalter.sg-unter { padding-left: 18px; }

/* Deine Angaben */
.sg-angaben { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 14px; }
.sg-angabe { display: block; }
.sg-angabe.breit { grid-column: 1 / -1; }
.sg-angabe .label code { font-weight: 400; font-size: 12px; color: var(--muted); }
.sg-angabe textarea.feld { height: auto; padding: 8px 11px; resize: vertical; font: inherit; }
.sg-nurlesen { min-height: 38px; display: flex; align-items: center; padding: 0 11px; border: 1px dashed var(--line); border-radius: 8px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg-angabe .hilfe { margin-top: 3px; }

/* Speichern */
.sg-fehler { margin: 0 0 10px; }
.sg-speichern { margin-top: 4px; }
.sg-ungespeichert { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.sg-ungespeichert[hidden] { display: none; }

@media (max-width: 760px) {
  .sg-vorschauen { grid-template-columns: minmax(0, 1fr); }
  .sg-absender { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .sg-adr { grid-column: 1 / -1; }
  .sg-angaben { grid-template-columns: minmax(0, 1fr); }
  .sg-zeile { flex-wrap: wrap; }
  .sg-namezeile .feld { max-width: none; }
}
