/* Temporary chat, share link and reply versions (ui/conversation-extras.js). */

/* The temporary switch is a glass capsule at the toolbar's far end on a new chat; inside a temporary chat it stays as a
   pressed, quiet badge so the person always knows this one will not be kept. */
.chat-toolbar .button.glass.temporary-toggle {
  inline-size: auto; gap: var(--space-1); padding-inline: var(--space-3) var(--space-4); border-radius: var(--radius-full);
  font-size: var(--text-footnote); font-weight: var(--weight-medium);
}
.temporary-toggle .icon { inline-size: 18px; block-size: 18px; }
.chat-panel:has(.empty-conversation) .temporary-toggle { margin-inline-start: auto; }
.chat-panel:not(:has(.empty-conversation)) .temporary-toggle:not([aria-pressed="true"]) { display: none; }
.chat-toolbar .button.glass.temporary-toggle[aria-pressed="true"] { background: var(--color-accent-soft); color: var(--color-accent); }
.temporary-toggle:disabled { opacity: 1; color: var(--color-accent); cursor: default; }
.temporary-note {
  justify-self: center; display: flex; align-items: center; gap: var(--space-2); padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full); background: var(--color-accent-soft); color: var(--color-accent);
  font-size: var(--text-caption); font-weight: var(--weight-medium); text-align: center;
}
.temporary-note[hidden] { display: none; }
/* A temporary chat cannot be branched or shared: those controls step aside instead of failing. */
[data-temporary="true"] .branch-message { display: none; }

/* Share dialog */
#share-dialog { display: grid; gap: var(--space-3); }
#share-dialog:not([open]) { display: none; }
.share-state { color: var(--color-muted); font-size: var(--text-subhead); }
.share-state.error { color: var(--color-danger); }
/* Locked conversations («رشد-۱۹»): the code dialog's fields, sized like the share dialog's. */
#chat-lock-dialog form { display: grid; gap: var(--space-3); }
.chat-lock-field { display: grid; gap: var(--space-1); }
.chat-lock-field input { inline-size: 100%; padding: var(--space-2) var(--space-3); border: 0; border-radius: var(--radius-md); background: var(--color-fill); color: var(--color-ink);
  font: inherit; font-size: max(16px, var(--text-body)); letter-spacing: .4em; text-align: center; }
.chat-lock-field[hidden] { display: none; }
.share-link { display: flex; gap: var(--space-2); }
.share-link[hidden] { display: none; }
.share-link input { flex: 1; min-inline-size: 0; font-size: var(--text-subhead); }
#share-dialog .dialog-actions { flex-wrap: wrap; }
.share-stop { margin-inline-end: auto; }

/* Reply versions: a compact ‹ 2 of 3 › at the start of the actions row. */
.version-switch { display: inline-flex; align-items: center; gap: 2px; margin-inline-end: var(--space-2); color: var(--color-muted); font-size: var(--text-caption); font-variant-numeric: var(--numeric); }
.version-step {
  display: grid; place-items: center; inline-size: 28px; block-size: 28px; padding: 0; border: 0; border-radius: 50%;
  background: transparent; color: inherit; cursor: pointer; transition: background-color var(--motion-fast) ease, color var(--motion-fast) ease;
}
.version-step .icon { inline-size: 16px; block-size: 16px; }
.version-step:disabled { opacity: .35; cursor: default; }
@media (hover: hover) and (pointer: fine) { .version-step:hover:not(:disabled) { background: var(--color-fill); color: var(--color-ink); } }
@media (pointer: coarse) { .version-step { inline-size: 44px; block-size: 44px; } }
.version-count { min-inline-size: 4.5ch; text-align: center; }
.version-note { margin-block-start: var(--space-2); }
/* The version switcher says it better than "replaces message N": that visible note steps aside (screen readers keep theirs). */
.message.assistant:has(.version-switch) .message-version:not(.sr-only) { display: none; }
