/* Spatial Music Archive — Equalizer Plugin Styles */

.stage__equalizer {
  width: 100%;
  min-height: 60vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  padding-top: 20px;
}

.eq {
  width: 100%;
  max-width: 760px;
  flex: 1 1 620px;
  background: rgba(20, 20, 34, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  padding: 28px;
}

.plugin-rack__status {
  flex: 0 0 100%;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: var(--text-dim);
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.plugin-rack__chain { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plugin-rack__compare { display: inline-flex; flex: 0 0 auto; }
.plugin-rack__compare button {
  padding: 7px 10px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  color: var(--text-dim);
  cursor: pointer;
}
.plugin-rack__compare button:first-child { border-radius: 7px 0 0 7px; }
.plugin-rack__compare button:last-child { border-left: 0; border-radius: 0 7px 7px 0; }
.plugin-rack__compare button.is-active { color: var(--cyan); background: rgba(34,211,238,.1); border-color: rgba(34,211,238,.4); }
.plugin-rack__controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin: -12px 0 10px;
}
.plugin-rack__connection { margin-right: auto; color: var(--text-dim); font-size: 11px; }
.plugin-rack__connection.is-connected { color: var(--cyan); }
.plugin-rack__controls button {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
}
[data-audio-plugin] { cursor: grab; }
[data-audio-plugin].is-dragging { opacity: 0.55; }
[data-audio-plugin] input,
[data-audio-plugin] button { cursor: pointer; }

.eq__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.eq__title {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
}

.eq__toggle {
  padding: 9px 18px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.eq__toggle:hover { background: rgba(255, 255, 255, 0.1); }
.eq__toggle.is-active {
  color: var(--cyan);
  border-color: rgba(34, 211, 238, 0.4);
}

.eq__preamp {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}
.eq__preamp-label {
  font-size: 12px;
  color: var(--text-dim);
  min-width: 52px;
}
.eq__preamp input[type="range"] {
  flex: 1;
  accent-color: var(--cyan);
}
.eq__preamp-value {
  font-size: 12px;
  color: var(--text-dim);
  min-width: 48px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.eq__bands {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 24px;
}
.eq__band {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.eq__band-value {
  font-size: 10px;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}
.eq__band-slider {
  writing-mode: vertical-lr;
  direction: rtl;
  width: 22px;
  height: 160px;
  accent-color: var(--cyan);
  cursor: pointer;
}
.eq__band-label {
  font-size: 10px;
  color: var(--text-dim);
}

.eq__presets {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.eq__preset-status {
  font-size: 12px;
  color: var(--text-dim);
  margin-right: 8px;
}
.eq__preset {
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-dim);
  font-size: 12px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.eq__preset:hover { background: rgba(255, 255, 255, 0.08); }
.eq__preset.is-active {
  color: var(--cyan);
  border-color: rgba(34, 211, 238, 0.4);
}

.eq__custom {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.eq__custom-title {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 600;
}
.eq__custom-form {
  display: flex;
  gap: 8px;
}
.eq__custom-form input {
  flex: 1;
  min-width: 0;
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}
.eq__custom-save,
.eq__saved-load,
.eq__saved-delete {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
}
.eq__custom-save { padding: 9px 14px; }
.eq__saved-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.eq__saved-row { display: flex; min-width: 0; }
.eq__saved-load {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-radius: 8px 0 0 8px;
}
.eq__saved-delete {
  width: 36px;
  flex: 0 0 36px;
  border-left: 0;
  border-radius: 0 8px 8px 0;
  font-size: 18px;
}
.eq__custom-save:hover,
.eq__saved-load:hover,
.eq__saved-delete:hover { background: rgba(255, 255, 255, 0.1); }
.eq__custom-message {
  min-height: 18px;
  margin: 8px 0 0;
  color: var(--text-dim);
  font-size: 12px;
}
.eq__custom-message.is-error { color: #fb7185; }

.eq__warning {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  z-index: 200;
}
.eq__warning-box {
  max-width: 420px;
  background: var(--bg-elevated);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 28px;
}
.eq__warning-title {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 600;
}
.eq__warning-text {
  margin: 0 0 20px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-dim);
}
.eq__warning-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}
.eq__warning-cancel {
  padding: 9px 16px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
}
.eq__warning-cancel:hover { background: rgba(255, 255, 255, 0.1); }
.eq__warning-activate {
  padding: 9px 16px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, var(--violet), var(--blue));
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.eq__warning-activate:hover { opacity: 0.92; }

@media (max-width: 720px) {
  .eq { padding: 20px; }
  .eq__band-slider { height: 120px; }
  .eq__custom-form { align-items: stretch; flex-direction: column; }
  .eq__saved-list { grid-template-columns: 1fr; }
  .plugin-rack__status { align-items: stretch; flex-direction: column; }
  .plugin-rack__chain { white-space: normal; }
  .plugin-rack__compare { width: 100%; }
  .plugin-rack__compare button { flex: 1; }
}
