/* ==========================================================================
   VIRTUAL PEDALBOARD & AMP SIMULATOR (LIVE NEURAL DSP)
   ========================================================================== */

.modal-pedalboard-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(8, 8, 12, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}

.modal-pedalboard-card {
  background: var(--bg-surface-raised, #16171d);
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.12));
  border-radius: 20px;
  width: 100%;
  max-width: 920px;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  color: var(--text-primary, #f0f0f5);
  animation: pedalboardPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes pedalboardPop {
  0% { transform: scale(0.96) translateY(12px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

.pedalboard-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 24px 28px 16px;
  border-bottom: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
}

.pedalboard-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
}

.pedalboard-modal-title {
  margin: 0 0 4px;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.pedalboard-modal-subtitle {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-secondary, #94a3b8);
}

.btn-close-pedalboard {
  background: rgba(255, 255, 255, 0.06);
  border: none;
  color: var(--text-secondary, #94a3b8);
  font-size: 1.1rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.btn-close-pedalboard:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

/* Input Bar */
.pedalboard-input-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px;
  background: rgba(0, 0, 0, 0.35);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-wrap: wrap;
  gap: 16px;
}

.pedalboard-input-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}

.btn-pedalboard-toggle-input {
  padding: 10px 18px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary, #f0f0f5);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-pedalboard-toggle-input.active {
  background: #ef4444;
  border-color: #ef4444;
  color: #fff;
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.5);
}

.mic-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #94a3b8;
}

.mic-dot.pulse {
  background: #fff;
  box-shadow: 0 0 8px #fff;
  animation: dotPulse 1s infinite alternate;
}

@keyframes dotPulse {
  0% { transform: scale(0.85); opacity: 0.7; }
  100% { transform: scale(1.25); opacity: 1; }
}

.pedalboard-level-meter-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.meter-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary, #94a3b8);
}

.pedalboard-meter-track {
  width: 100px;
  height: 8px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.pedalboard-meter-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981 70%, #eab308 90%, #ef4444 100%);
  transition: width 0.05s linear;
}

.smart-tone-status-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 12px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.25);
  font-size: 0.82rem;
}

.smart-tone-icon {
  font-size: 1.1rem;
}

.smart-tone-text strong {
  color: #f59e0b;
}

/* Presets Bar */
.pedalboard-presets-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  overflow-x: auto;
  white-space: nowrap;
}

.presets-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-secondary, #94a3b8);
  margin-right: 4px;
}

.btn-preset-chip {
  padding: 6px 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary, #f0f0f5);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-preset-chip.active {
  background: #f59e0b;
  color: #000;
  border-color: #f59e0b;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.35);
}

/* Rack of Pedals */
.pedals-rack-container {
  padding: 24px 28px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  background: radial-gradient(circle at center, rgba(30, 32, 42, 0.6) 0%, rgba(10, 11, 16, 0.9) 100%);
}

.pedal-chassis {
  background: #1e2029;
  border: 2px solid #333645;
  border-radius: 16px;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1), 0 8px 20px rgba(0, 0, 0, 0.5);
  position: relative;
  transition: all 0.2s ease;
}

.pedal-chassis.bypassed {
  opacity: 0.55;
  filter: grayscale(40%);
}

.pedal-noise-gate { border-top: 4px solid #64748b; }
.pedal-overdrive { border-top: 4px solid #eab308; }
.pedal-equalizer { border-top: 4px solid #3b82f6; }
.pedal-chorus { border-top: 4px solid #06b6d4; }
.pedal-delay { border-top: 4px solid #8b5cf6; }
.pedal-reverb { border-top: 4px solid #ec4899; }

.pedal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.pedal-name {
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: #cbd5e1;
}

.pedal-led {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #334155;
  border: 1px solid rgba(0, 0, 0, 0.8);
}

.pedal-led.led-on {
  background: #22c55e;
  box-shadow: 0 0 10px #22c55e, 0 0 4px #fff;
}

.pedal-overdrive .pedal-led.led-on { background: #eab308; box-shadow: 0 0 10px #eab308; }
.pedal-reverb .pedal-led.led-on { background: #ec4899; box-shadow: 0 0 10px #ec4899; }

.pedal-knobs-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.knob-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.knob-label {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #94a3b8;
}

.pedal-knob-slider {
  width: 100%;
  cursor: pointer;
  accent-color: #f59e0b;
}

.knob-val {
  font-size: 0.75rem;
  font-family: monospace;
  color: #cbd5e1;
  text-align: right;
}

.pedal-switch-row {
  width: 100%;
}

.pedal-select-mode {
  width: 100%;
  padding: 6px 8px;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: #f8fafc;
  font-size: 0.78rem;
  font-weight: 600;
}

.pedal-footswitch {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #94a3b8, #475569);
  border: 3px solid #1e293b;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.6), inset 0 2px 3px rgba(255, 255, 255, 0.4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.1s ease;
  margin-top: 4px;
}

.pedal-footswitch:active {
  transform: scale(0.92);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.footswitch-button {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #334155;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Footer */
.pedalboard-modal-footer {
  padding: 16px 28px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
  flex-wrap: wrap;
  gap: 16px;
}

.master-vol-slot {
  display: flex;
  align-items: center;
  gap: 10px;
}

.master-label {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--text-secondary, #94a3b8);
}

.master-vol-slider {
  width: 140px;
  cursor: pointer;
  accent-color: #f59e0b;
}

.master-val {
  font-size: 0.85rem;
  font-family: monospace;
  font-weight: 700;
  color: var(--text-primary, #f0f0f5);
}

.btn-pedalboard-primary {
  padding: 10px 24px;
  border-radius: 12px;
  background: #f59e0b;
  color: #000;
  border: none;
  font-weight: 800;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-pedalboard-primary:hover {
  background: #fbbf24;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}
