/* Shared canvas email editor chrome (#3418) — the parent-page styles for
   every visual email editor surface (campaigns message editor, settings
   email templates): toolbar, subject bar, canvas shell, popovers. Loaded
   by both pages; the in-iframe styles live in email-canvas-edit.js. */

/* ---- Canvas editor (#3341) — the email IS the editor ---- */
.cd-toolbar { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; padding-bottom: 10px; border-bottom: 1px solid #eef1f4; margin-bottom: 12px; }
.cd-tb-btn { border: none; background: transparent; color: #33475b; width: 32px; height: 32px; border-radius: 7px; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.cd-tb-btn:hover { background: #eef3fb; color: #0d3b66; }
.cd-tb-sep { width: 1px; height: 20px; background: #e2e8f0; margin: 0 6px; }
.cd-tb-test { white-space: nowrap; }
.cd-tb-select { border: 1px solid #dfe4e9; border-radius: 7px; height: 32px; font-size: 12.5px; color: #33475b; background: #fff; padding: 0 8px; cursor: pointer; }
.cd-tb-color { position: relative; overflow: hidden; cursor: pointer; }
.cd-tb-color input[type="color"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; border: none; padding: 0; }
.cd-tb-color::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: 5px; height: 3px; border-radius: 2px; background: linear-gradient(90deg, #e11d48, #f59e0b, #10b981, #2563eb); }
/* Size + text color are selection tools (#3359): greyed and inert until the
   caret sits in a text section on the canvas (same 0.65 as .btn:disabled). */
.cd-tb-select:disabled, .cd-tb-color.disabled { opacity: 0.65; pointer-events: none; }

/* Subject bar — reads like the email client header above the message. */
.cd-subject-bar { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid #dfe4e9; border-bottom: none; border-radius: 12px 12px 0 0; padding: 12px 18px; max-width: 720px; margin: 0 auto; }
.cd-subject-label { flex: 0 0 auto; margin: 0; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: #8aa0b5; }
.cd-subject-input { flex: 1 1 auto; min-width: 0; border: none; outline: none; background: transparent; font-size: 15px; font-weight: 600; color: #1f2d3d; padding: 0; }
.cd-subject-input::placeholder { color: #a5b3c1; font-weight: 400; }

/* The canvas: grey email-client backdrop, real email centered inside. */
.cd-canvas-shell { background: #e9edf2; border: 1px solid #dfe4e9; border-radius: 0 0 12px 12px; padding: 0; max-width: 720px; margin: 0 auto; }
.cd-canvas-frame { display: block; width: 100%; border: none; min-height: 480px; height: 640px; border-radius: 0 0 12px 12px; background: transparent; }

.cd-upl-busy { font-size: 12.5px; color: #5a6b7b; display: flex; align-items: center; gap: 7px; margin-top: 6px; }

/* Popovers (button/link editing, add-block menu) — parent-page chrome. */
.cd-popover { position: fixed; z-index: 1080; background: #fff; border: 1px solid #dfe4e9; border-radius: 10px; box-shadow: 0 10px 26px rgba(13, 42, 74, .18); padding: 12px; min-width: 300px; }
.cd-pop-row { margin-bottom: 10px; }
.cd-pop-row label { display: block; font-size: 11.5px; font-weight: 600; color: #5a6b7b; margin-bottom: 4px; }
.cd-pop-row .form-control { margin-bottom: 0; }
.cd-pop-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.cd-pop-item { border: none; background: transparent; text-align: left; width: 100%; font-size: 12.5px; color: #23384d; border-radius: 7px; padding: 7px 10px; display: flex; align-items: center; gap: 8px; cursor: pointer; }
.cd-pop-item:hover { background: #f1f5f9; }
.cd-pop-item .fas { width: 14px; color: #8aa0b5; font-size: 11px; }

/* Personalize picker (merge tags) — same look on every canvas host page.
   (Campaigns pages also carry these via campaigns.css; keep in sync.) */
.cc-tagchip { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; color: #0d3b66; background: #eef4fa; border-radius: 5px; padding: 0 4px; }
.cc-pers-btn { display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 1px solid #c9d4de; color: #0d3b66; border-radius: 9px; padding: 6px 11px; font-size: 12px; font-weight: 600; cursor: pointer; }
.cc-pers-menu { margin-top: 6px; background: #fff; border: 1px solid #ebebeb; border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.08); padding: 6px; max-width: 340px; position: absolute; z-index: 1050; }
.cc-pers-menu .cc-pm { padding: 6px 10px; font-size: 12px; border-radius: 6px; display: flex; justify-content: space-between; gap: 14px; cursor: pointer; }
.cc-pers-menu .cc-pm:hover { background: #f4f8fc; }
.cc-pers-menu .cc-pm .cc-pm-d { color: var(--ed-text-muted); font-size: 11px; }
.cc-pm { width: 100%; border: none; background: none; font: inherit; text-align: left; }
