/* ============================================================
   style-control-eq.css
   （旧style-eq.css。PC v2のControlパネルにSpeed/Keyと統合表示される
   ため、ファイル名をstyle-controls.cssと対になるよう変更した）
   10バンド・グラフィックイコライザーのUI（EQヒント文言、プリセットボタン、
   バンドスライダー、周波数ラベル）。
   注：EQモーダル自体の外枠(.eq-modal)は、Exportモーダルの共通デザイン
   (.export-modal-overlay等)を土台にしているため style-export.css 側にある。
   ============================================================ */

.eq-hint {
  margin: 0 0 14px;
  font-family: var(--font-body, 'Instrument Sans'), sans-serif;
  font-size: 12px;
  color: #6b6b7b;
}

/* SP幅でBasicタブ内に移動した時だけ表示する区切り線とタイトル（PC幅のモーダルでは不要） */
.eq-inline-divider,
.eq-inline-title {
  display: none;
}

.eq-preset-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  /* eq-bands(縦スライダー)の直後に移設したため、上にも余白を持たせる。 */
  margin-top: 14px;
  margin-bottom: 10px;
}

.eq-preset-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.eq-preset-btn {
  flex: 1 1 auto;
  padding: 5px 10px;
  background: none;
  color: var(--icon-muted);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  font-family: var(--font-display, 'Instrument Sans'), sans-serif;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--dur-hover) var(--ease-snap), border-color var(--dur-hover) var(--ease-snap), color var(--dur-hover) var(--ease-snap);
}

.eq-preset-btn:hover {
  border-color: var(--accent-primary);
  color: var(--text-pure-white);
}

.eq-preset-btn.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: var(--text-pure-white);
}

.eq-bands {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 4px;
  height: 160px;
  touch-action: none;
}

.eq-band {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.eq-band-gain {
  font-family: var(--font-display, 'Instrument Sans'), sans-serif;
  font-size: 10px;
  font-weight: 600;
  color: var(--accent-primary);
  white-space: nowrap;
}

.eq-slider-track {
  position: relative;
  flex: 1;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.eq-vslider {
  -webkit-appearance: none;
  appearance: none;
  width: 110px;
  height: 4px;
  border-radius: 2px;
  outline: none;
  transform: rotate(-90deg);
  cursor: pointer;
  pointer-events: none;
  /* 0dB(中央、50%)を基準に、つまみの位置(--range-progress、0〜100)
     までの区間だけaccent-primary色で塗る。+側なら50%→progress%、
     -側ならprogress%→50%が塗られる（どちらの式でも、値が0dBの時は
     50%→50%で幅0になり何も塗られない）。 */
  background: linear-gradient(
    to right,
    #2a2a35 0%,
    #2a2a35 min(50%, var(--range-progress, 50) * 1%),
    var(--accent-primary) min(50%, var(--range-progress, 50) * 1%),
    var(--accent-primary) max(50%, var(--range-progress, 50) * 1%),
    #2a2a35 max(50%, var(--range-progress, 50) * 1%),
    #2a2a35 100%
  );
}

.eq-vslider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent-primary);
  box-shadow: 0 0 6px var(--accent-glow);
  cursor: pointer;
}

.eq-vslider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: none;
  border-radius: 50%;
  background: var(--accent-primary);
  box-shadow: 0 0 6px var(--accent-glow);
  cursor: pointer;
}

.eq-band-freq {
  font-family: var(--font-display, 'Instrument Sans'), sans-serif;
  font-size: 10px;
  font-weight: 500;
  color: #6b6b7b;
  white-space: nowrap;
}


/* カスタムEQプリセット：ユーザーが保存した独自プリセットのチップ列。
   標準プリセットと見た目を揃えつつ、削除用の小さな✕を右端に添える。 */
.eq-preset-custom-row {
  margin-top: 6px;
}

.eq-preset-btn-custom {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.eq-preset-custom-del {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  font-size: 9px;
  line-height: 1;
  color: #6b6b7b;
  opacity: 0.7;
}

.eq-preset-custom-del:hover {
  color: var(--danger);
  opacity: 1;
  background: rgba(239, 68, 68, 0.15);
}

/* 現在のEQ設定を新しいカスタムプリセットとして保存するボタン。 */
.eq-preset-save-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 8px;
  padding: 7px 10px;
  background: none;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  color: var(--icon-muted);
  font-family: var(--font-display, 'Instrument Sans'), sans-serif;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.eq-preset-save-btn:hover {
  color: var(--accent-primary);
  border-color: var(--accent-primary);
}

.eq-preset-save-btn svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}
