/* MasterForge Pro Master — Match EQ
 *
 * Reuses Reference-strip sage-green palette for visual continuity:
 *   --pm-ref-accent       #6fbf9a
 *   --pm-ref-accent-soft  rgba(111,191,154,0.16)
 *   --pm-ref-accent-line  rgba(111,191,154,0.30)
 *   --pm-ref-accent-glow  rgba(111,191,154,0.25)
 *
 * Defined in reference-track.css; this file inherits them.
 */

/* ──────────────────────────────────────────────────────── */
/* 1. Match EQ button (lives in the Reference strip toolbar) */
/* ──────────────────────────────────────────────────────── */

.pm-ref-match-eq {
  height: 26px;
  padding: 0 12px;
  border: 1px solid var(--pm-ref-accent-line);
  background: transparent;
  color: var(--pm-ref-accent);
  font: 500 11px/1 var(--pm-font-sans, system-ui, sans-serif);
  letter-spacing: 0.02em;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
.pm-ref-match-eq:hover {
  background: var(--pm-ref-accent-soft);
  border-color: var(--pm-ref-accent);
}
.pm-ref-match-eq:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--pm-ref-accent-glow);
}
.pm-ref-match-eq[data-state="applied"] {
  background: var(--pm-ref-accent-soft);
  border-color: var(--pm-ref-accent);
}
.pm-ref-match-eq:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: transparent;
}

/* ──────────────────────────────────────────────────────── */
/* 2. Popover                                              */
/* ──────────────────────────────────────────────────────── */

.pm-match-eq-popover {
  position: absolute;
  z-index: 50;
  width: 480px;
  max-width: calc(100vw - 32px);
  padding: 0;
  border: 1px solid var(--pm-ref-accent-line);
  border-radius: 8px;
  background: linear-gradient(180deg,
    rgba(111, 191, 154, 0.05) 0%,
    rgba(15, 18, 25, 0.97) 35%,
    rgba(15, 18, 25, 0.97) 100%);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(8px);
  color: #d8dce3;
  font: 12px/1.4 var(--pm-font-sans, system-ui, sans-serif);
}
.pm-match-eq-popover[hidden] { display: none; }

.pm-meq-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px 8px;
  border-bottom: 1px solid rgba(111, 191, 154, 0.12);
}
.pm-meq-title {
  margin: 0;
  font: 600 12px/1.2 var(--pm-font-sans, system-ui, sans-serif);
  letter-spacing: 0.02em;
  color: var(--pm-ref-accent);
}
.pm-meq-close {
  width: 22px;
  height: 22px;
  border: none;
  background: transparent;
  color: rgba(216, 220, 227, 0.7);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  border-radius: 4px;
}
.pm-meq-close:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }

.pm-meq-canvas-wrap {
  position: relative;
  margin: 10px 14px 6px;
  height: 180px;
  background: #07080c;
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 4px;
  overflow: hidden;
}
.pm-meq-canvas {
  display: block;
  width: 100%;
  height: 100%;
}
.pm-meq-legend {
  position: absolute;
  top: 6px;
  right: 8px;
  display: flex;
  gap: 12px;
  font-size: 10px;
  color: rgba(216, 220, 227, 0.7);
  pointer-events: none;
}
.pm-meq-legend-swatch {
  display: inline-block;
  width: 18px;
  height: 2px;
  vertical-align: middle;
  margin-right: 4px;
}
.pm-meq-legend-swatch.current { background: #c9a84c; }
.pm-meq-legend-swatch.proposed {
  background: repeating-linear-gradient(
    to right,
    var(--pm-ref-accent) 0 4px,
    transparent 4px 7px
  );
  height: 2px;
}

.pm-meq-summary {
  padding: 4px 14px 0;
  font-family: var(--pm-font-mono, ui-monospace, monospace);
  font-size: 11px;
  color: rgba(216, 220, 227, 0.85);
  letter-spacing: 0.01em;
}
.pm-meq-status {
  padding: 4px 14px 0;
  font-size: 11px;
  color: #e8a868;
}
.pm-meq-status[hidden] { display: none; }

.pm-meq-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 14px 12px;
  margin-top: 6px;
  border-top: 1px solid rgba(111, 191, 154, 0.08);
}
.pm-meq-btn {
  height: 28px;
  padding: 0 14px;
  border: 1px solid var(--pm-ref-accent-line);
  background: transparent;
  color: var(--pm-ref-accent);
  font: 500 12px/1 var(--pm-font-sans, system-ui, sans-serif);
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
.pm-meq-btn-secondary {
  border-color: rgba(255, 255, 255, 0.18);
  color: rgba(216, 220, 227, 0.85);
}
.pm-meq-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}
.pm-meq-btn-primary {
  background: var(--pm-ref-accent);
  border-color: var(--pm-ref-accent);
  color: #07080c;
  font-weight: 600;
}
.pm-meq-btn-primary:hover:not(:disabled) {
  background: #84d3af;
  border-color: #84d3af;
}
.pm-meq-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.pm-meq-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--pm-ref-accent-glow);
}

/* ──────────────────────────────────────────────────────── */
/* 3. Match-tagged band markers in the main EQ visualizer  */
/*    Sage-green outline / dot for any band where           */
/*    config.matchSource === 'reference-match'              */
/* ──────────────────────────────────────────────────────── */
/* Implemented in eq-visualizer.js via canvas drawing —     */
/* no DOM elements to style here. Color hex used:           */
/*   #6fbf9a (matches --pm-ref-accent)                       */
