/* UI Themes workbench surface.
   Translated from the UI Themes editor sources; shared tokens and controls live in preview.css. */

/* UI Themes workbench */

.theme-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr);
  gap: 12px;
  align-items: start;
}

@media (max-width: 1100px) {
  .theme-workbench {
    grid-template-columns: minmax(0, 1fr);
  }
}

.theme-workbench__preview {
  min-width: 0;
}

.theme-panelbar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 8px;
  margin-bottom: 8px;
  background: var(--bf-raised, #1a1d28);
  border: 1px solid var(--bf-border, #2a2f45);
  border-radius: 5px;
}

.theme-chip--on {
  background: var(--bf-selection-wash, rgba(88, 101, 242, 0.18));
  border: 1px solid var(--bf-selection-edge, #5865f2);
  color: var(--bf-text-primary, #e8ecf4);
}

.theme-preview__frame {
  padding: 10px;
  background: var(--bf-deep, #0d0f16);
  border: 1px solid var(--bf-border, #2a2f45);
  border-radius: 5px;
}

.theme-preview__scene {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-height: 320px;
  background: linear-gradient(180deg, #141826 0%, #0b0d13 70%);
  border: 1px solid var(--bf-divider, #1e2235);
  border-radius: 4px;
  overflow: hidden;
}

.theme-preview__scene--cinematic {
  align-items: flex-end;
}

.theme-preview__scene--tutorial {
  align-items: flex-start;
  justify-content: flex-end;
}

.theme-preview__scene--sidepanel {
  justify-content: flex-end;
  align-items: center;
}

.theme-preview__safe-area {
  position: absolute;
  inset: 12px;
  border: 1px dashed var(--bf-text-subtle, #5c6480);
  border-radius: 4px;
  color: var(--bf-text-subtle, #5c6480);
  font-size: 9px;
  padding: 4px;
}

.theme-preview__card {
  display: flex;
  gap: 10px;
  width: min(640px, 92%);
  margin: 18px;
  padding: 12px;
  background: rgba(13, 15, 22, 0.92);
  border: 1px solid var(--bf-border-strong, #3d4460);
  border-radius: 6px;
}

.theme-preview__portrait {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  min-height: 72px;
  background: var(--bf-raised, #1a1d28);
  border: 1px solid var(--bf-border, #2a2f45);
  border-radius: 4px;
  color: var(--bf-text-subtle, #5c6480);
  font-size: 9px;
  flex: 0 0 auto;
}

.theme-preview__body {
  flex: 1 1 auto;
  min-width: 0;
}

.theme-preview__name {
  color: var(--bf-selection-edge, #8f9bff);
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 4px;
}

.theme-preview__line {
  color: var(--bf-text-primary, #e8ecf4);
  font-size: 12px;
  line-height: 1.5;
}

.theme-preview__choices {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.theme-preview__choice {
  padding: 4px 10px;
  background: var(--bf-raised, #1a1d28);
  border: 1px solid var(--bf-border, #2a2f45);
  border-radius: 4px;
  color: var(--bf-text-secondary, #c8d0e0);
  font-size: 10px;
}

.theme-preview__choice--selected {
  border-color: var(--bf-selection-edge, #5865f2);
  background: var(--bf-selection-wash, rgba(88, 101, 242, 0.18));
  color: var(--bf-text-primary, #e8ecf4);
}

.theme-preview__side {
  width: 100%;
  margin-top: 10px;
  padding: 8px;
  background: var(--bf-raised, #1a1d28);
  border: 1px dashed var(--bf-border-strong, #3d4460);
  border-radius: 4px;
  color: var(--bf-text-subtle, #5c6480);
  font-size: 10px;
}

.theme-samplebar {
  margin-top: 8px;
}

.theme-samplebar__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  margin-top: 6px;
  background: var(--bf-raised, #1a1d28);
  border: 1px solid var(--bf-border, #2a2f45);
  border-radius: 5px;
}

.theme-editing {
  padding: 10px;
  background: var(--bf-raised, #1a1d28);
  border: 1px solid var(--bf-border, #2a2f45);
  border-radius: 5px;
  min-width: 0;
}

.theme-field-grid {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 6px;
}

.theme-swatch-field {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px;
  background: var(--bf-deep, #0d0f16);
  border: 1px solid var(--bf-divider, #1e2235);
  border-radius: 4px;
  font-size: 10px;
  color: var(--bf-text-secondary, #c8d0e0);
}

.theme-statechips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}

.theme-family {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 100%;
  margin: 5px 0;
  padding: 9px 10px;
  background: var(--bf-raised, #1a1d28);
  border: 1px solid var(--bf-border, #2a2f45);
  border-radius: 5px;
  color: var(--bf-text-secondary, #c8d0e0);
  text-align: left;
  cursor: pointer;
}

.theme-family:hover {
  border-color: var(--bf-border-strong, #3d4460);
}

.theme-family--selected {
  border-color: var(--bf-selection-edge, #5865f2);
  background: var(--bf-hover-wash, rgba(88, 101, 242, 0.12));
}

.theme-family strong {
  color: var(--bf-text-primary, #e8ecf4);
  font-size: 11px;
}
