/* The post keeps its preview beside the current delivery state. */
.post-detail-head { align-items: flex-start; gap: 24px; padding: 36px 0 30px; }
.post-detail-head > div:first-child { min-width: 0; }
.post-detail-head .eyebrow { margin-bottom: 10px; color: var(--gold); font: 500 .7rem var(--font-meta); letter-spacing: .1em; }
.post-detail-head__title-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.post-detail-head__title-row h1 { margin: 0; max-width: 28ch; font-size: 2.7rem; line-height: 1.08; overflow-wrap: anywhere; }
.post-detail-head p.post-detail-head__meta { margin: 14px 0 12px; color: var(--soft); font: 400 .75rem/1.7 var(--font-meta); overflow-wrap: anywhere; }
.post-detail-head .post-management-actions { display: grid; flex: 0 0 auto; gap: 8px; padding-top: 22px; }
.post-management-actions .button { width: 100%; font-size: .77rem; }
.dispatch-progress { display: flex; align-items: center; gap: 9px; max-width: 72ch; margin: 0; color: var(--soft) !important; font-size: .84rem !important; line-height: 1.6; }
.status-spinner { width: 12px; height: 12px; flex: 0 0 auto; border: 2px solid var(--line); border-top-color: var(--gold); border-radius: 50%; animation: dispatch-spin .8s linear infinite; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; border-radius: 6px; font-weight: 700; font-size: .72rem; }
.status-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-pill.is-failed { background: color-mix(in srgb, var(--red) 8%, var(--card)); color: var(--red); }
.status-pill.is-pending { background: color-mix(in srgb, var(--gold) 10%, var(--card)); color: var(--gold); }
.status-pill.is-live { background: color-mix(in srgb, var(--green) 8%, var(--card)); color: var(--green); }
.status-pill.is-cancelled { background: var(--wash); color: var(--soft); }
.detail-grid { grid-template-columns: minmax(280px, .8fr) minmax(0, 1.2fr); gap: 24px; align-items: start; }
.detail-video { overflow: hidden; padding: 0; border-radius: 14px; }
.detail-video__player { display: block; width: 100%; max-height: 520px; background: var(--ink); }
.detail-video .video-placeholder { min-height: 300px; font-size: .9rem; }
.detail-video__caption { padding: 22px; }
.detail-video__caption h2 { margin: 0 0 8px; font: 700 .78rem var(--font-ui); }
.detail-video__caption p { margin: 0; color: var(--soft); font: 400 .87rem/1.7 var(--font-ui); overflow-wrap: anywhere; white-space: pre-wrap; }
.dispatch-panel { min-width: 0; padding: 26px; border-radius: 14px; }
.dispatch-panel .section-heading { align-items: center; margin-bottom: 24px; }
.dispatch-panel h2 { margin-top: 7px; font-size: 1.85rem; }
.dispatch-count { flex: 0 0 auto; color: var(--soft); font: 500 .72rem var(--font-meta); }
.dispatch-count strong { color: var(--ink); font-size: .95rem; }
.dispatch-overall-progress { height: 4px; margin: -5px 0 8px; overflow: hidden; border-radius: 99px; background: var(--wash); }
.dispatch-overall-progress span { display: block; height: 100%; background: var(--green); transition: width 300ms ease; }
.dispatch-row { grid-template-columns: 34px minmax(0, 1fr); gap: 12px; padding: 22px 0; }
.dispatch-row:last-child { padding-bottom: 0; }
.dispatch-row > .platform-mark { width: 34px; height: 34px; border-radius: 9px; }
.dispatch-info { min-width: 0; }
.dispatch-info h3 { font-size: .85rem; font-weight: 700; overflow-wrap: anywhere; }
.dispatch-info__heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 5px 12px; }
.dispatch-info p { margin-top: 8px; line-height: 1.65; overflow-wrap: anywhere; }
.destination-status { flex: 0 0 auto; font: 500 .65rem var(--font-meta); color: var(--soft); text-transform: uppercase; letter-spacing: .04em; }
.dispatch-row.is-processing .destination-status { color: var(--gold); }
.dispatch-row.is-published .destination-status { color: var(--green); }
.dispatch-row.is-failed .destination-status { color: var(--red); }
.dispatch-meta { color: var(--soft) !important; font-size: .76rem !important; }
.dispatch-actions { grid-column: 2; display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.dispatch-actions:empty { display: none; }
.dispatch-actions .text-link { display: inline-flex; align-items: center; min-height: 32px; font-size: .8rem; }
.dispatch-actions button.text-link { border: 0; padding: 0; background: none; }
.dispatch-row .button { min-height: 38px; white-space: normal; text-align: center; }
.dispatch-row--available { background: none; }
@keyframes dispatch-spin { to { transform: rotate(360deg); } }
@media (max-width: 1000px) {
  .post-detail-head { flex-wrap: wrap; }
  .post-detail-head .post-management-actions { display: flex; flex-wrap: wrap; padding-top: 0; }
  .post-management-actions .button { width: auto; }
}
@media (max-width: 780px) {
  .detail-grid { grid-template-columns: minmax(0, 1fr); }
  .post-detail-head__title-row h1 { font-size: 2.2rem; }
  .post-detail-head__title-row { gap: 14px; }
  .detail-video__player { max-height: 460px; }
  .detail-video__caption { padding: 20px; }
  .dispatch-panel { padding: 22px 18px; }
}
@media (prefers-reduced-motion: reduce) { .status-spinner { animation: none; } }

.dispatch-info h3 { color: var(--ink); }

.dispatch-destinations { min-width: 0; }
.dispatch-destinations__footnote { margin: 14px 4px 0; }
.dispatch-destinations__footnote .youtube-upload-notice { margin: 0; color: var(--soft); text-align: left; font-size: .75rem; line-height: 1.5; }

.tiktok-approved-settings { margin: 0 20px 20px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; font-size: .8rem; }
.tiktok-approved-settings summary { cursor: pointer; min-height: 32px; font-weight: 700; }
.tiktok-approved-settings dl { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 16px; }
.tiktok-approved-settings dd { margin: 0; overflow-wrap: anywhere; }
