.post-dialog {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  color: var(--nb-color-text, #28282e);
  background: var(--master-shell-canvas, var(--surface-primary, #fff));
  box-shadow: none;
}
.post-dialog form { width: 100%; height: 100%; min-height: 0; max-height: none; margin: 0; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 0; padding: 0; background: var(--surface-primary, #fff); }
.post-composer-header,.post-composer-footer { display: flex; align-items: center; gap: 10px; padding: 14px 20px; background: var(--surface-primary, #fff); }
.post-composer-header { display: grid; grid-template-columns: 199px 264px minmax(0, 1fr); border-bottom: 1px solid var(--scheduler-border); }
.post-composer-title { display: flex; align-items: center; gap: 11px; min-width: 0; }
.post-composer-title > div { min-width: 0; }
.post-composer-mark { width: 34px; height: 34px; display: grid; place-items: center; flex: none; border-radius: 9px; color: #fff; background: var(--scheduler-orange); line-height: 1; }
.post-composer-mark svg { width: 20px; height: 20px; stroke-width: 2; }
.post-composer-title p { margin: 0 0 2px; color: var(--scheduler-muted); font-size: 9px; font-weight: 600; letter-spacing: .1em; }
.post-composer-title h2 { margin: 0; font-size: 17px; line-height: 22px; font-weight: 500; }
.post-composer-header-actions { display: flex; align-items: center; justify-self: end; gap: 8px; }
.composer-quiet-button,.composer-close,.composer-cancel { border: 1px solid var(--scheduler-border); border-radius: 6px; background: var(--surface-primary, #fff); color: inherit; font: inherit; cursor: pointer; }
.composer-quiet-button { padding: 7px 11px; font-size: 11px; }
.composer-quiet-button[aria-expanded="true"] { border-color: var(--scheduler-orange); color: var(--scheduler-orange); }
.composer-close { width: 32px; height: 32px; font-size: 20px; line-height: 1; }
.post-composer-content { min-height: 0; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(260px, .8fr); overflow: auto; }
.post-composer-editor { min-width: 0; padding: 18px 20px; }
.post-format-picker,.post-placement-control { display: inline-flex; align-items: center; gap: 3px; padding: 3px; border: 1px solid var(--scheduler-border); border-radius: 8px; background: var(--surface-secondary, #f4f4f6); }
.post-composer-header > .post-format-picker { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: 264px; justify-self: start; }
.post-format-picker button,.post-placement-control button { min-height: 30px; padding: 0 12px; border: 0; border-radius: 6px; background: transparent; color: var(--scheduler-muted); font: 500 11px Krub, sans-serif; cursor: pointer; }
.post-composer-header > .post-format-picker button { min-width: 0; padding-inline: 5px; white-space: nowrap; }
.post-format-picker button[aria-pressed="true"],.post-placement-control button[aria-pressed="true"] { color: var(--nb-color-text, #28282e); background: var(--surface-primary, #fff); box-shadow: 0 1px 3px #17171c17; }
.post-templates { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 12px 0 0; }
.post-templates[hidden] { display: none; }
.post-templates p { width: 100%; margin: 0 0 2px; color: var(--scheduler-muted); font-size: 10px; }
.post-templates button { padding: 6px 9px; border: 1px solid var(--scheduler-border); border-radius: 6px; background: var(--surface-primary, #fff); color: inherit; font: 400 10px Krub, sans-serif; cursor: pointer; }
.post-templates button:hover { border-color: var(--scheduler-orange); }
.post-compose-card { margin-top: 0; padding: 12px; border: 1px solid var(--scheduler-border); border-radius: 9px; background: var(--surface-primary, #fff); }
.post-compose-account,.post-preview-account { display: flex; align-items: center; gap: 8px; min-width: 0; }
.post-compose-account { margin-bottom: 11px; }
.post-compose-account > div { display: grid; gap: 1px; }
.post-compose-account strong,.post-preview-account strong { font-size: 10px; font-weight: 600; }
.post-compose-account small { color: var(--scheduler-muted); font-size: 9px; }
.post-compose-avatar { width: 27px; height: 27px; display: grid; place-items: center; flex: none; border-radius: 50%; background: var(--scheduler-orange-soft); color: var(--scheduler-orange); font-size: 11px; font-weight: 600; }
.post-compose-more { margin-left: auto; color: var(--scheduler-muted); letter-spacing: 2px; }
.post-media-area { display: flex; align-items: stretch; gap: 8px; min-height: 82px; overflow-x: auto; }
.post-media-area.is-dragover { outline: 2px dashed var(--scheduler-orange); outline-offset: 3px; border-radius: 5px; background: var(--scheduler-orange-soft); }
.post-media-list { display: flex; gap: 7px; }
.post-media-list[hidden] { display: none; }
.post-media-thumb { position: relative; width: 92px; height: 82px; flex: none; overflow: hidden; border: 1px solid var(--scheduler-border); border-radius: 7px; }
.post-media-thumb img, .post-media-thumb video { width: 100%; height: 100%; object-fit: cover; }
.post-media-thumb button { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border: 0; border-radius: 50%; color: white; background: #25252bcc; font-size: 16px; line-height: 1; cursor: pointer; }
.post-add-media { min-width: 130px; min-height: 82px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 8px; border: 1px dashed #b9b9c2; border-radius: 7px; color: inherit; background: var(--surface-secondary, #f8f8fa); cursor: pointer; }
.post-add-media:hover { border-color: var(--scheduler-orange); background: var(--scheduler-orange-soft); }
.post-add-media[hidden] { display: none; }
.post-add-media > span { color: var(--scheduler-orange); font-size: 20px; line-height: 20px; }
.post-add-media strong { font-size: 10px; font-weight: 500; }
.post-add-media small { color: var(--scheduler-muted); font-size: 8px; }
.post-library-media { border-style: solid; }
.post-caption-label { display: block; margin: 12px 0 5px; font-size: 10px; font-weight: 500; }
.post-dialog textarea,.post-dialog input:not([type="file"]):not([type="hidden"]),.post-dialog select { width: 100%; min-width: 0; padding: 9px 10px; border: 1px solid var(--scheduler-border); border-radius: 6px; outline: none; color: inherit; background: var(--surface-primary, #fff); font: 400 11px/17px Krub, sans-serif; }
.post-dialog textarea:focus,.post-dialog input:focus,.post-dialog select:focus { border-color: var(--scheduler-orange); box-shadow: 0 0 0 2px #ff51001a; }
.post-dialog textarea { min-height: 88px; resize: vertical; }
.post-dialog textarea::placeholder,.post-dialog input::placeholder { color: #a5a5ad; }
.post-caption-tools { display: flex; align-items: center; gap: 5px; margin-top: 4px; }
.post-caption-tools button { width: 25px; height: 24px; padding: 0; border: 0; border-radius: 5px; color: var(--scheduler-muted); background: transparent; font: 500 14px Krub, sans-serif; cursor: pointer; }
.post-caption-tools button:hover { color: var(--scheduler-orange); background: var(--scheduler-orange-soft); }
.post-caption-tools > span { margin-left: auto; color: var(--scheduler-muted); font-size: 9px; }
.post-caption-assistant { margin: 11px 0 12px; padding: 11px; border: 1px solid var(--scheduler-border); border-radius: 8px; background: var(--surface-secondary, #f7f7f9); }
.post-caption-assistant-heading { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.post-caption-assistant-heading strong { font-size: 11px; line-height: 16px; font-weight: 600; }
.post-caption-assistant-heading span { color: var(--scheduler-muted); font-size: 10px; line-height: 15px; }
.post-caption-ai { display: grid; gap: 7px; margin-top: 9px; }
.post-caption-ai-generate { min-height: 34px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 12px; border: 1px solid var(--scheduler-orange); border-radius: 6px; color: #fff; background: var(--scheduler-orange); font: 600 10px Krub, sans-serif; cursor: pointer; }
.post-caption-ai-generate svg,.post-caption-ai-rewrites svg { width: 14px; height: 14px; flex: none; stroke-width: 2; }
.post-caption-ai-rewrites { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; align-items: center; }
.post-caption-ai-rewrites button { min-height: 34px; grid-column: span 2; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 8px; border: 1px solid var(--scheduler-border); border-radius: 6px; color: inherit; background: var(--surface-primary, #fff); font: 500 10px Krub, sans-serif; cursor: pointer; white-space: nowrap; }
.post-caption-ai-rewrites button:nth-child(4),.post-caption-ai-rewrites button:nth-child(5) { grid-column: span 2; }
.post-caption-ai-rewrites button svg { color: var(--scheduler-orange); }
.post-dialog .post-caption-tone { grid-column: span 2; min-width: 0; min-height: 34px; display: flex; align-items: center; gap: 5px; color: var(--scheduler-muted); font-size: 9px; line-height: 12px; }
.post-caption-tone select { width: 100%; min-width: 0; height: 34px; padding: 0 25px 0 7px; border: 1px solid var(--scheduler-border); border-radius: 6px; color: var(--nb-color-text, #28282e); background: var(--surface-primary, #fff); font: 500 10px Krub, sans-serif; cursor: pointer; }
.post-caption-tone select:focus-visible { outline: 2px solid var(--scheduler-orange); outline-offset: 1px; }
.post-caption-ai-generate:hover:not(:disabled) { filter: brightness(.96); }
.post-caption-ai-rewrites button:hover:not(:disabled) { border-color: var(--scheduler-orange); background: var(--scheduler-orange-soft); }
.post-caption-ai-generate:disabled,.post-caption-ai-rewrites button:disabled { cursor: not-allowed; opacity: .55; }
.post-caption-ai-status { min-height: 0; margin: 0; color: var(--scheduler-muted); font-size: 9px; line-height: 13px; }
.post-caption-ai-status:empty { display: none; }
.post-caption-ai-status.is-error { color: var(--ds-danger, #c33b32); }
.post-first-comment { display: grid; gap: 5px; margin-top: 11px; font-size: 10px; font-weight: 500; }
.post-first-comment > span { display: flex; align-items: center; gap: 6px; }
.post-first-comment small { color: var(--scheduler-muted); font-size: 9px; font-weight: 400; }
.post-composer-note { margin: 9px 1px 0; color: var(--scheduler-muted); font-size: 9px; line-height: 14px; }
.post-composer-preview { min-width: 0; padding: 18px; border-left: 1px solid var(--scheduler-border); background: var(--surface-secondary, #f7f7f9); }
.post-preview-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 13px; }
.post-preview-heading h3 { margin: 0; font-size: 12px; line-height: 17px; font-weight: 500; }
.post-preview-heading p { margin: 2px 0 0; color: var(--scheduler-muted); font-size: 9px; }
.post-preview-live { display: flex; align-items: center; gap: 5px; color: var(--scheduler-muted); font-size: 9px; }
.post-preview-live i { width: 6px; height: 6px; border-radius: 50%; background: #46a36d; }
.post-live-preview { max-width: 340px; margin: 0 auto; overflow: hidden; border: 1px solid var(--scheduler-border); border-radius: 8px; background: var(--surface-primary, #fff); box-shadow: 0 2px 7px #17171c0b; }
.post-preview-account { height: 42px; padding: 0 10px; }
.post-preview-account > span:last-child { margin-left: auto; color: var(--scheduler-muted); letter-spacing: 2px; }
.post-preview-media { position: relative; width: 100%; aspect-ratio: 1; display: grid; place-items: center; overflow: hidden; color: var(--scheduler-muted); background: var(--surface-secondary, #f3f3f5); text-align: center; font-size: 10px; }
.post-preview-media img, .post-preview-media video { width: 100%; height: 100%; object-fit: cover; }
.post-preview-count { position: absolute; right: 8px; bottom: 8px; padding: 3px 6px; border-radius: 99px; color: #fff; background: #25252bcc; font-size: 8px; }
.post-preview-actions { display: flex; gap: 10px; padding: 8px 10px 3px; font-size: 16px; }
.post-preview-actions span:last-child { margin-left: auto; }
.post-preview-caption,.post-preview-comment { display: block; margin: 4px 10px 10px; overflow-wrap: anywhere; font-size: 9px; line-height: 14px; }
.post-preview-caption #post-preview-caption { white-space: pre-line; }
.post-preview-caption strong { font-weight: 600; }
.post-preview-format { display: none; }
.post-preview-comment { color: var(--scheduler-muted); }
.post-preview-footnote { margin: 10px 0 0; color: var(--scheduler-muted); text-align: center; font-size: 8px; }
.post-composer-footer { min-height: 64px; border-top: 1px solid var(--scheduler-border); }
.post-schedule-fields { display: flex; align-items: center; gap: 6px; }
.post-schedule-fields[hidden] { display: none; }
.post-schedule-fields label { color: var(--scheduler-muted); font-size: 9px; }
.post-schedule-fields input,.post-schedule-fields select { width: auto!important; min-width: 112px!important; padding: 6px 7px!important; font-size: 10px!important; }
.post-footer-spacer { flex: 1; }
.composer-cancel,.composer-submit { min-height: 34px; padding: 0 13px; font: 500 10px Krub, sans-serif; }
.composer-cancel:hover { border-color: var(--scheduler-orange); }
.composer-submit { border: 1px solid var(--scheduler-orange); border-radius: 6px; color: #fff; background: var(--scheduler-orange); cursor: pointer; }
.composer-submit:hover { filter: brightness(.96); }
:root[data-theme="dark"] .post-dialog {
  --surface-primary: var(--ds-app-surface, #1b1c22);
  --surface-secondary: var(--ds-app-surface-subtle, #24252d);
  --scheduler-border: var(--ds-button-border, var(--nb-color-border, #3a3c47));
  --scheduler-muted: var(--ds-muted, var(--nb-color-text-muted, #a9acb9));
  --scheduler-orange-soft: color-mix(in srgb, var(--scheduler-orange) 14%, var(--surface-primary));
  color: var(--ds-text, var(--nb-color-text, #f2f3f7));
  color-scheme: dark;
}
:root[data-theme="dark"] .post-dialog .post-add-media { border-color: var(--ds-button-border, #3a3c47); }
:root[data-theme="dark"] .post-dialog textarea::placeholder,
:root[data-theme="dark"] .post-dialog input::placeholder { color: var(--ds-muted, #a9acb9); opacity: 1; }
@media (max-width: 700px) {
  .post-dialog form { width: 100%; }
  .post-composer-header,.post-composer-footer { padding: 11px 12px; }
  .post-composer-header { grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; }
  .post-composer-title { grid-column: 1; grid-row: 1; }
  .post-composer-header-actions { grid-column: 2; grid-row: 1; }
  .post-composer-header > .post-format-picker { grid-column: 1 / -1; grid-row: 2; justify-self: start; }
  .post-composer-content { grid-template-columns: minmax(0, 1fr); }
  .post-composer-editor { padding: 13px 12px; }
  .post-composer-preview { display: none; }
  .post-schedule-fields { flex-wrap: wrap; }
  .post-schedule-fields label { display: none; }
  .post-schedule-fields input,.post-schedule-fields select { min-width: 95px!important; }
  .post-placement-control button { padding: 0 8px; }
}

:root[data-theme="dark"] .post-dialog,
:root[data-theme="dark"] .post-dialog form,
:root[data-theme="dark"] .post-dialog .post-composer-header,
:root[data-theme="dark"] .post-dialog .post-composer-footer,
:root[data-theme="dark"] .post-dialog .post-compose-card,
:root[data-theme="dark"] .post-dialog .post-live-preview,
:root[data-theme="dark"] .post-dialog .post-templates button,
:root[data-theme="dark"] .post-dialog .post-caption-ai-rewrites button {
  color: var(--nb-color-text, #f2f3f7);
  background-color: var(--surface-primary, #1b1c22);
}
:root[data-theme="dark"] .post-dialog .post-composer-content,
:root[data-theme="dark"] .post-dialog .post-composer-preview,
:root[data-theme="dark"] .post-dialog .post-format-picker,
:root[data-theme="dark"] .post-dialog .post-placement-control,
:root[data-theme="dark"] .post-dialog .post-caption-assistant,
:root[data-theme="dark"] .post-dialog .post-add-media,
:root[data-theme="dark"] .post-dialog .post-preview-media {
  color: var(--nb-color-text, #f2f3f7);
  background-color: var(--surface-secondary, #24252d);
}
:root[data-theme="dark"] .post-dialog .post-format-picker button[aria-pressed="true"],
:root[data-theme="dark"] .post-dialog .post-placement-control button[aria-pressed="true"] {
  color: var(--nb-color-text, #f2f3f7);
  background-color: var(--surface-primary, #1b1c22);
}
:root[data-theme="dark"] .post-dialog {
  --surface-primary: var(--nb-color-surface, #1b1c22);
  --surface-secondary: var(--nb-color-surface-subtle, #24252d);
  --scheduler-orange-soft: color-mix(in srgb, var(--scheduler-orange) 16%, var(--surface-primary));
}
