/* drummachine.css */
:root {
  --label-font-size: 1rem;
  --title-font-size: 1.5rem;
  --dial-size: 50px;
  --dial-border: 2px;
  --dial-color: #333;
  --dial-bg: transparent;
  --dial-active-bg: #333;
  --dial-active-color: #fff;
}

/* Sequencer grid styling */
.sequencer {
  background: #fff;
  color: #000;
  padding: 20px;
  min-width: 500px;
  display: flex;
  flex-direction: column;
}

.sequencer-container {
  min-width: 500px;
}

.row {
  display: flex;
  align-items: center;
}

.step-labels {
  order: 1;
}

.instrument-row {
  order: 0;
  align-items: center;
}

.label,
.step {
  flex: 1 1 0;
  text-align: center;
  font-weight: bold;
  border: 1px solid #000;
  background: #fff;
  box-sizing: border-box;
  padding: 5px 0;
}

.step-labels .label {
  border: none;
  border-top: 1px solid #000;
  font-size: var(--label-font-size);
}

.step {
  cursor: pointer;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step img {
  max-height: 100%;
  width: auto;
}

.current-step {
  background: #ddd;
  transition: background 0.1s;
}

/* Title styling */
#gridTitleDisplay {
  font-size: var(--title-font-size);
  text-align: center;
  margin: 1em 0;
}

/* Section spacing */
fieldset {
  margin-bottom: 1em;
  border: 1px solid #000;
  padding: 10px;
}

/* Simple “knob” styling for dials */
.dial-option {
  width: var(--dial-size);
  height: var(--dial-size);
  border: var(--dial-border) solid var(--dial-color);
  border-radius: 50%;
  background: var(--dial-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--dial-color);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  margin: 0 0.5rem;
}

.dial-option.selected {
  background: var(--dial-active-bg);
  color: var(--dial-active-color);
}

/* Disabled state for subdivision dial when bottom=8 */
.dial-option.disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Arrange dials */
#subdivisionDial,
#tempoDial {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 1em auto;
}

.centered-container {
  display: flex;
  align-items: center;
  height: 100px;
  justify-content: flex-start;
}

.inline-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

#exportArea {
  transform-origin: top left;
}

/* Instruments menu styling */
article#instrumentsMenu {
  margin: 1em 0;
}
.instrument-group {
  margin-bottom: 1em;
}
.instrument-group h4 {
  margin: 0.5em 0;
}
.instrument-options img {
  width: 50px;
  height: auto;
  margin: 0.25em;
  opacity: 0.3;
  cursor: pointer;
  transition: opacity 0.2s;
}
.instrument-options img.active {
  opacity: 1;
}
/* so scaling the grid pivots from top left */
.sequencer-container {
  transform-origin: top left;
}
