/* Compatibility layer for the compiled frontend's simplified theme editor. */
body:has(.theme-studio-shell) .theme-structure-panel,
body:has(.theme-studio-shell) .theme-controls-toolbar,
body:has(.theme-studio-shell) .theme-console-stats,
body:has(.theme-studio-shell) .theme-editor-target-note,
body:has(.theme-studio-shell) .theme-color-areas,
body:has(.theme-studio-shell) .theme-color-purpose {
  display: none !important;
}

body:has(.theme-studio-shell) .theme-workbench {
  display: block !important;
}

body:has(.theme-studio-shell) .theme-editor-panel {
  width: 100% !important;
}

body:has(.theme-studio-shell) .theme-settings-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)) !important;
}

.theme-color-field[hidden],
.theme-settings-group[hidden] {
  display: none !important;
}

.simple-theme-panel + .theme-studio-shell {
  display: none !important;
}

.simple-theme-panel {
  padding: 28px !important;
}

.simple-theme-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.simple-theme-head span {
  display: block;
  color: var(--theme-button-background-color);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.simple-theme-head h3 {
  margin: 5px 0 7px;
}

.simple-theme-head p {
  margin: 0;
  color: var(--theme-secondary-text-color);
}

.simple-theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}

.simple-theme-field {
  display: block;
  padding: 16px;
  border: 1px solid var(--theme-card-border-color);
  border-radius: 14px;
  background: var(--theme-card-muted-background-color);
}

.simple-theme-field-title,
.simple-theme-field small {
  display: block;
}

.simple-theme-field-title {
  color: var(--theme-primary-text-color);
  font-weight: 800;
}

.simple-theme-field small {
  min-height: 34px;
  margin: 4px 0 10px;
  color: var(--theme-secondary-text-color);
}

.simple-theme-field > div {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 9px;
}

.simple-theme-field input[type="color"] {
  width: 48px;
  height: 42px;
  padding: 2px;
  border: 1px solid var(--theme-card-border-color);
  border-radius: 9px;
  background: var(--theme-card-background-color);
}

.simple-theme-field input[type="text"] {
  min-width: 0;
  padding: 9px 11px;
  border: 1px solid var(--theme-card-border-color);
  border-radius: 9px;
  background: var(--theme-card-background-color);
  color: var(--theme-primary-text-color);
  font: inherit;
}

.simple-theme-status {
  min-height: 22px;
  margin-bottom: 10px;
  color: var(--theme-success-text-color);
  font-weight: 700;
}

.simple-theme-error {
  color: var(--theme-error-text-color);
}

@media (max-width: 720px) {
  .simple-theme-head {
    flex-direction: column;
  }

  .simple-theme-head .btn {
    width: 100%;
  }
}
