/* Final right-panel composition. This file is intentionally last in the cascade. */

.now-display { background: transparent; }

.song-row.active { box-shadow: none; }

.scan-readout,
.panel-toolbar,
.discovery-mode > .quick-folders {
  display: none;
}

.control-board {
  grid-template-rows: minmax(260px, 42%) minmax(0, 1fr);
  min-height: 0;
  gap: 8px;
  padding: 8px;
}

.playback-strip {
  grid-template-columns: minmax(360px, 460px) minmax(0, 1fr);
  align-items: center;
  min-height: 0;
  padding: 18px;
}

.mini-screen {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  align-self: center;
}

.transport-bank {
  align-self: stretch;
  align-content: center;
  padding: 24px 40px;
}

.transport-controls { margin-top: 12px; }

.discovery-mode.active {
  display: block;
  min-height: 0;
}

.discovery-console {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: repeat(2, minmax(0, 1fr)) 82px;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  padding: 0;
}

.discovery-console > .behavior-row {
  display: none;
}

.control-row {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  grid-template-rows: 1fr;
  align-items: center;
  min-height: 0;
  padding: 20px 22px;
  border-bottom: 1px solid #2b3035;
}

.control-row:nth-child(odd) { border-right: 0; }

.row-label {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.row-label > span {
  display: block;
  width: auto;
  height: auto;
  padding: 0;
  color: var(--orange);
  background: transparent;
  border: 0;
  border-radius: 0;
  font: 700 8px/1 "Courier New", monospace;
}

.row-label > div { display: block; }

.row-label strong {
  color: #e2e4e4;
  font: 700 12px/1 "Arial", sans-serif;
  letter-spacing: .025em;
}

.row-label small { display: none; }

.control-row .setting-options,
.behavior-options {
  display: flex;
  align-items: center;
  align-self: center;
  justify-content: flex-start;
  width: 100%;
  gap: 10px;
  padding: 0;
}

.control-row .setting-button,
.control-row .setting-button.active {
  width: 84px;
  height: 62px;
  flex: 0 0 84px;
  aspect-ratio: auto;
  border-radius: 4px;
  box-shadow: none;
  font-size: 19px;
  text-shadow: none;
}

.control-row .setting-button {
  color: #c9cccf;
  background: #1a1e22;
  border-color: #3a4046;
}

.control-row .setting-button:hover {
  color: #fff;
  background: #22272c;
  border-color: #697078;
  transform: none;
}

.control-row .setting-button.active {
  color: #f3f3f0;
  background: #24201c;
  border-color: #92501c;
}

.control-row .setting-button::before,
.control-row .setting-button.active::before { content: none; }

.control-row .setting-button small {
  color: #8f959a;
  font-size: 8px;
}

.control-row .setting-button.active small {
  color: var(--orange);
  font-size: 9px;
  font-weight: 900;
}

.behavior-options .mode-toggle,
.behavior-options .mode-toggle.active,
.behavior-options .switch-control,
.behavior-options .switch-control.active {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 18px;
  width: 190px;
  height: 54px;
  margin: 0;
  padding: 0 14px;
  color: #b9bdc0;
  background: #1a1e22;
  border: 1px solid #3a4046;
  border-radius: 4px;
  box-shadow: none;
}

.behavior-options .mode-toggle span,
.behavior-options .switch-control span,
.behavior-options .switch-control.active span {
  display: block;
  width: auto;
  height: auto;
  color: inherit;
  background: transparent;
  border-radius: 0;
  font: 700 9px/1 "Arial", sans-serif;
  text-align: left;
  transform: none;
}

.behavior-options .mode-toggle strong,
.behavior-options .switch-control strong,
.behavior-options .switch-control.active strong {
  color: #777d83;
  font: 700 8px/1 "Courier New", monospace;
  transform: none;
}

.behavior-options .mode-toggle.active,
.behavior-options .switch-control.active {
  color: #f3f3f0;
  background: #24201c;
  border-color: #92501c;
}

.behavior-options .mode-toggle.active strong,
.behavior-options .switch-control.active strong { color: var(--orange); }

.discovery-console .command-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 184px));
  align-content: center;
  justify-content: start;
  gap: 10px;
  min-height: 0;
  padding: 10px 22px 10px 252px;
  border-bottom: 1px solid #2b3035;
  background: #0f1215;
}

.discovery-console .command-row > button,
.discovery-console .command-row .start-scan,
.discovery-console .command-row .command-button:last-child {
  display: grid;
  grid-template-columns: 30px 1fr;
  grid-template-rows: 1fr;
  align-items: center;
  width: 100%;
  height: 62px;
  min-width: 0;
  flex: none;
  column-gap: 14px;
  padding: 9px 12px;
  border-radius: 4px;
}

.discovery-console .command-row button > span { grid-row: 1; }
.discovery-console .command-row button > small { display: none; }

.discovery-console .command-row .start-scan {
  color: #f3f3f0;
  background: #24201c;
  border-color: #92501c;
}

.discovery-console .command-row .start-scan > span {
  color: #fff !important;
}

.discovery-console .command-row .start-scan > strong { color: var(--orange); }

.discovery-console .command-row .command-button {
  color: #d9dbdc;
  background: #1a1e22;
  border-color: #3a4046;
}

.discovery-console .command-row .command-button:hover {
  background: #22272c;
  border-color: #697078;
}

@media (max-width: 1250px) {
  .control-board { grid-template-rows: minmax(230px, 38%) minmax(0, 1fr); }
  .playback-strip { grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); }
  .transport-bank { padding-inline: 24px; }
  .control-row { grid-template-columns: 175px minmax(0, 1fr); padding: 15px 16px; }
  .control-row .setting-button,
  .control-row .setting-button.active { width: 68px; height: 56px; flex-basis: 68px; }
  .behavior-options .mode-toggle,
  .behavior-options .mode-toggle.active,
  .behavior-options .switch-control,
  .behavior-options .switch-control.active { width: 160px; }
  .discovery-console .command-row { grid-template-columns: repeat(3, minmax(0, 150px)); padding: 10px 16px 10px 207px; }
}
