/* Post-to-social modal (js/zernio-post.js) — shared by /ai-videos/ and
   /image-generator/, so it carries its own shell instead of leaning on
   either page's modal classes. House tokens only. */

.zp-modal { position: fixed; inset: 0; z-index: 1100; display: flex; align-items: center; justify-content: center; padding: 24px; }
.zp-backdrop { position: absolute; inset: 0; background: rgba(var(--dk17-rgb), 0.7); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.zp-card {
  position: relative;
  width: min(440px, 94vw);
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px 24px 20px;
  border-radius: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 0 var(--edge-hi), 0 30px 80px -20px rgba(0, 0, 0, 0.8);
}
.zp-close {
  position: absolute; top: 14px; right: 14px;
  display: grid; place-items: center;
  width: 28px; height: 28px; padding: 0;
  border: 0; background: none; color: var(--muted-2); cursor: pointer;
}
.zp-close:hover { color: var(--text); }
.zp-close svg { width: 14px; height: 14px; }
.zp-title { margin: 0 0 14px; font-size: 17px; font-weight: 600; color: var(--text); }

.zp-note { font-size: 12.5px; line-height: 1.55; color: var(--muted); }
.zp-warn { margin: 0 0 12px; font-size: 11.5px; line-height: 1.5; color: #ffce99; }
.zp-err { margin-top: 10px; font-size: 12px; line-height: 1.5; color: var(--danger); }
.zp-err[hidden] { display: none; }

.zp-media {
  height: 120px; margin-bottom: 12px;
  border-radius: var(--r-card);
  background-color: var(--panel-2);
  background-size: cover; background-position: center;
  border: 1px solid var(--line);
  position: relative;
}
.zp-media-tag {
  position: absolute; left: 8px; bottom: 8px;
  padding: 2px 8px; border-radius: 999px;
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.02em;
  color: var(--text); background: rgba(var(--dk17-rgb), 0.72);
}

.zp-caption {
  width: 100%; resize: vertical; min-height: 64px;
  padding: 10px 12px;
  border-radius: var(--r-input, 13px);
  background: var(--surface-3);
  border: 1px solid var(--line);
  color: var(--text);
  font: inherit; font-size: 13px; line-height: 1.5;
}
.zp-caption::placeholder { color: var(--muted-3); }
.zp-caption:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-faint); }

.zp-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.zp-pill { position: relative; display: inline-flex; cursor: pointer; }
.zp-pill input { position: absolute; opacity: 0; pointer-events: none; }
.zp-pill span {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px; font-weight: 500;
  color: var(--muted);
  background: var(--surface-3);
  border: 1px solid var(--line);
  transition: color 150ms cubic-bezier(0.4, 0, 0.2, 1), border-color 150ms cubic-bezier(0.4, 0, 0.2, 1), background 150ms cubic-bezier(0.4, 0, 0.2, 1);
}
.zp-pill:hover span { border-color: var(--line-strong); color: var(--text); }
.zp-pill input:checked + span {
  color: var(--accent-text);
  background: var(--accent-faint);
  border-color: rgba(var(--accent-rgb), 0.5);
}
.zp-pill input:focus-visible + span { box-shadow: 0 0 0 3px var(--accent-faint); }
.zp-pill.is-off { cursor: not-allowed; }
.zp-pill.is-off span { opacity: 0.45; }
.zp-pill.is-off:hover span { border-color: var(--line); color: var(--muted); }

.zp-actions { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin-top: 18px; }
.zp-cancel {
  padding: 8px 14px; border: 0; background: none; cursor: pointer;
  font-size: 12.5px; font-weight: 500; color: var(--muted-2);
}
.zp-cancel:hover { color: var(--text); }
.zp-primary {
  display: inline-flex; align-items: center;
  padding: 8px 16px; border: 0; cursor: pointer;
  border-radius: var(--r-control);
  font-size: 12.5px; font-weight: 600; text-decoration: none;
  color: #fff; background: var(--accent);
}
.zp-primary:hover { background: var(--accent-bright); }
.zp-primary:disabled { opacity: 0.55; cursor: default; background: var(--accent); }

.zp-done { display: flex; align-items: flex-start; gap: 10px; }
.zp-done-ic {
  display: grid; place-items: center; flex-shrink: 0;
  width: 26px; height: 26px; border-radius: 50%;
  color: var(--accent-text); background: var(--accent-faint);
}
.zp-done-ic svg { width: 14px; height: 14px; }
.zp-done-text { font-size: 13px; line-height: 1.55; color: var(--muted); padding-top: 2px; }
.zp-done-text strong { color: var(--text); font-weight: 600; }
