/* BAVORA OS · E-Mail-Vorlagen-Editor (nutzt das Vollbild-Layout cs-* des Vertragseditors). */
.mt-overlay .mt-edit { display: flex; flex-direction: column; gap: var(--sp-3, 12px); }
.mt-overlay .mt-types { align-self: flex-start; }
.mt-overlay .mt-types .cs-seg__btn[aria-selected="true"] { background: var(--bv-crm-accent, #1f5c45); color: #fff; }
.mt-overlay .mt-body { font-family: var(--font-mono, ui-monospace, monospace); font-size: .9rem; line-height: 1.55; min-height: 280px; resize: vertical; }
.mt-overlay .mt-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.mt-overlay .mt-chip { border: 1px solid var(--line, #e6e1d8); background: var(--accent-bg, #eef4f0); color: var(--ink, #1b1b1b); border-radius: 999px; padding: 4px 10px; font-size: 12px; cursor: pointer; }
.mt-overlay .mt-chip:hover:not(:disabled) { border-color: var(--bv-crm-accent, #1f5c45); }
.mt-overlay .mt-chip:focus-visible { outline: 2px solid var(--bv-crm-focus, #2e865c); outline-offset: 2px; }
.mt-overlay .mt-mail { background: #fff; border: 1px solid var(--line, #e6e1d8); border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; min-height: 60vh; }
.mt-overlay .mt-mail__head { display: flex; gap: 10px; align-items: baseline; padding: 12px 16px; border-bottom: 1px solid var(--line, #e6e1d8); background: var(--bg-alt, #f7f4ef); }
.mt-overlay .mt-subject { font-weight: 600; color: #1b1b1b; overflow-wrap: anywhere; }
.mt-overlay .mt-frame { flex: 1 1 auto; width: 100%; min-height: 60vh; border: 0; background: #fff; }

/* Automatische E-Mails – lesbare Übersicht im vorhandenen Vollbild-Editor. */
.mt-overlay .mt-catalog { border:1px solid var(--bv-crm-line, #d5e1d8); border-radius:12px; padding:12px 14px; background:var(--bg-alt, #f3efe9); }
.mt-overlay .mt-catalog summary { cursor:pointer; font-weight:650; color:var(--ink, #1a1a1a); }
.mt-overlay .mt-catalog summary:focus-visible { outline:3px solid var(--bv-crm-focus, #2e865c); outline-offset:3px; }
.mt-overlay .mt-catalog__grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr)); gap:12px; margin-top:14px; }
.mt-overlay .mt-catalog__item { background:#fff; border:1px solid var(--bv-crm-line, #d5e1d8); border-radius:8px; padding:12px; }
.mt-overlay .mt-catalog__item p { margin:6px 0; overflow-wrap:anywhere; }
/* 07.11.2026: bearbeitbare Standard-E-Mails sind klickbar und öffnen die Vorlage. */
.mt-overlay button.mt-catalog__item { display:block; width:100%; text-align:left; font:inherit; color:inherit; cursor:pointer; transition:border-color .15s ease, background .15s ease; }
.mt-overlay button.mt-catalog__item:hover { border-color:var(--bv-crm-primary, #17523b); background:var(--bv-crm-primary-tint, #eef4ef); }
.mt-overlay button.mt-catalog__item:focus-visible { outline:3px solid var(--bv-crm-focus, #2e865c); outline-offset:2px; }
.mt-overlay .mt-catalog__cta { color:var(--bv-crm-primary, #17523b); font-weight:600; }
@media (prefers-reduced-motion: reduce) { .mt-overlay button.mt-catalog__item { transition:none; } }
