/* Reassurance and finishing: the save status and undo/redo in every mode, the cost and time line before an
   export, and the share screen after one (editor/saveStatus.js, editor/exportCost.js, editor/finish.js). */

/* ---- Save status: "Saved ✓", "Saving…", "Offline — saved on this device", "Couldn’t save — Retry" ---- */
.save-status { display: inline-block; }
.save-status.ok::before, .save-status.err::before { content: none; }
.save-status.offline { color: var(--warn); }
.save-status.offline::before { content: "● "; color: var(--warn); white-space: pre; }
.save-status .save-retry { color: var(--err); font: inherit; font-weight: 700; margin-left: 1px; }
@media (max-width: 900px) {
  /* Phones: an icon in the same place in every mode (the words are its tooltip), and Retry when it's needed. */
  .topbar .save-status { display: inline-flex; flex: none; min-width: 20px; justify-content: center; font-size: .95rem; }
  .topbar .save-status .ss-text { display: none; }
  .topbar .save-status::before { white-space: normal; }
  .topbar .save-status.ok::before { content: "✓"; color: var(--ok); }
  .topbar .save-status.busy::before { content: "…"; color: var(--warn); }
  .topbar .save-status.offline::before { content: "☁"; color: var(--warn); }
  .topbar .save-status.err::before { content: "⚠"; color: var(--err); }
  .topbar .save-status.err .save-retry { font-size: .8rem; margin-left: 4px; }
  .topbar #redo { display: inline-flex; }
}
@media (max-width: 380px) {
  .topbar-right { gap: 4px; }
  .topbar .icon-btn { width: 34px; height: 34px; }
}

/* ---- Before an export: cost · time, and "1 credit = 1 video" the first times ---- */
.gate-lead { font-size: 1.02rem; line-height: 1.45; margin: 0 0 8px; }
.cost-time { margin: 0 0 6px; }
.credit-tip { margin: 0 0 8px; }
.credit-tip .link { margin-left: 4px; }
.switch-tabs .notify-btn { margin-left: 2px; }

/* ---- After an export: the share screen ---- */
.share-panel.finish { margin-top: 0; padding-top: 0; border-top: 0; display: flex; flex-direction: column; gap: 10px; }
.finish-video { display: block; width: 100%; max-height: 46vh; object-fit: contain; border-radius: 12px; background: #000; cursor: pointer; }
.finish-native { width: 100%; justify-content: center; margin: 0; }
.finish-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.finish-btn { flex-direction: column; justify-content: center; gap: 6px; padding: 12px 4px; min-height: 72px; font-size: .82rem; text-align: center; }
.finish-btn .share-icon { width: 26px; height: 26px; }
.finish-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.finish-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.finish-actions .btn { justify-content: center; padding: 11px 14px; }
.finish-actions .btn[hidden] { display: none; }
.finish-caption summary { cursor: pointer; color: var(--muted); font-size: .85rem; padding: 2px 0; }
.finish-caption .share-caption { margin: 6px 0 4px; }
.make-another { margin-right: auto; }
@media (max-width: 600px) {
  .finish-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .finish-video { max-height: 38vh; }
}
