/* src/widget.css */
:root {
  color-scheme: light dark;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background: #f5f3ff;
  color: #1f1635;
}
* {
  box-sizing: border-box;
}
html,
body,
#app {
  min-height: 100%;
  margin: 0;
}
body {
  min-height: 660px;
}
.shell {
  min-height: 660px;
  display: grid;
  grid-template-rows: auto 1fr;
}
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 18px;
  border-bottom: 1px solid #ddd6fe;
  background: rgba(255, 255, 255, .92);
}
.eyebrow {
  color: #7c3aed;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .16em;
}
h1 {
  margin: 2px 0 0;
  font-size: 18px;
  font-weight: 700;
}
.actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.export-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-left: 10px;
  border-left: 1px solid #ddd6fe;
}
.quality-badge {
  padding: 4px 6px;
  border-radius: 999px;
  background: #ede9fe;
  color: #6d28d9;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
}
.status {
  color: #6b6477;
  font-size: 12px;
}
.status.error {
  color: #b42318;
}
button {
  border: 0;
  border-radius: 9px;
  padding: 9px 14px;
  font: inherit;
  font-weight: 700;
  color: white;
  background: #7c3aed;
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: .55;
}
button.secondary {
  padding: 7px 10px;
  color: #5b21b6;
  background: #ede9fe;
  font-size: 12px;
}
button.secondary:hover:not(:disabled) {
  background: #ddd6fe;
}
.workspace {
  min-height: 590px;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, .55fr);
}
.canvas {
  min-width: 0;
  overflow: auto;
  padding: 28px;
  background: #faf9ff;
}
.source-pane {
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 0;
  border-left: 1px solid #ddd6fe;
  background: #171320;
}
.source-pane.located {
  box-shadow: inset 3px 0 #8b5cf6;
}
.source-pane > span {
  padding: 12px 14px;
  color: #c4b5fd;
  font-size: 12px;
  font-weight: 700;
  border-bottom: 1px solid #332a43;
}
textarea {
  width: 100%;
  min-height: 540px;
  resize: none;
  border: 0;
  outline: 0;
  padding: 16px;
  background: #171320;
  color: #f5f3ff;
  font:
    13px/1.6 ui-monospace,
    SFMono-Regular,
    Menlo,
    Consolas,
    monospace;
}
textarea::selection {
  color: #fff;
  background: #7c3aed;
}
@media (max-width: 760px) {
  .workspace {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(380px, 1fr) 320px;
  }
  .source-pane {
    border-left: 0;
    border-top: 1px solid #ddd6fe;
  }
  .status {
    display: none;
  }
  .quality-badge {
    display: none;
  }
  .toolbar {
    align-items: flex-start;
  }
  .actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  textarea {
    min-height: 270px;
  }
}
@media (prefers-color-scheme: dark) {
  :root {
    background: #100d16;
    color: #f5f3ff;
  }
  .toolbar {
    background: rgba(23, 19, 32, .95);
    border-color: #332a43;
  }
  .canvas {
    background: #100d16;
  }
  .status {
    color: #aaa1b8;
  }
  .export-actions {
    border-color: #332a43;
  }
  .quality-badge,
  button.secondary {
    color: #ddd6fe;
    background: #332a43;
  }
}
