/* Eventmaster 3.3.3 – Werbung (Agent B): Mail an Käufer, Mailings, Automatische Gutscheine
   Konzeption, Aufbau und Programmierung: Philipp Seel · (c) Philipp Seel */

/* ---------- Fenster „Mail an Käufer“ (mittig, groß) ---------- */
#layer.m3l{display:grid;place-items:center;padding:16px;pointer-events:auto}
#layer.m3l .scrim{background:rgb(20 30 35/.55)}
.m3m{position:relative;pointer-events:auto;width:min(1440px,100%);height:min(940px,calc(100vh - 32px));display:flex;flex-direction:column;background:#fff;color:#1d2024;border-radius:20px;box-shadow:0 20px 60px rgba(0,0,0,.3);overflow:hidden;font-family:Inter,system-ui,sans-serif}
.m3-h{background:#134e5e;color:#fff;display:flex;align-items:center;gap:12px;padding:14px 20px;flex:none}.m3-h b{font-size:18px}.m3-h .sp{flex:1}
.m3-sv{font-size:13px;opacity:.85}
.m3-x{width:32px;height:32px;border-radius:9px;background:#fff;color:#134e5e;border:0;display:grid;place-items:center;font-weight:900;cursor:pointer;font-size:15px}
.m3-bd{flex:1;min-height:0;display:grid;grid-template-columns:1.25fr 1fr}
.m3-l{padding:16px 20px;border-right:1px solid #ebeae5;overflow:auto}
.m3-r{padding:16px 20px;background:#f6f5f1;overflow:auto;display:flex;flex-direction:column}
.m3-sec{margin-bottom:16px}.m3-sec h4,.m3-pvh h4{margin:0 0 8px;font-size:12px;letter-spacing:.06em;color:#7a7e84;font-weight:800}
.m3-lb{display:block;font-size:12.5px;font-weight:700;margin:9px 0 5px;color:#1d2024}.m3-lb small{font-weight:500;color:#7a7e84;margin-left:4px}
.m3m .in{width:100%;box-sizing:border-box;border:1.5px solid #d9d8d2;border-radius:11px;padding:9px 12px;font-size:14px;background:#fff;min-height:40px}
.m3m .in.sm{min-height:32px;padding:4px 8px;font-size:13px;border-radius:8px;width:auto}
.m3-two{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.m3-hint{font-size:12px;color:#7a7e84;margin:6px 0 0}
/* Bedingungen */
.m3-fl{display:flex;align-items:center;gap:8px;border:1.5px solid #e1e0da;border-radius:11px;padding:6px 10px;margin-bottom:6px;font-size:13.5px;background:#fff;flex-wrap:wrap}
.m3-fk{color:#1d2024}.m3-fv{flex:1;min-width:160px;color:#134e5e;font-weight:700}.m3-fv select{font-weight:700;color:#134e5e}
.m3-fx{margin-left:auto;border:0;background:none;color:#c0392b;font-weight:900;cursor:pointer;font-size:14px;padding:4px 6px;border-radius:6px}.m3-fx:hover{background:#fdf1ef}
.m3-none{font-size:13px;color:#6c7075;margin:0 0 6px}.m3-aud{font-size:12.5px;color:#134e5e;font-weight:700;margin:2px 0 6px}
.m3-adds{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin:4px 0}
.m3-pk{position:relative}.m3-pk summary{cursor:pointer;list-style:none;padding:4px 8px;border-radius:8px;border:1.5px dashed #9fc3cc;background:#f8fbfc}.m3-pk summary::-webkit-details-marker{display:none}
.m3-pkl{position:absolute;z-index:5;left:0;top:calc(100% + 4px);width:min(380px,80vw);max-height:280px;overflow:auto;background:#fff;border:1px solid #e1e0da;border-radius:12px;box-shadow:0 10px 30px rgba(0,0,0,.15);padding:6px}
.m3-pkl label{display:grid;grid-template-columns:auto 1fr auto;gap:8px;align-items:center;padding:6px 8px;border-radius:8px;cursor:pointer;font-weight:500;color:#1d2024}.m3-pkl label:hover{background:#f1f7f8}.m3-pkl small{color:#7a7e84}
.m3-cnt{display:flex;align-items:center;gap:10px;background:#f1f7f8;border-radius:11px;padding:9px 12px;font-size:13.5px;margin-top:8px}.m3-cnt b{font-size:18px;color:#134e5e}.m3-cnt small{color:#6c7075}
/* Editor */
.m3-tb{display:flex;gap:4px;flex-wrap:wrap;border:1.5px solid #d9d8d2;border-bottom:0;border-radius:11px 11px 0 0;padding:6px;background:#fafaf8}
.m3-tb button{min-width:30px;height:30px;padding:0 8px;border-radius:7px;font-weight:800;font-size:12.5px;background:#fff;border:1px solid #ebeae5;cursor:pointer;color:#1d2024;font-family:inherit}.m3-tb button:hover{background:#f1f7f8;border-color:#9fc3cc}
.m3-tb .sep{width:6px}
.m3-ed{border:1.5px solid #134e5e;border-radius:0 0 11px 11px;padding:12px 14px;font-size:14px;min-height:220px;background:#fff;line-height:1.55;outline:none}
.m3-ed:focus{box-shadow:0 0 0 3px rgba(19,78,94,.15)}
.m3-ed p{margin:0 0 8px}.m3-ed ul,.m3-ed ol{margin:0 0 8px;padding-left:22px}.m3-ed a{color:#134e5e}
.m3ph{color:#134e5e;background:#e3eef1;border-radius:5px;padding:0 4px;font-weight:700;white-space:nowrap}
.m3blk{border:1.5px dashed #9fc3cc;border-radius:10px;padding:8px 10px;margin:8px 0;font-size:12.5px;background:#f8fbfc;display:flex;align-items:center;gap:10px;cursor:pointer;user-select:none}
.m3blk:hover,.m3blk:focus{border-color:#134e5e;outline:none}.m3blk b{font-size:13.5px;display:block}.m3blk small{display:block;color:#5c6066}
.m3b-th{width:44px;height:44px;border-radius:8px;background:linear-gradient(150deg,#1b0f2e,#c23bd4) center/cover;flex:none}
.m3b-ic{width:44px;height:44px;border-radius:8px;background:#fff8ea;color:#8a5a00;display:grid;place-items:center;font-size:20px;font-weight:900;flex:none}
/* Versand */
.m3-opt{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:6px}
.m3-o{border:1.5px solid #e1e0da;border-radius:11px;padding:8px 11px;font-size:12.5px;color:#6c7075;background:#fff;text-align:left;cursor:pointer;font-family:inherit}
.m3-o b{display:block;color:#1d2024;font-size:13.5px}.m3-o span{display:block}.m3-o.on{border:2px solid #134e5e;background:#f1f7f8}
div.m3-o{cursor:default}.m3-ob{all:unset;cursor:pointer;display:block;width:100%}.m3-ob b{display:block;color:#1d2024;font-size:13.5px}
.m3-at{display:flex;gap:6px;margin-top:6px}.m3-at .in{flex:1}
.m3-tg{display:flex;align-items:center;gap:10px;font-size:13px;padding:5px 0;cursor:pointer}
.m3-tg input,.m3-sw input{position:absolute;opacity:0;width:1px;height:1px}
.m3-tg i,.m3-sw i{width:34px;height:19px;border-radius:10px;background:#c9cbcf;position:relative;flex:none;transition:background .15s}
.m3-tg i:after,.m3-sw i:after{content:"";position:absolute;left:2px;top:2px;width:15px;height:15px;border-radius:50%;background:#fff;transition:left .15s}
.m3-tg input:checked+i,.m3-sw input:checked+i{background:#134e5e}.m3-tg input:checked+i:after,.m3-sw input:checked+i:after{left:17px}
.m3-tg input:focus-visible+i,.m3-sw input:focus-visible+i{outline:2px solid #134e5e;outline-offset:2px}
/* Vorschau */
.m3-pvh{display:flex;align-items:center;margin-bottom:10px}.m3-pvh h4{margin:0}
.m3-seg{margin-left:auto;display:flex;background:#fff;border:1px solid #e1e0da;border-radius:10px;padding:3px}
.m3-seg button{padding:4px 10px;border-radius:7px;font-size:12px;font-weight:700;border:0;background:none;cursor:pointer;font-family:inherit;color:#1d2024}.m3-seg button.on{background:#134e5e;color:#fff}
.m3-pv{flex:1;min-height:0;display:flex;justify-content:center}
.m3-phone{width:330px;max-width:100%;border:9px solid #1d1f23;border-radius:36px;overflow:hidden;background:#fff;display:flex;flex-direction:column;height:100%;max-height:640px;min-height:420px}
.m3-pc{width:100%;max-width:640px;border:1px solid #d9d8d2;border-radius:12px;overflow:hidden;background:#fff;display:flex;flex-direction:column;height:100%;min-height:420px}
.m3-pcb{display:flex;gap:6px;padding:8px 10px;background:#ecebe6}.m3-pcb i{width:10px;height:10px;border-radius:50%;background:#c9c8c2}
.m3-inb{padding:8px 12px;border-bottom:1px solid #eee;font-size:11.5px;flex:none}.m3-inb b{display:block;font-size:13px}.m3-inb span{display:block}.m3-inb small{display:block;color:#7a7e84}
.m3-pv iframe{flex:1;width:100%;border:0;background:#f6f5f1}
.m3-nav{display:flex;align-items:center;justify-content:center;gap:12px;font-size:12px;color:#6c7075;margin-top:8px}.m3-nav .linkbtn{font-size:18px;font-weight:900;padding:0 8px}
/* Fuß Variante A */
.m3-ft{padding:12px 20px;border-top:1px solid #ebeae5;flex:none;background:#fff}
.m3-ft .ft-p{border-radius:22px}
/* Fenster im Fenster */
.m3-sub{position:absolute;inset:0;background:rgb(20 30 35/.35);display:grid;place-items:center;z-index:10;padding:16px}
.m3-sbox{background:#fff;border-radius:16px;box-shadow:0 20px 50px rgba(0,0,0,.3);padding:18px 20px;width:min(480px,100%);max-height:calc(100% - 20px);overflow:auto}
.m3-sbox h3{margin:0 0 6px;font-size:17px}.m3-sbox .ftA{margin-top:16px}
.m3-ml{display:flex;flex-direction:column;gap:6px;margin-top:8px}
.m3-ml button{display:flex;flex-direction:column;align-items:flex-start;gap:2px;text-align:left;border:1.5px solid #e1e0da;border-radius:11px;padding:8px 12px;background:#fff;cursor:pointer;font-family:inherit;width:100%;color:#1d2024}
.m3-ml button:hover{border-color:#134e5e;background:#f1f7f8}.m3-ml button span{font-size:12.5px;color:#6c7075}.m3-ml code{font-weight:800;color:#134e5e}
.m3-mr{display:flex;gap:6px;align-items:center}.m3-mr>button:first-child{flex:1}.m3-mr .m3-fx{width:auto;flex:none;border:0}
.m3-imgp{border:1px dashed #d9d8d2;border-radius:10px;min-height:80px;display:grid;place-items:center;overflow:hidden}.m3-imgp img{max-width:100%;max-height:180px;display:block}
@media (max-width:980px){.m3-bd{grid-template-columns:1fr;overflow:auto}.m3-l,.m3-r{overflow:visible}.m3-l{border-right:0}.m3-r{min-height:560px}.m3m{height:calc(100vh - 32px)}}
@media (max-width:600px){#layer.m3l{padding:0}.m3m{border-radius:0;height:100vh}.m3-two,.m3-opt{grid-template-columns:1fr}.m3-ft{gap:6px}}

/* ---------- Werbung › Mailings ---------- */
.m3-kt{margin:0 0 8px;font-size:13.5px}
.m3-ks{display:grid;grid-template-columns:repeat(6,1fr);gap:10px;margin-bottom:14px}
.m3-k{background:#fff;border:1px solid #ebeae5;border-radius:12px;padding:10px 12px}.m3-k small{display:block;color:#7a7e84;font-size:11px;font-weight:800;letter-spacing:.04em}.m3-k b{font-size:20px;display:block}.m3-k span{display:block;font-size:11.5px;color:#6c7075}
.m3-mls tr.m3-on td{background:#f1f7f8}
.m3-pill{border-radius:7px;padding:1px 8px;font-size:11.5px;font-weight:800;display:inline-block}.m3-pill.ok{background:#e3f4ea;color:#1f7a45}.m3-pill.pl{background:#e3eef8;color:#1d5d99}.m3-pill.dr{background:#ecebe6;color:#555}
@media (max-width:900px){.m3-ks{grid-template-columns:repeat(3,1fr)}}
@media (max-width:520px){.m3-ks{grid-template-columns:repeat(2,1fr)}}

/* ---------- Automatische Gutscheine ---------- */
.m3-ag{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:18px;align-items:start}
.m3-ac{background:#fff;border:1px solid #ebeae5;border-radius:16px;padding:18px}
.m3-ac.off .m3-3,.m3-ac.off .m3-opt,.m3-ac.off .m3-ck,.m3-ac.off .m3-ex{opacity:.6}
.m3-ach{display:flex;align-items:center;gap:12px;margin-bottom:10px}.m3-ach>div{flex:1}.m3-ach b{font-size:17px;display:block}.m3-ach small{color:#6c7075;font-size:13px}
.m3-aci{width:44px;height:44px;border-radius:12px;display:grid;place-items:center;font-size:20px;flex:none}
.m3-sw{position:relative;display:inline-flex;cursor:pointer}.m3-sw i{width:40px;height:22px;border-radius:12px}.m3-sw i:after{width:18px;height:18px}.m3-sw input:checked+i:after{left:20px}
.m3-3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:6px}.m3-span2{grid-column:span 2}
.m3-ac .in{width:100%;box-sizing:border-box}
.m3-vt{display:flex;gap:6px}.m3-vt>input{flex:1 1 50px;min-width:50px}.m3-vt>:not(input){flex:1 1 60px;min-width:0}
.m3-ro{display:flex;align-items:center;color:#4b4f55;background:#fafaf8}
.m3-ck{display:flex;align-items:center;gap:10px;font-size:13.5px;margin:8px 0;cursor:pointer}.m3-ck input{width:18px;height:18px;accent-color:#134e5e}
.m3-tx{display:flex;align-items:center;gap:8px;border:1.5px solid #d9d8d2;border-radius:11px;padding:4px 4px 4px 12px;min-height:40px;box-sizing:border-box}.m3-tx span{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px}
.m3-ex{background:#f1f7f8;border-radius:12px;padding:10px 12px;font-size:13px;color:#33373c;margin:10px 0}
.m3-ex code,.m3-code code{font-family:ui-monospace,Menlo,monospace}
.m3-ex code{border:1px dashed #e8a33a;background:#fff8ea;color:#8a5a00;border-radius:6px;padding:0 5px;font-weight:800}
.m3-3k{grid-template-columns:repeat(3,1fr);margin:6px 0}.m3-3k .m3-k{background:#f6f5f1;border:0}
.m3-cron{margin-top:18px}
.m3-code{display:flex;align-items:center;gap:8px;background:#f6f5f1;border:1px solid #ebeae5;border-radius:10px;padding:6px 6px 6px 12px}.m3-code code{flex:1;word-break:break-all;font-size:12.5px}
.m3-so{margin-top:6px}
@media (max-width:1500px){.m3-ag{grid-template-columns:minmax(0,1fr)}}
@media (max-width:600px){.m3-3{grid-template-columns:1fr}.m3-span2{grid-column:auto}}
.m3-ft>.m3-go{order:4}.m3-ft>.ft-c{order:3}
.m3m .ft-p,.m3-sbox .ft-p{background:#134e5e;border-color:#134e5e;color:#fff;border-radius:22px;font-weight:800;padding:9px 18px}
.m3m .ft-p:hover{background:#0f3f4c}.m3m .ft-p[disabled]{opacity:.5}.m3m .ft-p.armed{background:#b03a2e;border-color:#b03a2e}
.m3m .ft-c{border:0;background:none;font-weight:800;color:#1d2024}
