/* SEQ-16 — brushed aluminium top plate, black step strip with lit pads
   (in the spirit of the silver bassline boxes of the early eighties). */

.seq {
  --ink: #1d2024;
  --ink-dim: #5b6168;
  --line: rgba(29, 32, 36, 0.45);
  --accent: #d8402f;

  position: relative;
  width: max-content;
  padding: 14px 20px 18px;
  border-radius: 10px;
  border: 1px solid #4a4e53;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.09) 0 1px, rgba(0, 0, 0, 0.025) 1px 2px, transparent 2px 4px),
    linear-gradient(180deg, #e5e7ea 0%, #c9cdd1 50%, #b4b9be 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 -3px 0 rgba(0, 0, 0, 0.14),
    0 26px 34px rgba(0, 0, 0, 0.55),
    0 5px 9px rgba(0, 0, 0, 0.42);
  color: var(--ink);
}

.seq-top { display: flex; align-items: center; gap: 24px; margin-bottom: 12px; }
.seq-brand { display: flex; align-items: baseline; gap: 10px; }
.seq-logo {
  font: 700 26px/1 var(--logo-font);
  letter-spacing: 0.02em;
  color: #24272b;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.75);
}
.seq-sub { font: 700 9px var(--font); letter-spacing: 0.36em; color: var(--accent); }
.seq .vfd { width: 290px; }

/* ------------------------------------------------------------- main row */

.seq-main { display: flex; align-items: center; gap: 16px; }

.seq-display {
  display: flex;
  flex-direction: column;
  flex: none;
  width: 176px;
  height: 108px;
  padding: 9px 12px;
  border-radius: 6px;
  background:
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.18) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse at 50% 35%, #0a201c, var(--vfd-bg));
  box-shadow: inset 0 2px 7px rgba(0, 0, 0, 0.95), 0 0 0 2px #2a2d30, 0 0 0 3px #8e9398, 0 1px 0 3px #f2f4f5;
  color: var(--vfd);
  font-family: var(--mono);
  text-shadow: 0 0 7px rgba(125, 255, 224, 0.7);
}
.seq-state { display: flex; justify-content: space-between; gap: 6px; font-size: 10px; letter-spacing: 0.08em; white-space: nowrap; }
.seq-note {
  margin: auto 0;
  font-size: 30px;
  font-weight: 600;
  line-height: 1.1;
  white-space: nowrap;
}
.seq-info { font-size: 10px; letter-spacing: 0.08em; opacity: 0.7; white-space: nowrap; }
.seq.is-rec .seq-state .js-state { color: #ff8a73; text-shadow: 0 0 7px rgba(255, 90, 60, 0.7); }

.seq-controls { display: flex; align-items: center; gap: 0; }
.seq-controls ws-knob { --k: 62px; }
.seq-switches { display: flex; gap: 10px; margin-left: 8px; }

.seq-jacks {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-left: auto;
  padding: 10px 12px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.07);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px 0 rgba(255, 255, 255, 0.6);
}

/* ------------------------------------------------------------ step strip */

.seq-strip {
  --ink: #eceae4;
  --ink-dim: #8b9198;
  --line: rgba(236, 234, 228, 0.4);

  display: flex;
  gap: 8px;
  margin-top: 14px;
  padding: 10px 12px 12px 10px;
  border-radius: 6px;
  background: linear-gradient(180deg, #1f2125, #141518);
  box-shadow: inset 0 2px 7px rgba(0, 0, 0, 0.85), 0 1px 0 rgba(255, 255, 255, 0.7);
  color: var(--ink);
}

/* Rows: step number, note knob + name, gate, accent, slide. */
.seq-rows, .seq-step {
  display: grid;
  grid-template-rows: 26px 44px 14px 20px 20px 20px;
  row-gap: 6px;
}
.seq-rows {
  width: 50px;
  font: 700 8px var(--font);
  letter-spacing: 0.14em;
  color: var(--ink-dim);
}
.seq-rows span { display: flex; align-items: center; justify-content: flex-end; }
.seq-rows .row-note { grid-row: 2 / 4; }
.row-gate { color: #e9e1c9; }
.row-accent { color: #f0a046; }
.row-slide { color: #6cc3ff; }

.seq-steps { display: flex; gap: 4px; }
.seq-step { justify-items: center; width: 50px; }
.seq-step:nth-child(4n + 1):not(:first-child) {
  margin-left: 6px;
  padding-left: 9px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}
.seq-step ws-knob { width: 50px; }
.seq-step.beyond > * { opacity: 0.32; }

.seq-num {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 26px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--ink-dim);
  font: 700 11px var(--mono);
  cursor: pointer;
}
.seq-num:hover { background: rgba(255, 255, 255, 0.06); color: var(--ink); }
.seq-num:focus-visible { outline: 2px solid var(--focus); outline-offset: 0; }
.seq-led {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3a1309;
  box-shadow: 0 0 0 1px #000;
}
.seq-step.playing .seq-led { background: #ff4a2a; box-shadow: 0 0 0 1px #000, 0 0 8px 2px rgba(255, 74, 42, 0.75); }
.seq-step.playing .seq-num { color: var(--ink); }
.seq.is-rec .seq-step.cursor .seq-num { color: #fff; box-shadow: inset 0 0 0 2px #d8402f; }

.seq-name {
  font: 600 10px/14px var(--mono);
  color: var(--vfd);
  text-shadow: 0 0 5px rgba(125, 255, 224, 0.5);
  white-space: nowrap;
}

.seq-pad {
  width: 40px;
  height: 20px;
  border: 0;
  border-radius: 4px;
  background: linear-gradient(180deg, #3a3d42, #2a2c30);
  box-shadow: 0 2px 0 #0b0c0d, inset 0 1px 0 rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: background 0.08s, box-shadow 0.08s;
}
.seq-pad:active { transform: translateY(1px); box-shadow: 0 1px 0 #0b0c0d, inset 0 1px 0 rgba(255, 255, 255, 0.1); }
.seq-pad:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.pad-gate[aria-pressed="true"] {
  background: linear-gradient(180deg, #fbf5e2, #d9cfb2);
  box-shadow: 0 2px 0 #0b0c0d, 0 0 10px rgba(251, 240, 205, 0.45);
}
.pad-accent[aria-pressed="true"] {
  background: linear-gradient(180deg, #ffbf6b, #e7861f);
  box-shadow: 0 2px 0 #0b0c0d, 0 0 10px rgba(240, 150, 50, 0.55);
}
.pad-slide[aria-pressed="true"] {
  background: linear-gradient(180deg, #9ad8ff, #3b9be0);
  box-shadow: 0 2px 0 #0b0c0d, 0 0 10px rgba(80, 180, 255, 0.55);
}
/* Accent and slide do nothing on a rest: show them dimmed. */
.seq-step:has(.pad-gate[aria-pressed="false"]) .pad-accent[aria-pressed="true"],
.seq-step:has(.pad-gate[aria-pressed="false"]) .pad-slide[aria-pressed="true"] { opacity: 0.4; }
