@import "_variables";
@import "_mixins";

/* nbplay SettingsWidget – themed to Jupyter environment */

.nbplay-settings {
  font-family: @nb-font-mono;
  background: @nb-mixer-bg;
  color: @nb-text;
  border: 1px solid @nb-mixer-border;
  border-radius: 10px;
  padding: 16px 20px;
  max-width: 420px;
  user-select: none;
}

/* ── header ─────────────────────────────── */
.nbplay-settings .nbplay-header {
  .nbplay-header-mixin();
}
.nbplay-settings .nbplay-badge {
  .nbplay-badge-mixin();
  background: @nb-orange;
  color: var(--jp-layout-color0, #000);
  letter-spacing: 1px;
}

/* ── sections ───────────────────────────── */
.nbplay-settings .nbplay-section {
  background: @nb-surface;
  border: 1px solid @nb-mixer-border;
  border-radius: @nb-radius-sm;
  padding: 12px 14px;
  margin-bottom: 10px;
}
.nbplay-settings .nbplay-section:last-child {
  margin-bottom: 0;
}
.nbplay-settings .nbplay-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: @nb-muted;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.nbplay-settings .nbplay-section-icon {
  font-size: 14px;
  color: @nb-purple-light;
}

/* ── setting rows ───────────────────────── */
.nbplay-settings .nbplay-setting-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.nbplay-settings .nbplay-setting-row:last-child {
  margin-bottom: 0;
}
.nbplay-settings .nbplay-label {
  font-size: 12px;
  color: @nb-muted;
  min-width: 80px;
  flex-shrink: 0;
}
.nbplay-settings .nbplay-detail {
  font-size: 12px;
  color: @nb-muted;
}

/* ── selects ────────────────────────────── */
.nbplay-settings .nbplay-select {
  flex: 1;
  font-family: inherit;
  font-size: 12px;
  background: @nb-mixer-bg;
  color: @nb-text;
  border: 1px solid @nb-mixer-border;
  border-radius: 5px;
  padding: 5px 8px;
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s;
}
.nbplay-settings .nbplay-select:hover {
  border-color: @nb-purple-badge;
}
.nbplay-settings .nbplay-select:focus {
  border-color: @nb-purple-badge;
  box-shadow: 0 0 0 2px color-mix(in srgb, @nb-purple-badge 15%, transparent);
}
.nbplay-settings .nbplay-select option {
  background: @nb-mixer-bg;
  color: @nb-text;
}

/* ── refresh button ────────────────────── */
.nbplay-settings .nbplay-refresh-btn {
  background: none;
  border: 1px solid @nb-mixer-border;
  color: @nb-muted;
  border-radius: 5px;
  padding: 4px 8px;
  font-size: 14px;
  cursor: pointer;
  line-height: 1;
  transition: all 0.15s;
}
.nbplay-settings .nbplay-refresh-btn:hover {
  border-color: @nb-purple-badge;
  color: @nb-purple-badge;
}

/* ── MIDI status ───────────────────────── */
.nbplay-settings .nbplay-midi-status {
  color: @nb-muted;
  font-size: 12px;
}
.nbplay-settings .nbplay-midi-status.connected {
  color: @nb-green;
}

/* ── MIDI log ──────────────────────────── */
.nbplay-settings .nbplay-midi-log-container {
  margin-top: 10px;
}
.nbplay-settings .nbplay-midi-log-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: @nb-dim;
  margin-bottom: 6px;
}
.nbplay-settings .nbplay-midi-log {
  background: @nb-bg;
  border: 1px solid @nb-mixer-border;
  border-radius: 5px;
  padding: 6px 8px;
  min-height: 28px;
  max-height: 140px;
  overflow-y: auto;
  font-size: 11px;
  font-family: inherit;
}
.nbplay-settings .nbplay-midi-log:empty::before {
  content: "No MIDI activity";
  color: @nb-mixer-border;
  font-style: italic;
}
.nbplay-settings .nbplay-midi-log-entry {
  color: @nb-green;
  padding: 1px 0;
  border-bottom: 1px solid @nb-border;
  white-space: nowrap;
}
.nbplay-settings .nbplay-midi-log-entry:last-child {
  border-bottom: none;
}
