/* css/content-builders.css
   Marketing -> Blog and Newsletter tabs (2026-10-28). Builds on the Website
   tab's aw-* classes (agent-website.css); cb-* adds the lists, topic cards,
   checklists and publish rows the two tabs share. */

.cb-list { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: #fff; }
.cb-row { display: flex; align-items: center; gap: 8px; padding-right: 12px; border-top: 1px solid var(--border); }
.cb-row:first-child { border-top: 0; }
.cb-row-open { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 12px 14px; font: inherit; text-align: left; background: none; border: 0; cursor: pointer; color: var(--ink); }
.cb-row-open:hover { background: #fafafa; }
.cb-row-open:focus-visible, .cb-topic:focus-visible, .cb-ph:focus-visible { outline: 2px solid var(--coral-500); outline-offset: 2px; }
.cb-row-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cb-row-t strong { font-size: 14px; }
.cb-row-t small { font-size: 14px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cb-del { white-space: nowrap; font-size: 14px; }
.cb-thumb { width: 64px; height: 44px; border-radius: 7px; overflow: hidden; flex: 0 0 auto; background: linear-gradient(150deg, #eceef1, #d7dbe0); display: inline-flex; align-items: center; justify-content: center; color: var(--coral-500); }
.cb-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cb-thumb.lg { width: 120px; height: 80px; }
.cb-thumb.nw { background: var(--coral-50); }
.cb-thumb svg { width: 20px; height: 20px; }
.cb-pill { flex: 0 0 auto; font-size: 13.5px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: #eef0f2; color: var(--dim); white-space: nowrap; }
.cb-pill.on { background: #e1f4f0; color: #00715f; }
.cb-pill.sched { background: #e8eefc; color: #2f4fa8; }
.cb-pill.bad { background: #fde7e2; color: #a4321b; }
.cb-warn { color: #a4321b !important; }
.cb-foot { margin-top: 12px; }
.cb-note { border: 1px solid #f3d3a8; background: #fff8ee; border-radius: 10px; padding: 12px 14px; font-size: 14.5px; line-height: 1.5; margin: 0 0 14px; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.cb-msg { font-size: 14.5px; margin: 12px 0 0; padding: 10px 12px; border-radius: 9px; background: #f4f5f7; color: var(--ink); }

/* Blog step 1: topic cards */
.cb-topics { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.cb-topic { font: inherit; text-align: left; border: 1px solid var(--border); background: #fff; border-radius: 12px; padding: 14px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; color: var(--ink); }
.cb-topic strong { font-size: 14px; }
.cb-topic span { font-size: 14px; color: var(--dim); line-height: 1.45; }
.cb-topic.on { border-color: var(--coral-300); background: var(--coral-50); box-shadow: inset 0 0 0 1px var(--coral-300); }
.cb-topic-extra { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; max-width: 640px; }
.cb-mk { margin: 0; }

/* Blog step 2: sections */
.cb-fields { display: flex; flex-direction: column; gap: 12px; }
.cb-sec { display: flex; flex-direction: column; gap: 6px; padding-top: 10px; border-top: 1px solid var(--border); }
.cb-sec-h { display: flex; gap: 8px; align-items: center; }
.cb-sec-h .aw-inp { flex: 1; font-weight: 700; }
.cb-prev-note { margin-left: auto; font-size: 14px; }

/* Blog step 3: photos */
.cb-cover { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 10px; display: block; margin: 0 0 10px; }
.cb-ph-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); gap: 6px; margin: 6px 0 10px; }
.cb-ph { padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; cursor: pointer; background: #eee; aspect-ratio: 4/3; }
.cb-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cb-ph.on { border-color: var(--coral-500); }
.cb-ph-actions { display: flex; align-items: center; gap: 10px; margin: 6px 0 10px; }

/* Step 4: publish / send */
.cb-pub { border: 1px solid var(--border); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 14px; background: #fff; margin-bottom: 14px; }
.cb-pub-sum { display: flex; gap: 14px; align-items: center; }
.cb-pub-sum strong { font-size: 16px; }
.cb-pub-sum p { margin: 2px 0; font-size: 14.5px; color: var(--dim); }
.cb-pub-sum small { font-size: 14px; color: var(--dim); }
.cb-pub-actions { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.cb-or { font-size: 14px; color: var(--dim); padding-bottom: 9px; }
.cb-when { display: flex; flex-direction: column; gap: 4px; }
.cb-when .aw-inp { width: auto; }
.cb-done { border-radius: 10px; padding: 12px 14px; background: #e9f6f3; margin-bottom: 14px; font-size: 14px; }
.cb-done.sched { background: #eef2fd; }
.cb-problems { margin: 0; padding-left: 18px; font-size: 14.5px; color: #a4321b; }

/* Newsletter: checklists and people */
.cb-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 900px) { .cb-cols { grid-template-columns: minmax(0, 1fr); } }
.cb-check { display: flex; align-items: flex-start; gap: 10px; padding: 9px 0; border-top: 1px solid #efeff2; cursor: pointer; }
.cb-check:first-of-type { border-top: 0; }
.cb-check input { margin-top: 3px; accent-color: var(--coral-500); }
.cb-check span { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cb-check strong { font-size: 14.5px; font-weight: 600; }
.cb-check small { font-size: 14px; color: var(--dim); }
.cb-count { font-size: 14px; color: var(--dim); white-space: nowrap; }
.cb-sum { margin: 0 0 8px; font-size: 14px; }
.cb-people { max-height: 320px; overflow-y: auto; border: 1px solid #efeff2; border-radius: 9px; }
.cb-person { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1.2fr); gap: 8px; align-items: center; padding: 7px 10px; font-size: 14px; border-top: 1px solid #f2f2f4; }
.cb-person:first-child { border-top: 0; }
.cb-person small { color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cb-person.off { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); color: var(--dim); background: #fafafa; }
.cb-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; margin-bottom: 14px; }
.cb-stat { border: 1px solid var(--border); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; }
.cb-stat b { font-size: 22px; }
.cb-stat span { font-size: 14px; color: var(--dim); }

/* Social calendar: blog and newsletter chips and filters */
.sp-filter { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.sp-filter button { font: inherit; font-size: 14px; font-weight: 700; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--border); background: #fff; color: var(--dim); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.sp-filter button i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.sp-filter button.on { color: var(--ink); border-color: #b9bcc3; background: #f4f5f7; }
.sp-filter button:not(.on) i { opacity: .35; }
.sp-chip-blog, .sp-chip-nl { display: block; width: 100%; text-align: left; font: inherit; font-size: 13.5px; line-height: 1.3; padding: 3px 6px; border-radius: 5px; margin-top: 3px; cursor: pointer; border: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Brand neutrals (2026-10-31, Mark): social = coral, blog = charcoal, newsletter = gray.
   Teal is kept for "done" states only. */
.sp-chip-blog { background: var(--light-gray); color: var(--ink); border-left: 3px solid var(--charcoal); }
.sp-chip-nl { background: var(--off-white); color: var(--charcoal); border-left: 3px solid var(--gray); box-shadow: inset 0 0 0 1px var(--light-gray); }
.sp-chip-blog[draggable="true"], .sp-chip-nl[draggable="true"] { cursor: grab; }
.sp-day-drop { outline: 2px dashed var(--coral-300); outline-offset: -2px; }
/* Newsletter: one page, the list under the builder (2026-11-25, Mark). */
.aw-card.nw-lib { margin-top: 16px; }
.cb-row.is-open { border-color: var(--coral-500, #D85A30); background: #FFF8F5; }

/* One-page builders (option 1, 2026-11-25, Mark): numbered step sections on
   the left (the open one shows its controls), live preview on the right. */
.aw-split.cb-one { grid-template-columns: minmax(0, 420px) minmax(0, 1fr); }
.aw-split.cb-one > .aw-right { position: sticky; top: 12px; }
.cb-sec { border: 1px solid var(--border, #E6E1DC); border-radius: 12px; background: #fff; overflow: hidden; }
.cb-sec.open { border-color: var(--coral-200, #EFB9A5); }
.cb-sec-h { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 0; background: none; font: inherit; text-align: left; cursor: pointer; color: var(--ink); }
.cb-sec-h:disabled { cursor: default; }
.cb-sec.locked .cb-sec-h { opacity: .6; }
.cb-sec-h:not(:disabled):hover { background: #FFF8F5; }
.cb-sec.open .cb-sec-h { background: #FFF8F5; border-bottom: 1px solid #F6DED4; }
.cb-sec-n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; font-size: 13px; font-weight: 800; background: #EEF0F3; color: var(--slate); }
.cb-sec.open .cb-sec-n { background: var(--coral-500, #D85A30); color: #fff; }
.cb-sec.done .cb-sec-n { background: var(--teal-600, #0F766E); color: #fff; }
.cb-sec-t { flex: 1; min-width: 0; }
.cb-sec-t b { display: block; font-size: 15px; font-weight: 800; }
.cb-sec-t small { display: block; font-size: 13px; color: var(--slate); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cb-sec-chev { color: var(--dim, #8A9099); display: inline-flex; transform: rotate(90deg); }
.cb-sec-chev .aw-ic { width: 16px; height: 16px; }
.cb-sec-b { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.cb-sec-b > .aw-actions { margin: 4px 0 0; padding: 12px 0 0; border-top: 1px solid #F2F3F5; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.cb-sec-next { display: flex; justify-content: flex-end; padding-top: 4px; }
.cb-sec-b .aw-acc { margin: 0; }
.cb-sec-b .cb-pub-actions { flex-wrap: wrap; }
@media (max-width: 1000px) { .aw-split.cb-one { grid-template-columns: minmax(0, 1fr); } .aw-split.cb-one > .aw-right { position: static; } }
.cb-sec-b .aw-acc-head { display: none; } /* the section header already names it */

/* Table look, like the website builder's "Customize your site" list
   (2026-11-25, Mark: rows in one card, not cards inside a card). */
.cb-steps .aw-acc-list > .cb-sec { border: 0; border-bottom: 1px solid var(--border, #E6E1DC); border-radius: 0; background: #fff; }
.cb-steps .aw-acc-list > .cb-sec:last-child { border-bottom: 0; }
.cb-steps .cb-sec.open { border-color: var(--border, #E6E1DC); }
.cb-steps .cb-sec-h { display: grid; grid-template-columns: 34px minmax(0, 1fr) 14px; gap: 12px; padding: 12px 18px; }
.cb-steps .cb-sec.open .cb-sec-h { background: color-mix(in srgb, var(--coral-50, #FBEAE4) 60%, transparent); border-bottom: 1px solid var(--border, #E6E1DC); }
.cb-steps .cb-sec-h:not(:disabled):hover { background: color-mix(in srgb, var(--coral-50, #FBEAE4) 45%, transparent); }
.cb-steps .cb-sec-n, .cb-steps .cb-sec.open .cb-sec-n, .cb-steps .cb-sec.done .cb-sec-n { position: relative; width: 34px; height: 34px; border-radius: 9px; background: var(--coral-50, #FBEAE4); color: var(--coral-500, #D85A30); }
.cb-steps .cb-sec-n .aw-ic { width: 17px; height: 17px; }
.cb-steps .cb-done { position: absolute; right: -5px; bottom: -5px; width: 16px; height: 16px; border-radius: 50%; background: var(--teal-600, #0F766E); color: #fff; font-style: normal; font-size: 10px; font-weight: 800; display: grid; place-items: center; box-shadow: 0 0 0 2px #fff; }
.cb-steps .cb-sec-t b { font-size: 14.5px; }
.cb-steps .cb-sec-t small { font-size: 14px; }
.cb-steps .cb-sec-chev { transform: none; }
.cb-steps .cb-sec.open .cb-sec-chev { transform: rotate(90deg); }
.cb-steps .cb-sec-b { padding: 14px 18px 16px; background: #fafafb; }
/* Inside an open step: no boxes in boxes. Lists run edge to edge as rows. */
.cb-steps .cb-sec-b .aw-acc { border: 0; border-radius: 0; background: transparent; margin: 0 -18px; border-top: 1px solid var(--border, #E6E1DC); border-bottom: 1px solid var(--border, #E6E1DC); }
.cb-steps .cb-sec-b .aw-acc .aw-group > summary { padding: 11px 18px; }
.cb-steps .cb-sec-b .aw-acc .aw-group-body { padding: 12px 18px 14px; background: #fff; }
.cb-steps .cb-sec-b .aw-chat, .aw-left .cb-steps .cb-sec-b .aw-chat { border: 0; background: transparent; padding: 0; }
.cb-steps .cb-sec-b > .aw-group, .cb-steps .cb-sec-b .aw-left-groups > .aw-group { border: 0; border-top: 1px solid var(--border, #E6E1DC); border-radius: 0; background: transparent; margin: 0 -18px; padding: 0 18px; }
.cb-steps .cb-sec-b > .aw-actions { margin-top: 2px; }
/* Flyer looks as a list: small thumbnail, name and description per row. */
.cb-steps .cb-sec-b .aw-tpl-groups { gap: 14px; }
.cb-steps .cb-sec-b .aw-tpl-grid, .cb-steps .cb-sec-b .aw-tpl-grid.aw-tpl-grid-5 { grid-template-columns: minmax(0, 1fr); gap: 0; border: 1px solid var(--border, #E6E1DC); border-radius: 10px; overflow: hidden; background: #fff; }
.cb-steps .cb-sec-b .fb-tpl { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; align-items: center; padding: 8px 12px; border: 0; border-top: 1px solid var(--border, #E6E1DC); border-radius: 0; background: #fff; text-align: left; box-shadow: none; }
.cb-steps .cb-sec-b .fb-tpl:first-child { border-top: 0; }
.cb-steps .cb-sec-b .fb-tpl.sel { background: #FFF8F5; box-shadow: inset 3px 0 0 var(--coral-500, #D85A30); }
.cb-steps .cb-sec-b .fb-tpl .fb-tpl-thumb { width: 40px; border-radius: 4px; overflow: hidden; border: 1px solid var(--border, #E6E1DC); }
.cb-steps .cb-sec-b .fb-tpl .aw-tpl-meta { padding: 0; display: flex; flex-direction: column; gap: 1px; }
.cb-steps .cb-sec-b .fb-tpl .aw-tpl-meta strong { font-size: 14px; }
.cb-steps .cb-sec-b .fb-tpl .aw-tpl-meta span { font-size: 13px; color: var(--slate); }
.cb-steps .cb-sec-b .fb-tpl .fb-tpl-thumb { border-bottom: 1px solid var(--border, #E6E1DC); }
.cb-steps .cb-sec-n i.cb-done { width: 16px !important; height: 16px !important; min-width: 0; padding: 0; margin: 0; line-height: 16px; }
