.chartifact-body {
    display: flex;
    flex-direction: column;
    height: 100vh;
    margin: 0;
}

.chartifact-main {
    display: flex;
    flex: 1;
}

.chartifact-main textarea {
    resize: none;
    padding: 5px 7px 10px 7px;
}

.chartifact-source {
    flex: 1;
}

.chartifact-preview {
    flex: 2;
}

/* Base styles for the toolbar */
.chartifact-toolbar {
  padding: 0.5em 1em;
  font-family: sans-serif;
  font-size: 10pt;
}


.chartifact-toolbar a {
  text-decoration: none;
  color: inherit;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 9pt;
}

.chartifact-toolbar button, .chartifact-toolbar select {
  font-size: 9pt;
}

.chartifact-toolbar button {
  background-color: inherit;
  color: inherit;
  cursor: pointer;
}

.chartifact-toolbar li {
  margin-top: 1em;
}

.chartifact-toolbar li:first-child {
  margin-top: 0;
}

/* Default: stack toolbar sections vertically */
.chartifact-toolbar > div {
  margin: 6px 0;
}

/* Wide screens: layout horizontally */
@media (min-width: 1000px) {
  .chartifact-toolbar {
    display: flex;
    justify-content: space-between;
  }
  .chartifact-toolbar > div {
    display: inline-block;
    margin: 0;
  }
}

/* Default (OS light theme) */
.chartifact-toolbar {
  background-color: #f3f3f3;
  color: #000;
}

/* OS dark theme fallback */
@media (prefers-color-scheme: dark) {
  .chartifact-toolbar {
    background-color: #2e2e2e;
    color: #ffffff;
  }
}

/* VS Code light theme */
body.vscode-light .chartifact-toolbar {
  background-color: #f3f3f3;
  color: #000;
}

/* VS Code dark theme */
body.vscode-dark .chartifact-toolbar {
  background-color: #2e2e2e;
  color: #fff;
}
