/* KI-Foto demo: gate, progress, errors, inspector, Lab/Werkstatt. The UI
   after opt-in is in ki-foto-app.css. Site tokens only, so themes apply. */

.kifoto-frame {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: clamp(1.1rem, 3vw, 2rem);
}

/* `hidden` must win over display rules like .btn's inline-flex. */
.kifoto-frame [hidden] { display: none; }

.kifoto-gate,
.kifoto-loading,
.kifoto-fail {
  display: grid;
  justify-items: start;
  gap: 0.9rem;
  max-width: 38rem;
}

.kifoto-gate p,
.kifoto-loading p,
.kifoto-fail p { margin: 0; color: var(--text-muted); }

/* Wrap label + size as one sentence, not two flex columns. */
.kifoto-gate .btn { display: inline-block; white-space: normal; text-align: left; line-height: 1.35; }
@media (max-width: 700px) {
  .kifoto-gate .btn { border-radius: var(--radius-md); }
}
.kifoto-gate .kifoto-note { font-size: 0.8rem; margin-top: -0.4rem; }

.kifoto-warn {
  color: var(--text);
  border-left: 3px solid var(--amber);
  padding-left: 0.75rem;
}

.kifoto-progress {
  width: min(100%, 26rem);
  height: 0.5rem;
  appearance: none;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  overflow: hidden;
  accent-color: var(--amber);
}
.kifoto-progress::-webkit-progress-bar { background: var(--surface-2); }
.kifoto-progress::-webkit-progress-value { background: var(--amber); border-radius: var(--radius-pill); transition: width 0.2s ease; }
.kifoto-progress::-moz-progress-bar { background: var(--amber); border-radius: var(--radius-pill); }

.kifoto-fail-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }

/* In the flow, not floating, so it never covers the draft. */
.kifoto-inspector { position: static; align-self: flex-end; }
/* The shared dark pill is unreadable on this surface in bright mode. */
.kifoto-inspector .demo-inspector-toggle { background: var(--surface-2); color: var(--text-muted); border-color: var(--border); }
.kifoto-inspector .demo-inspector-detail { max-width: 26rem; }

.kifoto-privacy { margin: 0.6rem 0 0; font-size: 0.78rem; color: var(--text-muted); }

/* ---- Lab / Werkstatt ---- */
.kifoto-shop-only { display: none; }
body.mode-shopfloor .kifoto .kifoto-lab-only { display: none; }
body.mode-shopfloor .kifoto .kifoto-shop-only { display: inline-flex; }

@media (prefers-reduced-motion: reduce) {
  .kifoto-progress::-webkit-progress-value { transition: none; }
}
