/* Preview mode — see js/core/preview.js.
   Two things: the Preview button on the sign-in screen, and the banner that
   makes it obvious you are not looking at real data. */

/* ── the way in, on the sign-in card ───────────────────────────────────── */

.auth-preview-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-top: 16px;
}

.auth-preview {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-preview:hover { color: var(--text); }

.auth-preview-hint {
  font-family: var(--font);
  font-size: 12px;
  color: var(--text-faint);
}

/* ── the banner ────────────────────────────────────────────────────────── */

#preview-banner {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 9500;

  display: flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100vw - 24px);
  padding: 10px 12px 10px 14px;

  border: 1px solid color-mix(in srgb, var(--warn) 45%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--warn) 12%, var(--surface));
  box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
}

/* Bottom-centred rather than a full-width strip at the top: the toolbar is
   already dense, and a top bar would push the whole layout down by its own
   height, so the preview would not be showing the real proportions. */

.preview-dot {
  flex: 0 0 auto;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--warn);
}

.preview-text {
  font-family: var(--font);
  font-size: 12.5px;
  color: var(--text);
  line-height: 1.4;
}

.preview-text strong { color: var(--warn); font-weight: 700; }

.preview-cta {
  flex: 0 0 auto;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}

.preview-cta:hover { background: color-mix(in srgb, var(--accent) 16%, transparent); }

.preview-close {
  flex: 0 0 auto;
  width: 22px; height: 22px;
  display: grid; place-items: center;
  border: none; border-radius: 50%;
  background: transparent;
  color: var(--text-muted);
  font-size: 17px; line-height: 1;
  cursor: pointer;
}

.preview-close:hover { color: var(--text); }

/* ── read-only cues ────────────────────────────────────────────────────── */

/* The interaction lock is a capture-phase listener in preview.js -- this is
   only the visual half, so nothing here is load-bearing. It has to be, because
   app.js rebuilds much of the DOM from strings and would wipe any attribute
   stamped onto a control. */
body.preview input,
body.preview textarea,
body.preview select {
  opacity: .5;
  cursor: not-allowed;
}

/* Text stays legible -- dimming a whole module would misrepresent what the
   product looks like, which is the one thing a preview must get right. */
body.preview .btn,
body.preview .tool-btn,
body.preview button:not(.suite-tab):not(.nav-btn):not(.preview-cta):not(.preview-close) {
  cursor: not-allowed;
}

@media (max-width: 640px) {
  #preview-banner {
    left: 12px; right: 12px;
    bottom: 64px;              /* clear of the mobile bottom nav */
    transform: none;
    max-width: none;
    border-radius: 14px;
  }
  .preview-text { font-size: 12px; }
}
