/* Primary one-screen publishing workflow. Scoped to avoid changing legacy editors. */
.qc-open { overflow: hidden; }
#quick-compose-nav {
  display: block;
  width: calc(100% - 8px);
  margin: 2px 4px 12px;
  padding: 12px 14px;
  background: #4772ff;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 12px;
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  text-align: center;
  cursor: pointer;
}
#quick-compose-nav:hover { background: #325fe5; }
.qc-overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 200;
  background: rgba(11,20,37,.65);
  backdrop-filter: blur(6px);
  padding: 18px;
}
.qc-dialog {
  display: flex;
  flex-direction: column;
  width: min(1160px,100%);
  max-height: min(870px,calc(100dvh - 36px));
  min-height: min(650px,calc(100dvh - 36px));
  background: #fff;
  border: 1px solid #e1e6ed;
  border-radius: 18px;
  box-shadow: 0 32px 110px rgba(0,0,0,.25);
  color: #1c2736;
  overflow: hidden;
}
.qc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 21px 28px 18px;
  border-bottom: 1px solid #e5eaf1;
}
.qc-eyebrow {
  color: #596c8a;
  letter-spacing: .11em;
  font-weight: 800;
  font-size: 10px;
  margin: 0 0 5px;
}
.qc-head h2 { margin: 0; font-size: 25px; letter-spacing: -.04em; color: #111a29; }
.qc-icon-button {
  width: 36px; min-width: 36px; height: 36px;
  border-radius: 10px; font-size: 26px; line-height: 1;
  display: grid; place-items: center; background: #f0f3f8; color: #334155;
  cursor: pointer; padding: 0;
}
.qc-icon-button:hover { background: #e7ebf3; }
.qc-main {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0,1.2fr) minmax(310px,.85fr);
}
.qc-editor {
  min-width: 0;
  overflow-y: auto;
  padding: 26px 28px 36px;
}
.qc-label { display: block; font-size: 15px; font-weight: 800; margin: 0 0 10px; }
#qc-text {
  display: block; width: 100%; min-height: 226px; resize: vertical;
  padding: 17px; font-family: inherit; font-size: 15px; line-height: 1.58;
  color: #142033; border: 1px solid #d2dae7; border-radius: 13px;
  background: #fff; outline-offset: 2px;
}
#qc-text:focus { border-color: #5478ff; outline: 2px solid #edf2ff; }
.qc-muted { font-size: 12px; color: #657186; }
#qc-recovery-note { display: block; font-size: 11px; margin-top: 6px; }
.qc-recovery-warning {
  display: none; flex-direction: column; gap: 8px;
  margin: 12px 0; padding: 14px; border: 1px solid #e8c995;
  background: #fffaf0; border-radius: 10px; font-size: 12px;
}
.qc-recovery-warning.is-visible { display: flex; }
.qc-recovery-warning p { margin: 0; color: #694d2e; }
.qc-recovery-warning a { color: #3151a0; text-decoration: underline; font-weight: 750; }
#qc-start-new, #qc-skip-recovered-media {
  align-self: flex-start; padding: 9px 12px; border-radius: 8px;
  background: #fff; color: #634c2b; border: 1px solid #debd87;
  font-weight: 700; cursor: pointer;
}

.qc-photo-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 12px; margin: 23px 0 11px; }
.qc-photo-head strong { font-size: 15px; }
.qc-drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  cursor: pointer; text-align: center;
  border: 1.5px dashed #9eb0d9;
  background: #f7f9ff;
  border-radius: 13px; padding: 22px 14px; gap: 4px;
  min-height: 128px;
}
.qc-drop.is-dragging { background: #e7efff; border-color: #315ee8; }
.qc-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.qc-drop:focus-within { outline: 3px solid #abc7ff; }
.qc-drop-icon { font-size: 28px; font-weight: 700; line-height: 26px; color: #315ee8; }
.qc-drop strong { font-size: 14px; color: #1b409c; }
.qc-drop small { font-size: 11px; color: #657186; }
.qc-images { display: flex; gap: 12px; flex-wrap: wrap; margin: 12px 0; }
.qc-image {
  display: flex; flex-direction: column; width: 133px; min-width: 0; overflow: hidden;
  border: 1px solid #dbe2ec; border-radius: 10px; background: #fff;
}
.qc-image img { display: block; width: 100%; height: 100px; object-fit: cover; }
.qc-image span {
  display: block; padding: 6px 8px 0; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; font-size: 11px; color: #4b5a70;
}
.qc-image-controls { display: flex; gap: 2px; padding: 5px; }
.qc-image-controls button {
  color: #3151a0; font-size: 11px; padding: 5px; cursor: pointer; background: #f0f3fc;
  border-radius: 6px;
}
.qc-image-controls button:disabled { opacity: .45; cursor: default; }
.qc-advanced { margin-top: 24px; border-top: 1px solid #e6eaf1; padding-top: 18px; }
.qc-advanced summary { color: #556984; font-size: 13px; cursor: pointer; font-weight: 650; }
.qc-options { margin-top: 15px; display: grid; gap: 13px; }
.qc-options label { display: grid; gap: 6px; font-size: 12px; font-weight: 700; color: #45546c; }
.qc-options select, .qc-options input {
  padding: 11px 12px; border: 1px solid #d4dce8; border-radius: 9px;
  background: #fff; color: #263346; width: 100%;
}
.qc-right {
  min-width: 0;
  display: flex; flex-direction: column;
  padding: 25px 23px;
  background: #f7f9fc;
  border-left: 1px solid #e5eaf1;
  overflow-y: auto;
}
.qc-target-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.qc-target-head h3 { font-size: 16px; margin: 0 0 5px; color: #172338; }
.qc-target-head p { font-size: 12px; color: #63738a; margin: 0; }
.qc-counter { padding: 5px 9px; background: #e7eeff; border-radius: 30px; color: #2549ae; white-space: nowrap; font-size: 11px; font-weight: 750; }
.qc-target-toggle, .qc-target-sheet-head { display: none; }
.qc-target-picker { min-width: 0; }
.qc-target-actions { display: flex; gap: 12px; margin: 17px 0 11px; }
.qc-target-actions button { background: transparent; border: none; padding: 3px 0; color: #2d54ba; font-size: 12px; font-weight: 700; text-decoration: underline; cursor: pointer; }
.qc-accounts {
  max-height: 280px; min-height: 100px; overflow-y: auto;
  border: 1px solid #dde5f0; border-radius: 11px; padding: 5px 12px;
  background: #fff;
}
.qc-account-group { padding: 9px 0 6px; }
.qc-account-group + .qc-account-group { border-top: 1px solid #eef1f6; }
.qc-account-group h4 { font-size: 12px; margin: 0 0 7px; color: #384860; }
.qc-account-group h4 span { color: #97a2b0; font-weight: 500; }
.qc-account { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; padding: 9px 4px; cursor: pointer; font-size: 12px; }
.qc-account + .qc-account { border-top: 1px solid #f2f4f7; }
.qc-account input { width: 17px; height: 17px; flex: 0 0 auto; accent-color: #315ee8; }
.qc-account span { flex: 1; overflow-wrap: anywhere; }
.qc-account small { width: 100%; margin-left: 26px; color: #9a6470; }
.qc-account.is-disabled { opacity: .62; cursor: default; }
.qc-empty {
  display: grid; gap: 12px; border: 1px dashed #bec9db; background: #fff;
  border-radius: 11px; padding: 22px; margin-top: 15px; color: #576981;
}
.qc-empty a { color: #315ee8; font-weight: 700; }
.qc-variant-editor {
  margin-top: 14px; padding: 11px 13px; border: 1px solid #dbe4f1;
  border-radius: 10px; background: #fff; min-width: 0;
}
.qc-variant-editor[hidden] { display: none; }
.qc-variant-editor summary { cursor: pointer; color: #2549a3; font-size: 12px; font-weight: 750; }
.qc-variant-editor label {
  display: flex; flex-direction: column; gap: 5px; margin-top: 11px;
  color: #485c79; font-size: 12px; font-weight: 650;
}
.qc-variant-editor select, .qc-variant-editor textarea {
  min-width: 0; width: 100%; padding: 9px 10px; border: 1px solid #cfdaeb;
  border-radius: 8px; font: inherit; color: #1f2f49; background: #fff;
}
.qc-variant-editor textarea { min-height: 78px; resize: vertical; line-height: 1.45; }
.qc-variant-editor textarea:focus-visible, .qc-variant-editor select:focus-visible {
  outline: 2px solid #5385e8; outline-offset: 1px;
}
.qc-variant-status { font-size: 11px; color: #456080; margin: 8px 0; }
.qc-variant-editor button {
  padding: 8px 10px; border: 1px solid #c7d5ed; border-radius: 8px;
  color: #3154a1; background: #f2f6ff; font-size: 12px;
  font-weight: 700; cursor: pointer;
}
.qc-variant-editor button:disabled { opacity: .55; cursor: default; }
.qc-media-variant { margin-top: 14px; border-top: 1px solid #e2e8f2; padding-top: 12px; min-width: 0; }
.qc-media-variant[hidden] { display: none; }
.qc-media-variant h4 { font-size: 12px; color: #263951; margin: 0 0 6px; }
#qc-media-variant-note { font-size: 11px; color: #596c85; line-height: 1.5; margin: 4px 0 10px; }
.qc-media-variant-list { display: flex; flex-direction: column; gap: 6px; max-height: 200px; overflow-y: auto; min-width: 0; }
.qc-media-variant-row {
  display: grid; grid-template-columns: 21px 36px minmax(0,1fr) 34px 34px;
  align-items: center; gap: 5px; padding: 6px;
  border: 1px solid #e1e8f3; border-radius: 8px; background: #f8fafc;
}
.qc-media-variant-row input { width: 18px; height: 18px; cursor: pointer; }
.qc-media-variant-row img { width: 36px; height: 36px; object-fit: cover; border-radius: 5px; }
.qc-media-variant-row span { min-width: 0; overflow-wrap: anywhere; font-size: 11px; color: #374760; }
.qc-media-variant-row button { min-width: 30px; min-height: 34px; padding: 6px !important; }
#qc-media-variant-reset { margin-top: 10px; }
.qc-preview { border-top: 1px solid #dee6f0; margin-top: 20px; padding-top: 18px; }
.qc-preview h4 { font-size: 12px; margin: 0 0 8px; }
#qc-preview-text {
  white-space: pre-wrap; overflow-wrap: anywhere;
  color: #43546d; font-size: 12px; max-height: 105px; overflow: auto; margin: 0 0 9px;
}
#qc-preview-targets { overflow-wrap: anywhere; }
.qc-platform-preview-load {
  display: block; width: 100%; margin: 13px 0 0; padding: 10px 13px;
  border: 1px solid #b7c8e9; border-radius: 9px; background: #fff;
  color: #2549a3; font-size: 12px; font-weight: 750; cursor: pointer;
}
.qc-platform-preview-load:disabled { color: #8693aa; cursor: not-allowed; background: #f0f3f8; }
.qc-platform-preview-source {
  margin: 8px 0 2px; font-size: 11px; line-height: 1.45;
  color: #47566f; font-weight: 700; overflow-wrap: anywhere;
}
.qc-platform-preview[hidden] { display: none; }
.qc-platform-preview { min-width: 0; margin-top: 10px; padding: 12px;
  border: 1px solid #dbe3ef; border-radius: 11px; background: #fff; }
.qc-platform-preview label { display: flex; flex-direction: column; gap: 6px; font-size: 12px;
  color: #485a77; font-weight: 650; }
.qc-platform-preview select { min-width: 0; width: 100%; padding: 10px;
  border: 1px solid #cbd6e9; border-radius: 8px; background: #fff; color: #243650; }
#qc-platform-preview-card { display: flex; flex-direction: column; gap: 8px;
  min-width: 0; padding: 14px 0 7px; overflow-wrap: anywhere; }
#qc-platform-preview-card > strong { font-size: 13px; color: #18243a; }
.qc-platform-media { display: flex; flex-wrap: wrap; gap: 5px; min-width: 0; }
.qc-platform-media img { width: 75px; height: 75px; max-width: 100%;
  object-fit: cover; border: 1px solid #dce4ee; border-radius: 7px; }
.qc-platform-media video { width: 100%; max-height: 185px; background: #111827;
  border-radius: 8px; }
.qc-platform-caption { white-space: pre-wrap; overflow-wrap: anywhere;
  margin: 0; font-size: 12px; line-height: 1.48; color: #2b3c55; }
.qc-platform-notes { margin: 0; padding-left: 18px; color: #a04127;
  font-size: 11px; overflow-wrap: anywhere; }
.qc-footer {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px;
  padding: 16px 27px; border-top: 1px solid #e4eaf2; background: #fff;
}
.qc-feedback { flex: 1 1 270px; min-width: 0; }
#qc-status { font-size: 12px; color: #566884; }
.qc-preflight-issues {
  margin-top: 9px; padding: 9px 11px; max-height: 148px; overflow-y: auto;
  border: 1px solid #dbe2ed; border-radius: 9px; background: #f8fafc;
  font-size: 12px; color: #35465e; overflow-wrap: anywhere;
}
.qc-preflight-issues[hidden] { display: none; }
.qc-preflight-issues > strong { display: block; margin-bottom: 5px; color: #962d28; }
.qc-preflight-issues ul { margin: 0; padding: 0; list-style: none; }
.qc-preflight-issues li { display: flex; flex-direction: column; gap: 2px; padding: 6px 0; }
.qc-preflight-issues li + li { border-top: 1px solid #e4eaf1; }
.qc-preflight-issues li strong { font-weight: 700; color: #1f3049; }
.qc-preflight-issues li span { white-space: pre-wrap; }
#qc-status.is-error, .qc-loading.is-error { color: #b42318; }
.qc-buttons { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.qc-buttons button { padding: 11px 13px; border-radius: 9px; font-size: 12px; font-weight: 750; cursor: pointer; }
.qc-buttons button:disabled { opacity: .55; cursor: wait; }
.qc-subtle { background: #f0f3f9; border: 1px solid #dbe2ed; color: #354862; }
.qc-primary { background: #315ee8; color: #fff; border: 1px solid #315ee8; }
.qc-primary:hover { background: #284fc8; }
.qc-loading { padding: 40px; }
.qc-drop.is-disabled { opacity: .55; cursor: not-allowed; }
.qc-video-section { margin-top: 16px; }
.qc-video-drop { min-height: 98px; padding: 15px 12px; }
.qc-video-drop .qc-drop-icon { font-size: 22px; line-height: 22px; }
.qc-video-preview { min-width: 0; margin-top: 12px; }
.qc-video-card {
  display: grid; grid-template-columns: minmax(140px, 40%) minmax(0,1fr);
  gap: 13px; padding: 12px; border: 1px solid #dbe2ec;
  border-radius: 12px; background: #f8fafc;
}
.qc-video-card video {
  display: block; width: 100%; max-height: 180px; border-radius: 8px; background: #111827;
}
.qc-video-meta { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; }
.qc-video-meta strong { font-size: 13px; overflow-wrap: anywhere; }
.qc-video-meta span { font-size: 12px; color: #566884; }
.qc-video-meta button {
  min-height: 36px; padding: 7px 11px; border: 1px solid #b8c8e2;
  border-radius: 8px; background: #fff; color: #304e8f;
  font-size: 12px; font-weight: 700; cursor: pointer;
}
.qc-video-meta button:disabled { opacity: .5; cursor: not-allowed; }
@media (max-width: 530px) {
  .qc-video-card { grid-template-columns: minmax(0,1fr); }
  .qc-video-card video { max-height: 220px; }
}

@media (max-width: 810px) {
  .qc-overlay { padding: 0; }
  .qc-dialog {
    width: 100%; max-height: 100dvh; height: 100dvh; min-height: 0;
    border-radius: 0; border: none;
  }
  .qc-head { padding: 14px 16px; }
  .qc-head h2 { font-size: 20px; }
  .qc-main { display: block; overflow-y: auto; }
  .qc-editor { overflow: visible; padding: 18px 16px; }
  .qc-right { overflow: visible; border-left: none; border-top: 1px solid #e5eaf1; padding: 20px 16px; }
  #qc-text { min-height: 170px; }
  .qc-target-toggle {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    width: 100%; min-height: 44px; margin-top: 12px; padding: 10px 14px;
    border: 1px solid #cbd7ed; border-radius: 10px; background: #fff;
    color: #2448a4; font: inherit; font-size: 14px; font-weight: 750; cursor: pointer;
  }
  .qc-target-toggle span { font-size: 21px; line-height: 1; }
  .qc-target-toggle:focus-visible { outline: 3px solid #82aaff; outline-offset: 2px; }
  .qc-target-picker {
    display: none; position: fixed; inset: 0; z-index: 205;
    padding: max(16px,env(safe-area-inset-top)) 16px max(14px,env(safe-area-inset-bottom));
    flex-direction: column; min-height: 0; background: #f7f9fc;
    overflow: hidden;
  }
  .qc-target-picker.is-open { display: flex; }
  .qc-target-sheet-head {
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    flex-shrink: 0; border-bottom: 1px solid #dfe7f2;
    margin: -4px 0 8px; padding: 4px 0 13px;
  }
  .qc-target-sheet-head h4 { font-size: 17px; margin: 0; color: #172338; }
  #qc-target-done {
    min-height: 42px; min-width: 78px; border: 1px solid #315ee8; border-radius: 9px;
    background: #315ee8; color: #fff; font-size: 14px; font-weight: 750; cursor: pointer;
  }
  .qc-target-actions { flex-shrink: 0; margin: 5px 0 10px; }
  .qc-accounts {
    flex: 1; min-height: 0; max-height: none; overflow-y: auto;
    overscroll-behavior: contain; padding: 6px 10px;
  }
  .qc-account { min-height: 44px; font-size: 14px; padding: 12px 5px; }
  .qc-account input { width: 20px; height: 20px; }
  .qc-footer {
    padding: 11px 16px max(11px,env(safe-area-inset-bottom));
    flex-shrink: 0;
  }
  .qc-buttons { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
  #qc-send { grid-column: 1 / -1; grid-row: 1; min-height: 46px; }
}
@media (max-width: 390px) {
  .qc-head { gap: 8px; }
  .qc-head h2 { font-size: 18px; }
  .qc-photo-head { gap: 5px; }
  .qc-images { gap: 7px; }
  .qc-image { width: calc(50% - 4px); }
}
