.post-blog-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.post-blog-modal {
  background: var(--bg-surface);
  border-radius: 12px;
  width: 420px;
  max-width: 90vw;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.post-blog-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}

.post-blog-modal-header h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-dark);
}

.post-blog-modal-close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--ink-light);
  padding: 0 4px;
}

.post-blog-modal-close:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.post-blog-modal-doc {
  padding: 10px 18px;
  font-size: 12.5px;
  color: var(--ink-light);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.post-blog-modal-loading,
.post-blog-modal-empty {
  padding: 24px 18px;
  text-align: center;
  font-size: 13px;
  color: var(--ink-light);
  line-height: 1.5;
}

.post-blog-modal-empty {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
}

.post-blog-modal-empty strong {
  color: var(--ink-dark);
}

.post-blog-modal-label {
  padding: 12px 18px 6px;
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-light);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.post-blog-modal-sites {
  padding: 0 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 260px;
  overflow-y: auto;
}

.post-blog-modal-site {
  text-align: left;
  padding: 10px 12px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s, background 0.15s;
}

.post-blog-modal-site:hover {
  border-color: var(--accent);
  background: rgba(0, 0, 0, 0.02);
}

.post-blog-modal-site--selected {
  border-color: var(--accent);
  background: rgba(0, 0, 0, 0.03);
}

.post-blog-modal-site-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-dark);
}

.post-blog-modal-site-repo {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 11px;
  color: var(--ink-light);
  margin-top: 2px;
}

.post-blog-modal-confirm {
  padding: 18px 18px 8px;
  font-size: 13px;
  color: var(--ink-dark);
  line-height: 1.5;
}

.post-blog-modal-target-dir {
  margin-top: 6px;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 11.5px;
  color: var(--ink-light);
}

.post-blog-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 18px;
  border-top: 1px solid var(--border);
}

.post-blog-modal-btn {
  padding: 7px 14px;
  font-size: 12.5px;
  font-family: inherit;
  font-weight: 500;
  background: rgba(0, 0, 0, 0.06);
  border: none;
  border-radius: 6px;
  color: var(--ink-dark);
  cursor: pointer;
  transition: background 0.15s;
}

.post-blog-modal-btn:hover:not(:disabled) {
  background: rgba(0, 0, 0, 0.1);
}

.post-blog-modal-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.post-blog-modal-btn--primary {
  background: var(--accent);
  color: white;
}

.post-blog-modal-btn--primary:hover:not(:disabled) {
  opacity: 0.92;
  background: var(--accent);
}

.post-blog-modal-result {
  padding: 20px 18px;
  text-align: center;
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
}

.post-blog-modal-result--success {
  color: var(--ink-dark);
}

.post-blog-modal-result--error {
  color: #ef4444;
}

.post-blog-modal-meta {
  font-size: 11.5px;
  color: var(--ink-light);
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
}

.post-blog-modal-result .post-blog-modal-actions {
  border-top: none;
  padding: 0;
  justify-content: center;
}

/* Writeback warning: publish succeeded but the doc couldn't be marked sent.
   Surfaced amber inside the success screen rather than hidden behind a clean ✓. */
.post-blog-modal-warning {
  font-size: 11.5px;
  line-height: 1.45;
  color: #92400e;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 6px;
  padding: 8px 10px;
  text-align: left;
}

/* Demoted commit link — shown beneath the primary "View Post" CTA. */
.post-blog-modal-commit-link {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 11.5px;
  color: var(--ink-light);
  cursor: pointer;
  text-decoration: underline;
  padding: 2px;
}

.post-blog-modal-commit-link:hover {
  color: var(--ink-dark);
}

.post-blog-modal-done {
  display: block;
  margin: 12px auto 0;
  padding: 8px 20px;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.06);
  color: var(--ink-dark);
}
