/* Shared, bounded model workbench. Existing website tokens supply light/dark colors. */
.ped-editor {
  --ped-bg: var(--field, var(--bg-secondary, #0d1420));
  --ped-text: var(--text, var(--text-primary, #e8eef8));
  --ped-muted: var(--muted, #94a3b8);
  --ped-border: var(--line, var(--border-color, rgba(150, 170, 200, 0.22)));
  --ped-accent: var(--accent, #087cff);
  color: var(--ped-text);
  font:
    400 14px/1.5 -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  max-width: 1100px;
  width: 100%;
  text-align: left;
}
.ped-editor * {
  box-sizing: border-box;
}
.ped-editor-heading {
  padding: 0 0 18px;
}
.ped-editor-heading h2 {
  font-size: 25px;
  line-height: 1.2;
  letter-spacing: -0.6px;
  margin: 6px 0 10px;
}
.ped-editor p {
  margin: 6px 0;
}
.ped-eyebrow {
  font-size: 10px;
  letter-spacing: 1.3px;
  font-weight: 700;
  color: var(--ped-muted);
  display: block;
}
.ped-muted {
  color: var(--ped-muted);
  font-size: 12px;
}
.ped-editor-layout {
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) minmax(290px, 1fr);
  gap: 24px;
}
.ped-browser {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.ped-filters {
  display: grid;
  gap: 8px;
}
.ped-editor input,
.ped-editor select,
.ped-editor textarea {
  color: var(--ped-text);
  background: var(--ped-bg);
  border: 1px solid var(--ped-border);
  border-radius: 10px;
  font: inherit;
  padding: 10px 12px;
  width: 100%;
  min-height: 40px;
}
.ped-editor select option {
  background: var(--ped-bg);
  color: var(--ped-text);
}
.ped-list {
  height: 450px;
  max-height: 51vh;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 5px 5px 5px 0;
}
.ped-editor .ped-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  border: 1px solid transparent;
  border-radius: 10px;
  width: 100%;
  padding: 10px 12px;
  margin: 0 0 4px;
  background: transparent;
  color: var(--ped-text);
  box-shadow: none;
  transform: none;
  font: inherit;
  cursor: pointer;
}
.ped-editor .ped-row strong {
  font-weight: 600;
  text-transform: capitalize;
}
.ped-editor .ped-row[aria-pressed="true"] {
  border-color: var(--ped-accent);
  background: rgba(64, 135, 255, 0.12);
}
.ped-editor .ped-row:hover {
  background: rgba(130, 145, 170, 0.13);
}
.ped-code {
  color: var(--ped-muted);
  font-size: 11px;
  overflow-wrap: anywhere;
  display: block;
}
.ped-preview {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding-left: 24px;
  border-left: 1px solid var(--ped-border);
}
.ped-current {
  display: flex;
  gap: 14px;
  align-items: center;
  min-height: 70px;
  padding-bottom: 10px;
}
.ped-current .ped-picture {
  width: 55px;
  height: 65px;
  flex: 0 0 55px;
}
.ped-current strong {
  font-size: 14px;
  display: block;
  text-transform: capitalize;
}
.ped-stage {
  height: 270px;
  position: relative;
  display: grid;
  place-items: center;
  border: 1px solid var(--ped-border);
  border-radius: 18px;
  background: radial-gradient(
    ellipse at 50% 100%,
    rgba(132, 150, 174, 0.18),
    transparent 70%
  );
  overflow: hidden;
}
.ped-picture {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  min-height: 0;
}
.ped-picture img {
  height: 100%;
  width: 100%;
  object-fit: contain;
  max-height: 100%;
  display: block;
  min-height: 0;
}
.ped-image-fallback {
  padding: 14px;
  text-align: center;
  font-size: 12px;
  color: var(--ped-muted);
}
.ped-current .ped-image-fallback {
  font-size: 9px;
  padding: 2px;
}
.ped-selected-name {
  font-size: 20px;
  margin: 10px 0 2px;
  text-transform: capitalize;
}
.ped-warning {
  font-size: 12px;
  color: var(--ped-muted);
}
.ped-confirm {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}
.ped-reason {
  font-size: 12px;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.ped-editor textarea {
  resize: vertical;
  max-height: 110px;
}
.ped-status {
  font-size: 12px;
  min-height: 20px;
  overflow-wrap: anywhere;
}
.ped-editor .ped-primary,
.ped-editor .ped-secondary {
  border: 1px solid var(--ped-border);
  border-radius: 10px;
  padding: 10px 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  min-height: 40px;
  box-shadow: none;
  transform: none;
}
.ped-editor .ped-primary {
  background: var(--ped-accent);
  color: #fff;
}
.ped-editor .ped-secondary {
  background: transparent;
  color: var(--ped-text);
}
.ped-editor button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.ped-editor :focus-visible {
  outline: 2px solid var(--ped-accent);
  outline-offset: 2px;
}
.ped-editor [hidden] {
  display: none !important;
}
.ped-empty {
  padding: 24px 10px;
  color: var(--ped-muted);
}
dialog.ped-editor-dialog {
  width: min(1050px, 96vw);
  max-width: 1050px;
}
.modal:has(.ped-editor) {
  width: min(1050px, 94vw);
  max-width: 1050px;
  max-height: 94vh;
}
.modal:has(.ped-editor) .modal-content {
  max-height: calc(94vh - 80px);
}
.ped-editor-dialog #dialog-body {
  min-width: 0;
}
@media (max-height: 790px) and (min-width: 721px) {
  .ped-stage {
    height: 150px;
  }
  .ped-list {
    max-height: 48vh;
  }
  .ped-editor-heading {
    padding-bottom: 10px;
  }
  .ped-editor-heading h2 {
    font-size: 21px;
    margin: 4px 0;
  }
  .ped-current {
    min-height: 45px;
  }
  .ped-current .ped-picture {
    height: 44px;
  }
  .ped-editor .ped-muted {
    font-size: 11px;
  }
  .ped-confirm {
    margin-top: 5px;
    gap: 5px;
  }
}
@media (max-width: 720px) {
  .ped-editor-layout {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .ped-list {
    height: 160px;
    max-height: 23vh;
  }
  .ped-preview {
    border-left: 0;
    border-top: 1px solid var(--ped-border);
    padding: 14px 0 0;
  }
  .ped-stage {
    height: 190px;
  }
  .ped-editor-heading h2 {
    font-size: 21px;
  }
  .ped-editor {
    max-width: 100%;
  }
}
