/* Criar Convites — customer-facing styles.
   Visual identity mirrors loja.criarconvites.com so the editor feels like the
   store: Montserrat, store gold #AD9F62, near-black #141316, white surfaces on
   #F5F5F5 neutrals, pill buttons. Canvas artwork keeps its own template fonts. */

@font-face {
  font-family: "Montserrat";
  src: url("fonts/Montserrat-Variable.ttf") format("truetype-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* store brand (extracted live from loja.criarconvites.com) */
  --ink: #141316;
  --ink-soft: #56545e;
  --gold: #AD9F62;
  --gold-deep: #8f8250;
  --gold-soft: #f4f1e6;
  --paper: #F5F5F5;
  --paper-2: #ececec;
  --card: #ffffff;
  --line-warm: #E5E5E5;
  /* editor workspace */
  --canvas: #f0f0f2;
  --surface: #ffffff;
  --line: #E5E5E5;
  --hover: #F5F5F5;
  --muted: #56545e;
  --danger: #E50F38;
  --ok: #2f7d52;
  --ui: "Montserrat", "Segoe UI", system-ui, -apple-system, sans-serif;
  --sh-1: 0 1px 2px rgba(20,19,22,.05), 0 4px 16px rgba(20,19,22,.07);
  --sh-2: 0 2px 8px rgba(20,19,22,.10), 0 18px 44px rgba(20,19,22,.16);
  --shadow-soft: 0 2px 6px rgba(20,19,22,.06), 0 18px 50px rgba(20,19,22,.10);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
/* The JS shows/hides elements via the `hidden` attribute. Any class that sets
   `display` (.ed-modal, .ed-pager, …) would silently override it — this rule
   guarantees `hidden` always wins (fixes the review modal stuck open). */
[hidden] { display: none !important; }
body {
  font-family: var(--ui);
  color: #222222;
  background: var(--paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--gold); outline-offset: 2px;
}

.wordmark { font-family: var(--ui); font-size: 16px; letter-spacing: .12em; font-weight: 900; color: var(--ink); text-transform: uppercase; }
.wordmark.sm { font-size: 13px; letter-spacing: .1em; }
.kicker {
  font-family: var(--ui); text-transform: uppercase; letter-spacing: .2em;
  font-size: 12px; color: var(--gold-deep); margin: 18px 0 4px;
}
.lead { color: var(--ink-soft); margin: 6px 0 18px; }
.fineprint { font-family: var(--ui); font-size: 12.5px; color: var(--ink-soft); margin-top: 16px; }
.center { text-align: center; }

/* ---------- shared bits ---------- */
.paper-card {
  background: var(--card); border: 1px solid var(--line-warm); border-radius: 16px;
  padding: 30px 28px; box-shadow: var(--shadow-soft);
}
label {
  display: block; font-family: var(--ui); font-size: 12px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink-soft); margin: 16px 0 6px;
}
input[type=text], input[type=email], input[type=file], textarea {
  width: 100%; padding: 12px 13px; border: 1px solid var(--line); border-radius: 10px;
  font-family: var(--ui); font-size: 16px; background: #fff; color: var(--ink);
}
textarea { min-height: 88px; resize: vertical; }
input:focus, textarea:focus { outline: 2px solid var(--gold); border-color: var(--gold); }

.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  cursor: pointer; border: none; border-radius: 999px;
  background: var(--gold); color: #fff; padding: 13px 24px;
  font-family: var(--ui); font-size: 15px; font-weight: 700; letter-spacing: .02em;
  transition: background .15s, opacity .15s, box-shadow .15s;
}
.btn-primary:hover { background: var(--gold-deep); box-shadow: 0 2px 10px rgba(173,159,98,.4); }
.btn-primary.sm { padding: 9px 18px; font-size: 14px; }
.btn-primary:disabled { opacity: .4; cursor: not-allowed; box-shadow: none; }
.btn-ghost {
  cursor: pointer; border: 1px solid var(--line); background: transparent; color: var(--ink);
  border-radius: 999px; padding: 13px 22px; font-family: var(--ui); font-size: 15px; font-weight: 500;
}
.btn-ghost:hover { background: var(--hover); }

.msg { border-radius: 10px; padding: 11px 13px; font-family: var(--ui); font-size: 14px; margin: 12px 0; }
.msg.err { background: #f6e3e1; color: var(--danger); }
.msg.ok { background: #e6f3ec; color: var(--ok); }
.hint { font-family: var(--ui); font-size: 13px; color: var(--muted); }

/* ---------- lookup + locked pages (store-white look) ---------- */
.lookup-shell, .locked-shell {
  min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background: var(--paper);
}
.lookup-shell .paper-card, .locked-shell .paper-card { width: 100%; max-width: 430px; }
.lookup-form .btn-primary { width: 100%; margin-top: 20px; }
.locked-check {
  width: 64px; height: 64px; margin: 18px auto 8px; border-radius: 50%;
  background: var(--gold); color: #fff; font-size: 34px; display: grid; place-items: center;
}
.locked-title { font-weight: 800; font-size: 24px; margin: 8px 0; color: var(--ink); }

/* ============================ EDITOR ============================ */
.editor-page { background: var(--canvas); font-family: var(--ui); }

/* ---- announcement strip (mirrors the store's black top bar) ---- */
.ed-announce { background: var(--ink); color: #fff; text-align: center;
  font: 700 10.5px/2.7 var(--ui); letter-spacing: .18em; text-transform: uppercase; }

/* ---- top bar ---- */
.ed-top { position: sticky; top: 0; z-index: 20; background: var(--surface);
  border-bottom: 1px solid var(--line); }
.ed-top-in { padding: 8px 18px; display: flex; align-items: center; gap: 14px; }
.ed-top-in .wordmark { flex: 1; }
.ed-save { font-family: var(--ui); font-size: 12.5px; color: var(--muted); min-width: 64px;
  text-align: right; display: inline-flex; align-items: center; justify-content: flex-end; gap: 5px; }
.ed-save.ok { color: var(--ok); }
.ed-save.ok::before { content: '✓'; font-size: 12px; }
@media (max-width: 480px) {
  .ed-top-in .wordmark { display: none; }
  .ed-top-in { gap: 8px; }
  .ed-save { flex: 1; }
}

/* ---- icon buttons + tooltips (Canva-style toolbar language) ---- */
.ed-ib {
  flex: none; width: 34px; height: 34px; display: inline-grid; place-items: center;
  border: none; background: transparent; border-radius: 9px; color: #42454f;
  cursor: pointer; padding: 0; transition: background .12s, color .12s;
}
.ed-ib:hover { background: var(--hover); color: var(--ink); }
.ed-ib.active { background: var(--gold-soft); color: var(--gold-deep); }
.ed-ib svg { width: 18px; height: 18px; display: block; }
.ed-ib:disabled { opacity: .35; cursor: default; background: transparent; }

[data-tip] { position: relative; }
@media (hover: hover) {
  [data-tip]:hover::after, [data-tip]:focus-visible::after {
    content: attr(data-tip); position: absolute; bottom: calc(100% + 8px); left: 50%;
    transform: translateX(-50%); background: #23252e; color: #fff;
    font: 500 11.5px/1 var(--ui); padding: 6px 9px; border-radius: 7px;
    white-space: nowrap; z-index: 70; pointer-events: none;
    box-shadow: 0 2px 8px rgba(0,0,0,.25);
  }
}

/* the side rails scroll with slim, quiet scrollbars */
.ed-tpl, .ed-fields { scrollbar-width: thin; scrollbar-color: #c9cbd6 transparent; }
.ed-tpl::-webkit-scrollbar, .ed-fields::-webkit-scrollbar { width: 6px; }
.ed-tpl::-webkit-scrollbar-thumb, .ed-fields::-webkit-scrollbar-thumb {
  background: #c9cbd6; border-radius: 999px; }
.ed-tpl::-webkit-scrollbar-track, .ed-fields::-webkit-scrollbar-track { background: transparent; }

/* ---- workspace grid: templates rail · canvas · fields panel ---- */
.ed-main.canva { max-width: 1560px; margin: 0 auto; padding: 20px 18px 60px;
  display: grid; grid-template-columns: 248px minmax(0, 1fr) 292px; gap: 20px; align-items: start; }
/* product without design variations: the templates rail is hidden */
.ed-main.canva.no-tpl { grid-template-columns: minmax(0, 1fr) 292px; }

/* ---- templates rail (left) ---- */
.ed-tpl { background: var(--surface); border-radius: 16px;
  padding: 16px; box-shadow: var(--sh-1); position: sticky; top: 72px;
  max-height: calc(100vh - 92px); overflow-y: auto; }
.ed-tpl-head { display: flex; align-items: center; justify-content: space-between; }
.ed-tpl-head h2 { margin: 0; font: 800 14px var(--ui); letter-spacing: .02em; text-transform: uppercase; }
.ed-tpl-close { display: none; width: 32px; height: 32px; background: none; border: none;
  border-radius: 9px; cursor: pointer; color: var(--muted); place-items: center; }
.ed-tpl-close:hover { background: var(--hover); color: var(--ink); }
.ed-tpl-close svg { width: 16px; height: 16px; display: block; }
.ed-tpl-hint { font-size: 12px; color: var(--muted); margin: 6px 0 14px; }
.ed-tpl-list { display: flex; flex-direction: column; gap: 14px; }
.ed-tpl-card { position: relative; display: block; width: 100%; padding: 0; border: none;
  border-radius: 12px; overflow: hidden; background: #fff; cursor: pointer; text-align: left;
  box-shadow: 0 0 0 1px var(--line); transition: box-shadow .15s, transform .15s; }
.ed-tpl-card:hover { box-shadow: 0 0 0 2px var(--gold), var(--sh-1); transform: translateY(-1px); }
.ed-tpl-card img { display: block; width: 100%; height: auto; }
.ed-tpl-card .ed-tpl-cap { display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding: 8px 10px; font-size: 12.5px; color: var(--ink); }
.ed-tpl-card.current { box-shadow: 0 0 0 2px var(--gold); cursor: default; transform: none; }
.ed-tpl-tag { flex: none; font-size: 10px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--gold-deep); background: var(--gold-soft);
  padding: 3px 8px; border-radius: 999px; }
.ed-tpl-badge { position: absolute; top: 8px; right: 8px; width: 24px; height: 24px;
  border-radius: 50%; background: var(--gold); color: #fff; display: grid; place-items: center;
  box-shadow: 0 1px 5px rgba(0,0,0,.3); }
.ed-tpl-badge svg { width: 13px; height: 13px; }
.ed-tpl-toggle { display: none; align-items: center; gap: 7px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px;
  font: 500 13px var(--ui); color: var(--ink); cursor: pointer; }
.ed-tpl-toggle svg { width: 16px; height: 16px; }
.ed-tpl-toggle:hover { background: var(--hover); }

/* ---- fields panel (right) ---- */
.ed-fields { background: var(--surface); border-radius: 16px;
  padding: 16px; box-shadow: var(--sh-1); position: sticky; top: 72px;
  max-height: calc(100vh - 92px); overflow-y: auto; }
.ed-fields-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.ed-fields-head h2 { margin: 0; font: 800 14px var(--ui); letter-spacing: .02em; text-transform: uppercase; }
.ed-fields-progress { font: 600 12px var(--ui); color: var(--muted); font-variant-numeric: tabular-nums; }
.ed-fields-progress.complete { color: var(--ok); }
.ed-bar { height: 4px; background: var(--canvas); border-radius: 999px; margin: 10px 0 6px; overflow: hidden; }
.ed-bar i { display: block; height: 100%; width: 0; background: var(--gold); border-radius: 999px;
  transition: width .3s ease; }
.ed-fields-hint { font-size: 12px; color: var(--muted); margin: 6px 0 12px; }
.ed-fields-list { display: flex; flex-direction: column; gap: 2px; }
.ed-field-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  border: none; background: transparent; color: var(--ink);
  border-radius: 10px; padding: 8px 9px; font-family: var(--ui);
  font-size: 13px; cursor: pointer; transition: background .12s, box-shadow .12s; }
.ed-field-item:hover { background: var(--hover); }
.ed-field-item.active { background: var(--gold-soft); box-shadow: inset 0 0 0 1.5px var(--gold); }
.ed-field-status { flex: none; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--canvas); color: var(--muted); }
.ed-field-status svg { width: 13px; height: 13px; display: block; }
.ed-field-item.done .ed-field-status { background: #e6f3ec; color: var(--ok); }
.ed-field-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-field-page { flex: none; font-size: 11px; color: var(--muted); }

@media (max-width: 1100px) {
  .ed-main.canva { grid-template-columns: 1fr; }
  .ed-tpl-toggle { display: inline-flex; }
  .ed-tpl { position: fixed; inset: auto 0 0 0; top: 54px; z-index: 40;
    border-radius: 20px 20px 0 0; box-shadow: 0 -8px 40px rgba(24,26,36,.25);
    max-height: none; transform: translateY(105%); transition: transform .25s ease; }
  .ed-tpl::before { content: ''; display: block; width: 40px; height: 4px; border-radius: 999px;
    background: var(--line); margin: 0 auto 12px; }
  .ed-tpl.open { transform: translateY(0); }
  .ed-tpl-close { display: grid; }
  .ed-tpl-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  /* the fields panel flows under the canvas as a normal card */
  .ed-fields { position: static; max-height: none; }
}

/* ---- stage: the invitation floats on the grey canvas, Canva-style ---- */
.ed-stage-col { position: sticky; top: 72px; }
@media (max-width: 1100px) { .ed-stage-col { position: static; } }
.ed-stage-wrap { position: relative; padding: 6px 0; }
/* the viewport scrolls; zooming widens the stage inside it */
.ed-viewport { overflow: auto; border-radius: 8px; touch-action: pan-x pan-y;
  max-height: max(420px, calc(100vh - 300px));
  scrollbar-width: thin; scrollbar-color: #c9cbd6 transparent; }
.ed-viewport::-webkit-scrollbar { width: 6px; height: 6px; }
.ed-viewport::-webkit-scrollbar-thumb { background: #c9cbd6; border-radius: 999px; }
@media (max-width: 1100px) { .ed-viewport { max-height: none; } }
.ed-stage { position: relative; max-width: 780px; margin: 0 auto; }

/* zoom control (bottom-right of the canvas) */
.ed-zoomctl { position: absolute; right: 10px; bottom: 16px; z-index: 25;
  display: flex; align-items: center; gap: 2px; background: var(--surface);
  border-radius: 999px; padding: 3px; box-shadow: var(--sh-2);
  border: 1px solid rgba(20,19,22,.06); }
.ed-zoomctl .ed-ib { width: 30px; height: 30px; }
.ed-zoom-pct { border: none; background: transparent; font: 700 12px var(--ui);
  color: var(--ink); min-width: 48px; cursor: pointer; border-radius: 999px;
  padding: 6px 4px; font-variant-numeric: tabular-nums; }
.ed-zoom-pct:hover { background: var(--hover); }
.ed-page {
  position: relative; width: 100%; background-size: 100% 100%; background-repeat: no-repeat;
  background-color: #fff; overflow: hidden;
  box-shadow: 0 3px 10px rgba(24,26,36,.10), 0 18px 50px rgba(24,26,36,.16);
}

/* Text zones are tappable (focus their field) and never clip: if text can't
   fit even after auto-shrink it overflows visibly — same truth as the print.
   They can also be dragged to move; touch-action:none keeps pointer events. */
.z-text { position: absolute; display: flex; flex-direction: column; overflow: visible; pointer-events: auto; cursor: text; touch-action: none; }
/* switched off ("Usar mensagem"): gone from the canvas until Restaurar */
.z-text.off { display: none; }
.z-text:hover { outline: 1.5px dashed rgba(201,162,39,.9); outline-offset: 2px; }
.z-text.empty { outline: 1.5px dashed rgba(201,162,39,.5); outline-offset: 2px; min-height: 10px; }
.z-text.blank { outline: 1.5px dashed rgba(201,162,39,.45); outline-offset: 2px; min-height: 10px; }
.z-text-in { width: 100%; display: block; }
.z-text.empty .z-text-in::after { content: ''; }
/* ghost label inside an empty required zone — the zone's own font, faded */
.z-text.ghost .z-text-in { opacity: .38; }

/* Canva-like selection state */
.z-text.selected, .z-photo.selected { outline: 2px solid var(--gold); outline-offset: 2px; }
.z-text.selected { cursor: move; }

/* resize handles (on the selected text zone); centre-anchored resize */
.z-handle { position: absolute; width: 12px; height: 12px; background: #fff;
  border: 1.5px solid var(--gold); border-radius: 50%; z-index: 6; touch-action: none;
  box-shadow: 0 1px 4px rgba(24,26,36,.35); }
.z-h-nw { left: -7px;  top: -7px;    cursor: nwse-resize; }
.z-h-ne { right: -7px; top: -7px;    cursor: nesw-resize; }
.z-h-sw { left: -7px;  bottom: -7px; cursor: nesw-resize; }
.z-h-se { right: -7px; bottom: -7px; cursor: nwse-resize; }
.z-h-e  { right: -7px; top: calc(50% - 6px); cursor: ew-resize; }
.z-h-w  { left: -7px;  top: calc(50% - 6px); cursor: ew-resize; }
/* fingers need bigger targets than mouse pointers */
@media (pointer: coarse) {
  .z-handle { width: 20px; height: 20px; }
  .z-h-nw { left: -11px;  top: -11px; }
  .z-h-ne { right: -11px; top: -11px; }
  .z-h-sw { left: -11px;  bottom: -11px; }
  .z-h-se { right: -11px; bottom: -11px; }
  .z-h-e  { right: -11px; top: calc(50% - 10px); }
  .z-h-w  { left: -11px;  top: calc(50% - 10px); }
}

.z-photo { position: absolute; overflow: hidden; cursor: grab; touch-action: none; }
.z-photo.has-photo { cursor: grab; }
.z-photo:active { cursor: grabbing; }
.z-photo-img { position: absolute; left: 0; top: 0; max-width: none; user-select: none; -webkit-user-drag: none; }
.z-photo-hint {
  position: absolute; inset: 0; display: grid; place-content: center; justify-items: center;
  gap: 6px; text-align: center;
  font: 500 13px var(--ui); color: var(--muted);
  background: rgba(255,255,255,.65); padding: 8px;
}
.z-photo-hint svg { width: 22px; height: 22px; color: var(--gold-deep); }
.z-photo.has-photo .z-photo-hint { display: none; }

/* ---- pager: page thumbnail strip under the canvas (Canva's "Páginas") ---- */
.ed-pager { display: flex; align-items: center; justify-content: center; gap: 10px;
  margin: 16px auto 0; width: fit-content; background: var(--surface);
  border-radius: 14px; padding: 8px; box-shadow: var(--sh-1); }
.ed-thumb { position: relative; height: 64px; border: none; padding: 0; cursor: pointer;
  background-size: cover; background-position: center; background-color: #fff;
  border-radius: 8px; overflow: hidden; box-shadow: 0 0 0 1px var(--line);
  transition: box-shadow .12s, transform .12s; }
.ed-thumb:hover { box-shadow: 0 0 0 2px var(--gold), var(--sh-1); transform: translateY(-1px); }
.ed-thumb.active { box-shadow: 0 0 0 2px var(--gold); transform: none; }
.ed-thumb-n { position: absolute; left: 4px; bottom: 4px; min-width: 16px; height: 16px;
  padding: 0 4px; border-radius: 6px; background: rgba(20,19,22,.75); color: #fff;
  font: 700 10px/16px var(--ui); text-align: center; }

.counter { font-family: var(--ui); font-size: 12px; color: var(--muted); margin-top: 4px; text-align: right; }
input[type=range] { width: 100%; accent-color: var(--gold); }
.loading { color: var(--muted); font-family: var(--ui); }

/* ---- docked context toolbar (appears above the canvas on select) ---- */
.ed-ctx { display: flex; align-items: center; gap: 2px; flex-wrap: wrap;
  background: var(--surface); border-radius: 12px; box-shadow: var(--sh-1);
  padding: 6px 10px; margin-bottom: 12px; min-height: 46px; font-family: var(--ui); }
.ed-ctx-label { font: 700 11px var(--ui); letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); margin-right: 6px; max-width: 150px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-ctx-hint { font: 500 12.5px var(--ui); color: #9a9daa; padding: 8px 4px; }
.ed-ctx-btn { display: inline-flex; align-items: center; gap: 7px; border: none;
  background: var(--ink); color: #fff; border-radius: 999px; padding: 8px 14px;
  font: 700 12.5px var(--ui); cursor: pointer; }
.ed-ctx-btn:hover { opacity: .92; }
.ed-ctx-btn svg { width: 15px; height: 15px; }
.ed-ctx input[type=range] { flex: 1; min-width: 90px; max-width: 220px; }
@media (max-width: 1100px) {
  /* on phones the toolbar docks to the bottom of the screen (always there) */
  .ed-ctx { position: fixed; left: 8px; right: 8px; bottom: 8px; z-index: 45; margin: 0;
    box-shadow: 0 -4px 30px rgba(20,19,22,.25), var(--sh-1); }
  /* keep page content clear of the fixed bar */
  .ed-main.canva { padding-bottom: 130px; }
}

/* ---- zone group (event block): outline + move-together grip ---- */
.z-group { position: absolute; z-index: 4; pointer-events: none;
  border: 1.5px dashed rgba(173,159,98,.65); border-radius: 6px; }
.z-group-grip { position: absolute; top: -8px; left: 50%;
  transform: translate(-50%, -100%); pointer-events: auto; touch-action: none;
  width: 30px; height: 30px; border-radius: 999px; cursor: move;
  background: var(--surface); color: #42454f; border: 1px solid rgba(20,19,22,.08);
  box-shadow: var(--sh-2); display: grid; place-items: center; padding: 0; }
.z-group-grip svg { width: 15px; height: 15px; }
.z-group-grip:hover { color: var(--gold-deep); }

/* ---- secondary-actions pill under the selection ---- */
.ed-pill { position: absolute; z-index: 31; display: flex; gap: 2px;
  background: var(--surface); border-radius: 999px; padding: 3px;
  box-shadow: var(--sh-2); border: 1px solid rgba(20,19,22,.06); }
.ed-pill .ed-ib { width: 30px; height: 30px; }
/* labeled pill action ("Usar mensagem") — text visible, works without hover */
.ed-pill .ed-ib-labeled { width: auto; display: inline-flex; align-items: center;
  gap: 6px; padding: 0 12px 0 9px; font: 500 12.5px var(--ui); }
.ed-pill .ed-ib-labeled span { white-space: nowrap; }

/* ---- inline text editing on the canvas ---- */
.z-text.editing { cursor: text; }
.z-text-in[contenteditable] { outline: none; caret-color: var(--gold-deep); }

/* ---- floating edit popup (living sentences only) ---- */
.ed-pop { position: absolute; z-index: 30; width: min(340px, calc(100% - 12px));
  background: var(--surface); border: 1px solid rgba(24,26,36,.06); border-radius: 14px;
  box-shadow: var(--sh-2); padding: 10px 12px 12px; font-family: var(--ui); }
.ed-pop-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.ed-pop-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.ed-pop-ok { width: 30px; height: 30px; border-radius: 50%; background: var(--gold); color: #fff; }
.ed-pop-ok:hover { background: var(--gold-deep); color: #fff; }
.ed-pop-ok svg { width: 15px; height: 15px; }
.ed-pop-body label { display: block; font-size: 11px; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted); margin: 8px 0 4px; }
.ed-pop-body input[type=text], .ed-pop-body textarea {
  width: 100%; border: 1.5px solid transparent; border-radius: 10px; padding: 9px 11px;
  font-family: var(--ui); font-size: 15px; background: var(--canvas); color: var(--ink);
  transition: background .12s, border-color .12s; }
.ed-pop-body textarea { min-height: 84px; resize: vertical; }
.ed-pop-body input:focus, .ed-pop-body textarea:focus {
  outline: none; border-color: var(--gold); background: #fff; }

/* toolbar separators / groups (docked context bar) */
.ed-sep { flex: none; width: 1px; height: 20px; background: var(--line); margin: 0 6px; }
.ed-ib-group { display: inline-flex; gap: 2px; }
input[type=number].ed-size-input { flex: none; width: 46px; text-align: center; border: 1px solid var(--line);
  border-radius: 9px; padding: 6px 2px; font: 600 13px var(--ui); color: var(--ink);
  -moz-appearance: textfield; appearance: textfield; }
.ed-size-input::-webkit-outer-spin-button, .ed-size-input::-webkit-inner-spin-button { display: none; }
.ed-size-input:focus { outline: none; border-color: var(--gold); }

.ed-help { text-align: center; font-family: var(--ui); font-size: 12.5px;
  color: #8a8f9e; margin-top: 12px; }

/* ---- review modal ---- */
.ed-modal { position: fixed; inset: 0; z-index: 50; background: rgba(24,26,36,.5);
  backdrop-filter: blur(3px); display: grid; place-items: center; padding: 16px; }
.ed-modal-card { background: var(--surface); border-radius: 18px; max-width: 760px; width: 100%;
  max-height: 92vh; overflow: auto; padding: 20px 22px; box-shadow: var(--sh-2);
  font-family: var(--ui); }
.ed-modal-head { display: flex; align-items: center; justify-content: space-between; }
.ed-modal-head h2 { font: 800 17px var(--ui); margin: 0; }
.ed-modal-close { width: 34px; height: 34px; background: none; border: none; border-radius: 9px;
  cursor: pointer; color: var(--muted); display: grid; place-items: center; }
.ed-modal-close:hover { background: var(--hover); color: var(--ink); }
.ed-modal-close svg { width: 17px; height: 17px; }
.ed-review-pages { display: flex; flex-direction: column; gap: 14px; margin: 14px 0; }
.ed-review-img { width: 100%; border-radius: 10px; display: block;
  box-shadow: 0 1px 4px rgba(24,26,36,.12), 0 8px 24px rgba(24,26,36,.10); }
.ed-modal-foot { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; flex-wrap: wrap; }
