/* ── Publishing page (/publishing/) ──────────────────────────────
   The page reuses the WordPress card styles (.wp-*) and connection-row
   styles (.conn-*) from account.css / settings.css. These rules cover the
   page hero, the per-method badges, and the webhook-specific blocks
   (signing secret, test, and the "what we send" documentation). */

.pub-hero-title {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-hi);
}
.pub-hero .card-sub { max-width: 680px; }
.pub-hero .card-sub strong { color: var(--text-hi); font-weight: 500; }

/* "Method 1 / Method 2" pill in the card titles. */
.pub-method-badge {
  display: inline-block;
  margin-right: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--muted);
  background: rgba(var(--wash-rgb), 0.05);
  border: 1px solid var(--line);
  vertical-align: middle;
}

/* Webhook — disconnected hint under the form. */
.hook-hint {
  margin: 12px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted-2);
  max-width: 460px;
}

/* WordPress connect — Quick connect / Dedicated user tabs. */
.wp-tabs {
  display: flex;
  gap: 4px;
  margin: 0 0 18px;
  border-bottom: 1px solid var(--line);
}
.wp-tab {
  appearance: none;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  padding: 8px 14px;
  font-family: inherit;
  font-size: 13px;
  color: var(--muted-2);
  cursor: pointer;
}
.wp-tab:hover { color: var(--text); }
.wp-tab.is-active {
  color: var(--text);
  border-bottom-color: var(--accent);
}
.wp-tabpanel[hidden] { display: none; }

/* Hint under the quick-connect form (also used by the dedicated-user copy). */
.wp-plugin-hint {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.55;
  color: var(--muted-2);
  max-width: 520px;
}
/* Inline "switch to the other tab" affordance inside the hint text. */
.wp-linkish {
  appearance: none;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
}

/* Signing secret block. */
.hook-secret {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.hook-secret-head { display: flex; flex-direction: column; gap: 4px; margin-bottom: 9px; }
.hook-secret-hint {
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
  max-width: 560px;
}
.hook-secret-hint code,
.hook-header-list code,
.hook-test-help code {
  font-size: 11.5px;
  padding: 1px 5px;
  border-radius: 5px;
  background: rgba(var(--wash-rgb), 0.06);
}
.hook-secret-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hook-secret-input {
  flex: 1 1 260px;
  min-width: 0;
  height: 36px;
  padding: 0 12px;
  background: rgba(var(--well-rgb), var(--well-a22));
  border: 1px solid rgba(var(--wash-rgb), 0.10);
  border-radius: 9px;
  color: var(--text);
  font: 400 12.5px 'SFMono-Regular', ui-monospace, 'Menlo', monospace;
  letter-spacing: 0.02em;
}
.hook-secret-input:focus { outline: none; border-color: rgba(var(--wash-rgb), 0.28); }

/* Test block. */
.hook-test {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 9px;
  align-items: flex-start;
}
.hook-test-help { font-size: 12px; line-height: 1.5; color: var(--muted-2); max-width: 560px; }
.hook-test-result {
  width: 100%;
  margin-top: 2px;
  padding: 9px 12px;
  border-radius: 9px;
  font-size: 12.5px;
  line-height: 1.45;
  border: 1px solid var(--line);
  color: var(--muted);
}
.hook-test-result[data-kind="ok"] {
  color: var(--cyan-2); background: rgba(99, 102, 241,0.08); border-color: rgba(99, 102, 241,0.28);
}
.hook-test-result[data-kind="err"] {
  color: var(--red-3); background: rgba(239,68,68,0.08); border-color: rgba(239,68,68,0.28);
}
.hook-test-result[data-kind="pending"] { color: var(--muted); }

/* "What we send" documentation. */
.hook-doc { margin-top: 20px; }
.hook-header-list {
  margin: 0 0 14px;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
}
.hook-dim { color: var(--muted-2); }
.hook-payload {
  margin: 0 0 4px;
  padding: 14px 16px;
  background: rgba(var(--well-rgb), var(--well-a28));
  border: 1px solid var(--line);
  border-radius: 10px;
  font: 400 12px/1.55 'SFMono-Regular', ui-monospace, 'Menlo', monospace;
  color: var(--text-7);
  white-space: pre;
  overflow-x: auto;
}

@media (max-width: 560px) {
  .hook-secret-input { flex-basis: 100%; }
}

/* ── WordPress publishing defaults ──────────────────────────────── */
.wp-defaults {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.wp-defaults-head h3 {
  margin: 0;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-hi);
}
.wp-defaults-head p {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted-2);
  max-width: 560px;
}
.wp-defaults-grid {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.wp-set { display: flex; flex-direction: column; gap: 6px; }
.wp-set-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; max-width: 560px; }

/* Publish-mode radio cards. */
.wp-modes { display: flex; flex-direction: column; gap: 8px; max-width: 560px; }
.wp-mode {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease;
}
.wp-mode:hover { border-color: rgba(var(--wash-rgb), 0.20); }
.wp-mode input { margin-top: 2px; accent-color: var(--accent); }
.wp-mode:has(input:checked) {
  border-color: rgba(99, 102, 241,0.45);
  background: rgba(99, 102, 241,0.06);
}
.wp-mode span { display: flex; flex-direction: column; gap: 2px; }
.wp-mode strong { font-size: 13px; font-weight: 500; color: var(--text-hi); }
.wp-mode em { font-style: normal; font-size: 11.5px; line-height: 1.45; color: var(--muted); }

/* Default pickers reuse the chat composer's chip dropdown (.dropdown / .chip /
   .menu live in css/chat.css; js/dropdowns.js drives open/close) for a
   consistent look site-wide — here sized to sit as a form field. */
.wp-dd { width: 100%; }
.wp-chip {
  width: 100%;
  height: 36px;
  justify-content: space-between;
  padding: 0 10px;
  font-size: 13px;
  background: rgba(var(--well-rgb), var(--well-a22));
  border-color: rgba(var(--wash-rgb), 0.10);
  color: var(--text-7);
}
.wp-chip:hover:not(.open) { transform: none; }   /* no lift inside a form */
.wp-chip .chip-label { max-width: none; flex: 1; text-align: left; font-size: 13px; }
.wp-chip .chip-icon { opacity: 0.6; }
.wp-dd .menu { min-width: 100%; max-height: 280px; overflow-y: auto; overscroll-behavior: contain; }

/* Featured-image checkbox. */
.wp-check { display: flex; gap: 10px; cursor: pointer; max-width: 560px; }
.wp-check input { margin-top: 2px; accent-color: var(--accent); }
.wp-check span { display: flex; flex-direction: column; gap: 2px; }
.wp-check strong { font-size: 13px; font-weight: 500; color: var(--text-hi); }
.wp-check em { font-style: normal; font-size: 11.5px; line-height: 1.45; color: var(--muted); }

/* Footer actions + saved note. */
.wp-defaults-foot {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.wp-settings-note { font-size: 12px; color: var(--muted); }
.wp-settings-note[data-kind="ok"] { color: var(--cyan-2); }
.wp-settings-note[data-kind="err"] { color: var(--red-3); }
.wp-defaults [data-wp-testpost-result] { margin-top: 12px; }
.wp-defaults [data-wp-testpost-result] a { color: var(--cyan-2); text-decoration: underline; }
.wp-last-publish {
  display: inline-block;
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
}
.wp-last-publish:hover { color: var(--text); }

@media (max-width: 560px) {
  .wp-set-row { grid-template-columns: 1fr; }
}
