/* ============================================================================
   studio.css — chrome shared by the homepage and the editor (not the slides).
   Slides keep their own tokens from theme-default.css; the studio UI uses the
   --ui-* tokens below so the two never collide.
   ============================================================================ */
.studio {
  --ui-bg: #17141d;
  --ui-panel: #211d29;
  --ui-raised: #2b2635;
  --ui-line: #3a3446;
  --ui-text: #f1edf7;
  --ui-muted: #a69db5;
  --ui-accent: #8b5cf6;
  --ui-accent-ink: #ffffff;
  --ui-teal: #12c2b0;
  --ui-danger: #f26b6b;
  --ui-step: #e8590c; /* click-to-reveal badges: stands out on violet and white slides */
  --ui-radius: 10px;
  --ui-font: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  height: auto;
  min-height: 100%;
  margin: 0;
  background: var(--ui-bg);
  color: var(--ui-text);
  font-family: var(--ui-font);
  font-size: 14px;
}

.studio .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 32px;
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--ui-line);
  border-radius: 8px;
  background: var(--ui-raised);
  color: var(--ui-text);
  font: 600 0.8rem/1 var(--ui-font);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.studio .btn:hover {
  border-color: var(--ui-muted);
}
.studio .btn:focus-visible,
.studio a:focus-visible,
.studio button:focus-visible,
.studio input:focus-visible,
.studio select:focus-visible,
.studio textarea:focus-visible {
  outline: 2px solid var(--ui-teal);
  outline-offset: 2px;
}
.studio .btn--primary {
  background: var(--ui-accent);
  border-color: var(--ui-accent);
  color: var(--ui-accent-ink);
}
.studio .btn--primary:hover {
  background: #7c4ef0;
  border-color: #7c4ef0;
}
.studio .btn--danger:hover {
  border-color: var(--ui-danger);
  color: var(--ui-danger);
}
.studio .btn--icon {
  width: 32px;
  padding: 0;
}
.studio .btn[disabled] {
  opacity: 0.45;
  cursor: default;
}

/* live slide thumbnail (engine/thumb.js) */
.thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #fff;
}
.thumb .slide-frame {
  pointer-events: none;
}

/* ---- shared by the homepage and the editor: form fields, dialogs, toasts ---- */
.pf-field {
  display: block;
  margin-bottom: 0.8rem;
  padding: 2px;
  border-radius: 6px;
}
.pf-label {
  display: block;
  margin-bottom: 0.3rem;
  color: var(--ui-muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.pf-input {
  width: 100%;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--ui-line);
  border-radius: 7px;
  background: var(--ui-bg);
  color: var(--ui-text);
  font: 0.82rem/1.4 var(--ui-font);
  resize: vertical;
}
.pf-input:focus { border-color: var(--ui-accent); outline: none; }
.pf-hint {
  margin: 0.25rem 0 0.8rem;
  color: var(--ui-muted);
  font-size: 0.72rem;
  line-height: 1.45;
}
.ed-dialog {
  width: min(1100px, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  padding: 0;
  border: 1px solid var(--ui-line);
  border-radius: 12px;
  background: var(--ui-panel);
  color: var(--ui-text);
  font-family: var(--ui-font);
}
.ed-dialog::backdrop { background: rgba(10, 8, 14, 0.7); }
.ed-dialog__head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.2rem;
  border-bottom: 1px solid var(--ui-line);
  background: var(--ui-panel);
}
.ed-dialog__head h2 { margin: 0; font-size: 1rem; }
.ed-toasts {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  z-index: 80;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  transform: translateX(-50%);
}
.ed-toast {
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  background: var(--ui-raised);
  border: 1px solid var(--ui-line);
  font-size: 0.8rem;
  box-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.8);
}
.ed-toast--error { border-color: var(--ui-danger); color: #ffd0d0; }
.studio .btn--danger-solid {
  background: #c93a3a;
  border-color: #c93a3a;
  color: #fff;
}
.studio .btn--danger-solid:hover {
  background: #b02f2f;
  border-color: #b02f2f;
}
