/**
 * Tour Engine Studio — shared editor chrome (site builder + tour editor).
 * GitHub-inspired dark palette; load after theme.css in studio apps.
 */
:root {
  --bg: #0f1115;
  --bg-elevated: #161b22;
  --bg-hover: #21262d;
  --bg-panel: #21262d;
  --bg-input: #0d1117;
  --border: #2d333b;
  --border-subtle: #30363d;
  --text: #e8eaed;
  --text-muted: #8b949e;
  --accent: #58a6ff;
  --accent-hover: #79b8ff;
  --accent-muted: rgba(56, 139, 253, 0.08);
  --success: #3fb950;
  --warning: #d29922;
  --danger: #f85149;
  --radius: 8px;
  --radius-sm: 6px;
  --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --shadow-panel: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.studio-app {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
}

.studio-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-shrink: 0;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
}

.studio-header__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.studio-header__brand h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  white-space: nowrap;
}

.studio-header__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.ui-lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.ui-lang-switcher__label {
  white-space: nowrap;
}

.ui-lang-switcher__select {
  font: inherit;
  color: var(--text);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm, 6px);
  padding: 4px 8px;
  cursor: pointer;
}

.ui-lang-switcher__select:hover {
  border-color: var(--accent);
}

.studio-badge {
  font-size: 12px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  background: var(--bg-hover);
  color: var(--text-muted);
  white-space: nowrap;
}

.studio-badge--beta {
  background: #1c2d41;
  color: var(--accent);
  font-weight: 500;
}

.studio-badge--version {
  font-family: ui-monospace, monospace;
  font-size: 11px;
}

.studio-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

/* Scoped button + form reset for studio chrome */
.studio-app button {
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-size: 13px;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.studio-app button.ghost,
.studio-app .upload-btn.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-subtle);
}

.studio-app button.ghost:hover,
.studio-app .upload-btn.ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-muted);
}

.studio-app button.small,
.studio-app .upload-btn.small {
  font-size: 12px;
  padding: 5px 10px;
}

.studio-app button.danger {
  background: #da3633;
  border-color: #da3633;
  color: #fff;
}

.studio-app button.danger:hover {
  background: #f85149;
  border-color: #f85149;
}

.studio-app button:not(.ghost):not(.danger):not(.tool-btn):not(.upload-btn):not(.modal__close):not(.hotspot-float__close):not(.welcome-screen__cta) {
  background: #238636;
  border: 1px solid #238636;
  color: #fff;
}

.studio-app button:not(.ghost):not(.danger):not(.tool-btn):not(.upload-btn):not(.modal__close):not(.hotspot-float__close):not(.welcome-screen__cta):hover {
  background: #2ea043;
  border-color: #2ea043;
}

.studio-app input,
.studio-app select,
.studio-app textarea {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text);
}

.studio-app input:focus,
.studio-app select:focus,
.studio-app textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 0;
  border-color: var(--accent);
}

.studio-app label {
  color: var(--text-muted);
  font-size: 12px;
}

.studio-app .badge {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background: var(--bg-hover);
  color: var(--text-muted);
}
