/* Bacara browser demo - the plugin's identity (DesignTokens.h):
   flat #1a1a1a window, black grid field, amber labels, #777 1px outlines
   with 3px radii, comic glass LEDs. Depth comes from the canvas gloss,
   not from CSS shadows. */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

:root {
  --bg: #1a1a1a;
  --field: #000000;
  --raised: #262626;
  --backdrop: #2b2b2b;
  --accent: #ffb000;
  --text: #ffffff;
  --dim: #9a9a9a;
  --muted: #808080;
  --outline: #777777;
  --play: #67c471;
}

html,
body {
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  min-height: 100%;
}

.play {
  max-width: 980px;
  margin: 0 auto;
  padding: 16px 16px 40px;
}

/* the wordmark: Copperplate small-caps, like Resources/bacara_white.svg */
.wordmark {
  font-family: Copperplate, "Copperplate Gothic Light", "Trajan Pro", serif;
  font-weight: bold;
  font-variant: small-caps;
  letter-spacing: 0.04em;
  font-size: 1.9rem;
  color: var(--text);
}

.tagline {
  color: var(--muted);
  margin: 3px 0 10px;
  font-size: 0.85rem;
}

/* controls: two toolbar strips, like the plugin's top/bottom toolbars -
   FLAT on the window background, separated by a plain black rule, no
   card chrome */

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin: 0;
  padding: 8px 2px;
  border-bottom: 1px solid #000000;
}

/* pushes itself (and what follows) to the right edge */
.toolbar .push {
  margin-left: auto;
}

/* a soft group divider gap */
.toolbar-gap {
  width: 1px;
  align-self: stretch;
  background: rgba(128, 128, 128, 0.35);
  margin: 2px 4px;
}

@media (max-width: 700px) {
  .toolbar .push {
    margin-left: 0;
  }
  .toolbar-gap {
    display: none;
  }
}

button {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--outline);
  border-radius: 3px;
  padding: 7px 12px;
  font-size: 0.9rem;
  cursor: pointer;
}

button:hover {
  border-color: var(--accent);
}

button.active {
  border-color: var(--accent);
  color: var(--accent);
}

.dice {
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 14px 4px 8px;
}

.dice svg {
  display: block;
}

.seed {
  color: var(--muted);
  font-size: 0.85rem;
}
.seed code {
  color: var(--text);
  font-family: ui-monospace, Menlo, Consolas, monospace;
}

/* transport: the app's amber play/stop glyphs, no pill */
.play-btn {
  min-width: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 10px;
}

.play-btn svg {
  display: block;
}

.play-btn .icon-stop {
  display: none;
}

.play-btn.playing {
  background: #333333;
}

.play-btn.playing .icon-play {
  display: none;
}

.play-btn.playing .icon-stop {
  display: block;
}

.slider {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--accent);
  font-size: 0.85rem;
}

/* Bacara-styled range inputs: flat dark track, amber (per-context) thumb -
   Safari needs the -webkit-appearance reset */
.slider input[type="range"] {
  width: 100px;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  height: 18px;
}

.slider input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  background: #333333;
  border-radius: 2px;
}

.slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 1.5px solid rgba(0, 0, 0, 0.55);
  margin-top: -4px;
}

.slider input[type="range"]::-moz-range-track {
  height: 4px;
  background: #333333;
  border-radius: 2px;
}

.slider input[type="range"]::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 1.5px solid rgba(0, 0, 0, 0.55);
}
.slider span {
  color: var(--text);
  min-width: 2.6em;
  text-align: right;
  font-family: ui-monospace, Menlo, Consolas, monospace; /* stable width */
  font-size: 0.8rem;
}

.status {
  min-height: 1.4em;
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: 6px;
}

/* the device voice editor: a PanelDock-style section - a #262626 header
   bar with the 2px amber left strip and black bottom rule (the plugin's
   panel-header grammar), flat body underneath */

.device-panel {
  margin: 8px 0 0;
  padding: 0;
}

.device-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 2px;
  margin-bottom: 10px;
}

.dev-tab {
  font-weight: 600;
}

.dev-tab-a.active {
  border-color: #ff4b4b;
  color: #ff7a7a;
}

.dev-tab-b.active {
  border-color: #5a5aff;
  color: #8f8fff;
}

.dev-wave {
  margin-left: 8px;
  min-width: 72px;
}

.device-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px 14px;
  padding: 0 2px 8px;
  border-bottom: 1px solid #000000;
}

.dev-param {
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: var(--accent);
  font-size: 0.75rem;
}

.dev-param-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.dev-param-value {
  color: var(--text);
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.75rem;
}

.dev-param input[type="range"] {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  height: 18px;
}

.dev-param input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  background: #333333;
  border-radius: 2px;
}

.dev-param input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 1.5px solid rgba(0, 0, 0, 0.55);
  margin-top: -4px;
}

.dev-param input[type="range"]::-moz-range-track {
  height: 4px;
  background: #333333;
  border-radius: 2px;
}

.dev-param input[type="range"]::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 1.5px solid rgba(0, 0, 0, 0.55);
}

@media (max-width: 760px) {
  .device-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* scale/key pickers: the plugin's combo look - transparent, #777 1px
   outline, radius 3, white text, amber label */
.picker {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--accent);
  font-size: 0.85rem;
}

.picker select {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--outline);
  border-radius: 3px;
  padding: 6px 22px 6px 10px;
  font-size: 0.85rem;
  cursor: pointer;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5'%3E%3Cpath d='M0 0l4 5 4-5z' fill='%239a9a9a'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
}

.picker select:hover {
  border-color: var(--accent);
}

/* macro knob strip - bordered cells like the plugin's MacroPanel */

.macros {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 3px;
  margin: 8px 0 0;
}

.macro-cell {
  background: var(--bg);
  border: 1px solid #2b2b2b;
  border-radius: 3px;
  padding: 4px 3px 5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.macro-label {
  font-size: 0.65rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.macro-knob {
  width: 56px;
  height: 56px;
  cursor: ns-resize;
  touch-action: none;
}

/* the sequencer stack: LED band over note grid - flat, no card */

.sequencer {
  margin: 8px 0 0;
}

.ledband,
.notegrid {
  display: block;
  width: 100%;
  touch-action: none;
}

.ledband {
  cursor: pointer; /* the LEDs are an edit surface, like the plugin */
}

.notegrid {
  cursor: ns-resize;
  margin-top: 2px;
}

@media (max-width: 700px) {
  .macros {
    grid-template-columns: repeat(4, 1fr);
  }
  .macro-knob {
    width: 44px;
    height: 44px;
  }
}

footer {
  margin-top: 24px;
  color: var(--dim);
  font-size: 0.9rem;
  line-height: 1.5;
}

footer a {
  color: var(--accent);
}

footer .tech {
  margin-top: 12px;
}

footer .tech summary {
  color: var(--accent);
  cursor: pointer;
  font-size: 0.9rem;
}

footer .tech p {
  margin-top: 8px;
}
