/* ZeroOps blog posts: list and WordPress-style editor */
.zb-muted { color: #6b778c; font-size: .86rem; }
.zi-tabs button small { margin-left: 4px; padding: 1px 7px; border-radius: 99px; background: #eef1f6; color: #5b6478; font-size: .72rem; }

/* List */
.zb-table td { vertical-align: top; }
.zb-thumb { width: 84px; }
.zb-thumb img, .zb-thumb span { display: block; width: 72px; height: 48px; border-radius: 8px; object-fit: cover; background: linear-gradient(135deg, #0d1b38, #145e66); }
.zb-row-title { display: block; color: #09152f; font-weight: 800; font-size: .95rem; text-decoration: none; }
.zb-row-title:hover { color: #087f77; }
.zb-table small { display: block; color: #6b778c; font-size: .76rem; margin-top: 3px; }
.zb-row-actions { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 6px; opacity: .55; transition: opacity .15s; }
.zb-table tr:hover .zb-row-actions, .zb-row-actions:focus-within { opacity: 1; }
.zb-row-actions a, .zb-row-actions button { padding: 0; border: 0; background: none; color: #1f4fa3; font: inherit; font-size: .76rem; font-weight: 700; text-decoration: none; cursor: pointer; }
.zb-row-actions .danger { color: #b0261e; }
@media (hover: none) { .zb-row-actions { opacity: 1; } }

/* Editor layout */
.zb-editor { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
.zb-main, .zb-side { display: grid; gap: 14px; min-width: 0; }
.zb-side { position: sticky; top: 76px; }
.zb-box { padding: 14px 16px; border: 1px solid #dce2ec; border-radius: 12px; background: #fff; }
.zb-box h3 { margin: 0 0 10px; color: #09152f; font-size: .86rem; }
.zb-box > input, .zb-box > textarea, .zb-field input, .zb-field textarea { width: 100%; min-height: 40px; padding: 8px 10px; border: 1px solid #cad5e0; border-radius: 8px; background: #fff; color: #09152f; font: inherit; font-size: .88rem; font-weight: 500; }
.zb-box textarea { resize: vertical; line-height: 1.5; }
.zb-field { display: grid; gap: 5px; margin-bottom: 10px; color: #4e5a6d; font-size: .74rem; font-weight: 800; }
.zb-field small { float: right; font-weight: 700; color: #6b778c; }
.zb-field small.warn { color: #b0261e; }
.zb-hint { margin: 4px 0 10px; color: #6b778c; font-size: .74rem; line-height: 1.45; }
.zb-line { margin: 0 0 10px; font-size: .84rem; color: #4e5a6d; }
.zb-actions { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin-top: 10px; }
.zb-publish .zb-actions .primary-button { margin-left: auto; }
.zb-link-danger { padding: 0; border: 0; background: none; color: #b0261e; font: inherit; font-size: .8rem; font-weight: 700; text-decoration: underline; cursor: pointer; }
.zb-msg { min-height: 1em; margin: 8px 0 0; color: #087f77; font-size: .8rem; font-weight: 700; }
.zb-msg a { color: inherit; }

.zb-title { width: 100%; padding: 6px 2px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: #09152f; font: inherit; font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; letter-spacing: -.02em; }
.zb-title:focus { outline: none; border-bottom-color: #05b1a5; }
.zb-permalink { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: -6px; color: #6b778c; font-size: .8rem; }
.zb-permalink input { min-width: 180px; flex: 1; max-width: 420px; padding: 4px 8px; border: 1px solid #dce2ec; border-radius: 6px; font: inherit; color: #09152f; }
.zb-permalink a { margin-left: 8px; color: #087f77; font-weight: 800; }
.zb-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 10px; background: #fff7e0; border: 1px solid #f2d27a; color: #6a4a00; font-size: .84rem; }
.zb-banner span { flex: 1; min-width: 200px; }

/* Toolbar + writing area */
.zb-write { padding: 0; overflow: visible; }
.zb-toolbar { position: sticky; top: 64px; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 6px 8px; border-bottom: 1px solid #e3e8f0; border-radius: 12px 12px 0 0; background: #f8fafc; }
.zb-toolbar button, .zb-toolbar select { min-width: 34px; height: 34px; padding: 0 8px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: #24324a; font: inherit; font-size: .9rem; line-height: 1; cursor: pointer; }
.zb-toolbar select { border-color: #dce2ec; background: #fff; font-size: .8rem; font-weight: 700; padding: 0 6px; }
.zb-toolbar button:hover { background: #e8edf5; }
.zb-toolbar button.on { background: #dff4f2; border-color: #9fdcd5; color: #075e57; }
.zb-toolbar button:disabled, .zb-toolbar select:disabled { opacity: .35; cursor: default; }
.zb-toolbar .zb-text-btn { font-size: .74rem; font-weight: 800; }
.zb-sep { width: 1px; height: 22px; margin: 0 4px; background: #dce2ec; }
.zb-grow { flex: 1; }
.zb-content { min-height: 460px; padding: 26px clamp(18px, 4vw, 48px) 40px; outline: none; }
.zb-content:empty::before { content: attr(data-placeholder); color: #9aa5b6; }
.zb-html { display: block; width: 100%; min-height: 460px; padding: 18px; border: 0; background: #0d1b38; color: #d7e3f2; font: .84rem/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; resize: vertical; }
.zb-statusbar { display: flex; justify-content: space-between; gap: 10px; padding: 8px 14px; border-top: 1px solid #e3e8f0; color: #6b778c; font-size: .74rem; }

/* Article typography in the editor, preview and revisions (matches the public blog) */
.zb-prose { color: #23324a; font-size: 1.04rem; line-height: 1.75; overflow-wrap: anywhere; }
.zb-prose > * { margin-top: 0; margin-bottom: 1em; }
.zb-prose li > p { margin: 0; }
.zb-prose h2 { margin: 1.6em 0 .4em; color: #10203e; font-size: 1.55rem; line-height: 1.2; }
.zb-prose h3 { margin: 1.4em 0 .3em; color: #10203e; font-size: 1.25rem; }
.zb-prose h4 { margin: 1.2em 0 .3em; color: #10203e; font-size: 1.05rem; }
.zb-prose a { color: #087e78; font-weight: 700; text-decoration: underline; }
.zb-prose ul, .zb-prose ol { padding-left: 1.4em; }
.zb-prose blockquote { margin: 1.4em 0; padding: 2px 0 2px 18px; border-left: 4px solid #2cc8bb; color: #10203e; font-size: 1.15rem; font-weight: 700; }
.zb-prose .callout { padding: 14px 16px; border-radius: 10px; background: #eaf6f4; font-size: .98rem; font-weight: 500; }
.zb-prose img { display: block; max-width: 100%; height: auto; margin: 1em auto; border-radius: 10px; cursor: pointer; }
.zb-prose figure { margin: 1.4em 0; }
.zb-prose figure img { margin: 0 auto; }
.zb-prose figcaption { margin-top: 6px; color: #6b788b; font-size: .84rem; text-align: center; }
.zb-prose img.img-wide { width: 100%; }
.zb-prose img.img-left { float: left; max-width: 45%; margin: .3em 1.2em .8em 0; }
.zb-prose img.img-right { float: right; max-width: 45%; margin: .3em 0 .8em 1.2em; }
.zb-prose img.zb-selected { outline: 3px solid #05b1a5; outline-offset: 2px; }
.zb-prose .align-center { text-align: center; }
.zb-prose .align-right { text-align: right; }
.zb-prose .align-justify { text-align: justify; }
.zb-prose hr { margin: 1.8em 0; border: 0; border-top: 1px solid #dbe4ec; clear: both; }
.zb-prose pre { padding: 14px; border-radius: 8px; background: #0d1b38; color: #e6edf6; font-size: .86rem; white-space: pre-wrap; }
.zb-prose code { padding: 1px 5px; border-radius: 4px; background: #eef2f7; }
.zb-prose table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.zb-prose th, .zb-prose td { min-width: 60px; padding: 8px 10px; border: 1px solid #dbe4ec; text-align: left; }
.zb-prose th { background: #f3f6fa; }
.zb-prose mark { background: #fff1a8; }
.zb-prose::after { content: ""; display: block; clear: both; }

/* Image toolbar */
.zb-imgbar { position: absolute; z-index: 40; display: flex; flex-wrap: wrap; gap: 2px; padding: 4px; border-radius: 9px; background: #09152f; box-shadow: 0 10px 30px rgba(5, 11, 28, .35); }
.zb-imgbar button { padding: 6px 9px; border: 0; border-radius: 6px; background: none; color: #fff; font: inherit; font-size: .74rem; font-weight: 700; cursor: pointer; }
.zb-imgbar button:hover { background: #ffffff1f; }
.zb-imgbar .danger { color: #ff9c94; }

/* Featured image */
.zb-featured img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; }
.zb-featured-empty { display: grid; justify-items: center; gap: 4px; width: 100%; padding: 22px 12px; border: 2px dashed #cad5e0; border-radius: 10px; background: #f8fafc; color: #24324a; font: inherit; font-size: .84rem; font-weight: 800; cursor: pointer; }
.zb-featured-empty span { font-size: 1.6rem; line-height: 1; color: #05b1a5; }
.zb-featured-empty small { color: #6b778c; font-weight: 500; font-size: .72rem; line-height: 1.4; }
.zb-featured-empty:hover { border-color: #05b1a5; background: #f0fbf9; }
.zb-box .zb-field:last-child { margin-bottom: 0; margin-top: 10px; }

/* Google preview */
.zb-serp { padding: 12px 14px; border: 1px solid #e3e8f0; border-radius: 10px; background: #fbfcfe; font-family: Arial, sans-serif; }
.zb-serp small { display: block; color: #202124; font-size: .78rem; }
.zb-serp strong { display: block; margin: 3px 0; color: #1a0dab; font-size: 1.05rem; font-weight: 400; }
.zb-serp span { display: block; color: #4d5156; font-size: .84rem; line-height: 1.45; }

/* Dialogs */
.zb-dialog.wide { width: min(1000px, calc(100vw - 20px)); }
.zb-media-top { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 14px; }
.zb-upload-label { cursor: pointer; }
.zb-media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; max-height: 60vh; overflow: auto; }
.zb-media-item { display: grid; gap: 4px; padding: 6px; border: 2px solid transparent; border-radius: 10px; background: #f3f6fa; font: inherit; text-align: left; cursor: pointer; }
.zb-media-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; }
.zb-media-item span { overflow: hidden; color: #4e5a6d; font-size: .7rem; white-space: nowrap; text-overflow: ellipsis; }
.zb-media-item:hover, .zb-media-item:focus-visible { border-color: #05b1a5; background: #f0fbf9; }
.zb-preview { max-width: 760px; margin: 0 auto; }
.zb-preview-hero { display: block; width: 100%; max-height: 380px; object-fit: cover; border-radius: 12px; }
.zb-preview-meta { margin: 16px 0 4px; color: #087e78; font-size: .74rem; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.zb-preview h1 { margin: 0 0 10px; color: #10203e; font-size: clamp(1.6rem, 3.4vw, 2.4rem); line-height: 1.12; }
.zb-preview-lede { margin: 0 0 20px; color: #4e5a6d; font-size: 1.1rem; line-height: 1.6; }
.zb-revs { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 16px; }
.zb-rev-list { display: grid; align-content: start; gap: 6px; max-height: 65vh; overflow: auto; }
.zb-rev-list button { display: grid; gap: 2px; padding: 10px; border: 1px solid #e3e8f0; border-radius: 8px; background: #fff; font: inherit; text-align: left; cursor: pointer; }
.zb-rev-list button.on { border-color: #05b1a5; background: #f0fbf9; }
.zb-rev-list strong { font-size: .8rem; }
.zb-rev-list small { color: #6b778c; font-size: .72rem; }
.zb-rev-view { max-height: 65vh; overflow: auto; }
.zb-rev-view .zb-actions { justify-content: flex-start; margin: 0 0 10px; }

/* Distraction-free writing */
.zb-editor.zb-focus { position: fixed; inset: 0; z-index: 60; display: block; overflow: auto; padding: 24px 16px 60px; background: #f3f5f9; }
.zb-editor.zb-focus .zb-side, .zb-editor.zb-focus .zb-main > section, .zb-editor.zb-focus .zb-permalink { display: none; }
.zb-editor.zb-focus .zb-main { max-width: 860px; margin: 0 auto; }
.zb-editor.zb-focus .zb-toolbar { top: -24px; }

@media (max-width: 1100px) {
  .zb-editor { grid-template-columns: 1fr; }
  .zb-side { position: static; }
}
@media (max-width: 820px) {
  .zb-toolbar { top: 56px; }
  .zb-content { min-height: 320px; padding: 18px 14px 28px; }
  .zb-revs { grid-template-columns: 1fr; }
  .zb-rev-list { max-height: 160px; }
  .zb-thumb { display: none; }
  .zb-table th:nth-child(3), .zb-table td:nth-child(3), .zb-table th:nth-child(6), .zb-table td:nth-child(6) { display: none; }
}
