/* /frontend/comm/email/template-editor.css | TEST/STAGING */
*{box-sizing:border-box}body{margin:0;padding:20px;background:#f5f5f5;color:#222;font:15px Arial,sans-serif}main{max-width:1000px;margin:auto;background:#fff;padding:20px;border:1px solid #ccc;border-radius:8px}header,footer{display:flex;align-items:center;gap:12px}header img{width:36px;height:36px;object-fit:contain}h1{font-size:23px}h2{font-size:20px}label{display:block;margin:12px 0}input,select{display:block;width:100%;padding:9px;margin-top:5px;border:1px solid #aaa;border-radius:4px;font:inherit}button{cursor:pointer;border:1px solid #aaa;border-radius:5px;padding:9px;background:#f7f7f7;color:#222;font:inherit}#toolbar{display:flex;flex-wrap:wrap;gap:5px;margin:15px 0}#toolbar button{width:40px;height:40px;padding:7px}#toolbar svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.pickers{display:flex;gap:12px}.pickers label{flex:1;min-width:0}#editor{border:1px solid #aaa;padding:16px;min-height:400px;overflow:auto;overflow-wrap:anywhere}#editor table{max-width:100%}#editor td,#editor th{min-width:40px}footer{justify-content:flex-end;margin-top:15px}#save{background:#174b75;color:#fff}dialog{border:1px solid #888;border-radius:8px;width:min(550px,94vw);padding:20px}dialog::backdrop{background:#0008}#preview-dialog{width:min(1000px,94vw)}#preview-frame{width:100%;height:65vh;border:1px solid #ccc}#close-preview{margin-left:auto}.table-resize{position:absolute;z-index:10;width:25px;height:25px;padding:0;background:#174b75;color:#fff;cursor:nwse-resize;touch-action:none}.table-resize[hidden]{display:none}@media(max-width:600px){body{padding:8px}main{padding:12px}.pickers{flex-direction:column;gap:0}h1{font-size:19px}}


#toolbar{gap:10px;align-items:flex-start}.toolbar-group{display:flex;flex-wrap:nowrap;gap:5px;flex:0 0 auto}.microphone-group{margin-left:auto}#toolbar .recording{background:#c62828;color:#fff;border-color:#c62828}#editor [data-email-button]{cursor:grab;vertical-align:middle}#editor [data-email-button] a{pointer-events:auto}#editor .email-button-selected{outline:2px solid #ed7c2d;outline-offset:2px}.table-edge-handle{position:absolute;z-index:20;touch-action:none;background:transparent}.table-edge-handle:hover{background:#ed7c2d66}#editor table{table-layout:fixed}#editor td,#editor th{overflow-wrap:anywhere}

#editor.save-success{background:#e1f3df}#editor.save-error{background:#ffe1e6}#editor [data-email-button] a{cursor:grab}#editor [data-email-button] a[contenteditable="true"]{cursor:text;outline:2px solid #ed7c2d}

/* Contextual table controls are outside the saved email body. */
#table-controls[hidden]{display:none!important}#table-controls{position:sticky;top:0;z-index:25;background:#eef3f7;border:1px solid #aaa;border-bottom:0;padding:10px;display:flex;flex-wrap:wrap;align-items:center;gap:10px}#table-cell-label{font-size:14px;white-space:nowrap}.table-control-actions{display:flex;flex-wrap:wrap;gap:10px}#table-controls button{background:#fff;min-height:38px;padding:8px 10px}#table-controls button[data-table-action^="delete"]{color:#9a331e;border-color:#b65c47}#table-controls button:disabled{opacity:.5;cursor:default}@media(max-width:600px){#table-controls{position:static}.table-control-actions{width:100%}#table-controls button{flex:1 1 130px}}

#button-controls[hidden]{display:none!important}#button-controls{display:flex;align-items:center;flex-wrap:wrap;gap:10px;background:#fff1e8;border:1px solid #b65c47;padding:10px}#delete-email-button{background:#fff;color:#9a331e;border-color:#b65c47}

/* Every email button label stays bold white in every interaction state. */
#editor [data-email-button] a,#editor [data-email-button] a:link,#editor [data-email-button] a:visited,#editor [data-email-button] a:hover,#editor [data-email-button] a:active,#editor [data-email-button] a:focus,#editor [data-email-button] a span{color:#ffffff!important;font-weight:bold!important;text-decoration:none!important}
