/* ============================================================
   Audio Equalizer - Pi7
   Scoped under .eq-stage. One white card, three numbered steps.
   Presets and three big sliders first, ten bands behind a fold-out.
   ============================================================ */

.eq-stage{ margin: 12px auto 0; padding: 6px 12px; position: relative; }   /* full column width, like the other tools */
.eq-card{
  max-width: 880px;            /* the select box spans the column, the settings do not */
  margin: 0 auto;
  background: #fff;
  padding: 6px 22px 18px;
}
.eq-step{ padding: 16px 0; }
.eq-step + .eq-step:not(.hide){ border-top: 1px solid #eef0f6; }
.eq-step-title{
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 14px;
  font-size: 16px; font-weight: 700; color: #2d3150;
}
.eq-num{
  width: 26px; height: 26px; flex-shrink: 0; border-radius: 50%;
  background: var(--pcolor); color: #fff; font-size: 14px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.eq-hint{ margin: 10px 0 0; font-size: 13px; color: var(--muted); line-height: 1.45; }
.eq-sr-only{ position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* The media element must exist and be "visible" for phones to play it */
.eq-media{ position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; left: 0; bottom: 0; }

/* ==================== Step 1: file and player ==================== */
.eq-input{ position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
/* The select box itself is the shared .upload_cnt from common.css */
.eq-stage .upload_cnt{ margin-bottom: 14px; }
.eq-stage .upload_cnt.dragging label{ border-style: solid; border-color: var(--pcolor); }

.eq-file{
  border: 1px solid #dfe2f2; border-left: 4px solid var(--pcolor);
  border-radius: 3px; background: #f8f9ff; padding: 12px 14px 12px 16px;
}
.eq-file.hide{ display: none; }
.eq-file-head{ display: flex; align-items: baseline; gap: 8px 12px; flex-wrap: wrap; margin-bottom: 10px; }
.eq-file-name{ font-size: 15px; font-weight: 600; color: #2d3150; word-break: break-word; }
.eq-file-sub{ font-size: 13px; color: var(--muted); }
.eq-remove{
  margin-left: auto; padding: 2px; border: none; background: none;
  color: #b00d44; font-size: 13px; font-weight: 700; font-family: inherit;
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.eq-player{ display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.eq-play-btn{
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-width: 108px; min-height: 42px; padding: 0 18px;
  border: none; border-radius: 999px; background: var(--pcolor); color: #fff;
  font-size: 15px; font-weight: 700; font-family: inherit; cursor: pointer;
  box-shadow: 0 4px 12px rgba(68, 73, 166, 0.25);
}
.eq-play-btn:hover:not(:disabled){ background: #3a3f96; }
.eq-play-btn:disabled{ opacity: 0.5; cursor: not-allowed; box-shadow: none; }
.eq-play-btn svg{ width: 14px; height: 14px; }
.eq-play-btn .eq-ic-pause{ display: none; }
.eq-play-btn.playing .eq-ic-play{ display: none; }
.eq-play-btn.playing .eq-ic-pause{ display: block; }
.eq-play-btn.playing{ background: #c2185b; box-shadow: 0 4px 12px rgba(194, 24, 91, 0.25); }
.eq-seek{ flex: 1 1 200px; display: flex; align-items: center; gap: 10px; min-width: 0; }
.eq-seek input[type="range"]{ flex: 1; min-width: 0; margin: 0; accent-color: var(--pcolor); }
.eq-time{ font-size: 13px; color: #4a4f6a; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Original / Equalized flip */
.eq-ab{
  display: inline-flex; padding: 3px; border: 1px solid #d9dcef; border-radius: 999px;
  background: #fff; cursor: pointer; font-family: inherit;
}
.eq-ab:disabled{ opacity: 0.5; cursor: not-allowed; }
.eq-ab-side{
  padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; color: #7a7f95;
  transition: background 0.15s, color 0.15s;
}
.eq-ab-side.on{ background: var(--pcolor); color: #fff; }

/* ==================== Step 2: presets and sliders ==================== */
.eq-presets{ display: flex; flex-wrap: wrap; gap: 8px; }
.eq-chip{
  min-height: 36px; padding: 0 14px;
  border: 1px solid #dfe2f2; border-radius: 999px; background: #fff;
  color: #2d3150; font-size: 14px; font-weight: 600; font-family: inherit; cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.eq-chip:hover{ border-color: var(--pcolor); }
.eq-chip.selected{ background: var(--pcolor); border-color: var(--pcolor); color: #fff; }
.eq-chip:focus-visible{ outline: 2px solid #8a90d9; outline-offset: 2px; }
.eq-preset-desc{ margin: 10px 0 14px; font-size: 14px; color: #4a4f6a; line-height: 1.5; min-height: 21px; }

.eq-row{ display: flex; align-items: center; gap: 12px; min-height: 40px; margin-bottom: 4px; }
.eq-row-label{ flex: 0 0 80px; font-size: 14px; font-weight: 600; color: #2d3150; }
.eq-row input[type="range"]{ flex: 1; min-width: 60px; margin: 0; accent-color: var(--pcolor); }
.eq-value{ min-width: 58px; text-align: right; font-size: 14px; font-weight: 700; color: #2d3150; font-variant-numeric: tabular-nums; }

/* Fold-out with ten vertical sliders. Each input is a normal horizontal
   range turned on its side, which works in every browser. */
.eq-fine{ margin-top: 10px; }
.eq-fine summary{
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer; list-style: none; user-select: none;
  font-size: 14px; font-weight: 600; color: var(--pcolor); padding: 2px 0;
}
.eq-fine summary::-webkit-details-marker{ display: none; }
.eq-fine summary::before{
  content: ""; width: 6px; height: 6px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(-45deg); transition: transform 0.15s; margin-right: 2px;
}
.eq-fine[open] summary::before{ transform: rotate(45deg); }
.eq-fine summary:hover{ text-decoration: underline; }
.eq-bands{
  display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 4px;
  margin-top: 12px; padding: 12px 6px 8px; background: #f8f9ff; border-radius: 12px;
}
.eq-band{ display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.eq-band-val{ font-size: 11px; font-weight: 700; color: var(--pcolor); font-variant-numeric: tabular-nums; }
.eq-band-slot{ position: relative; width: 100%; height: 140px; }
.eq-band-slot input[type="range"]{
  position: absolute; top: 50%; left: 50%;
  width: 140px; height: 28px; margin: 0;
  transform: translate(-50%, -50%) rotate(-90deg);
  accent-color: var(--pcolor);
}
.eq-band-hz{ font-size: 11px; color: #7a7f95; }
.eq-gain-note{ margin: 12px 0 0; font-size: 13px; font-weight: 600; color: #4a4f6a; }

/* ==================== Step 3: save ==================== */
.eq-select{
  flex: 1 1 auto; min-width: 0; max-width: 220px; height: 38px; padding: 0 34px 0 12px;
  border: 1px solid #e1e3ef; border-radius: 8px; background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%237a7f95' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
  color: #2d3150; font-size: 14px; font-weight: 500; font-family: inherit; cursor: pointer;
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
}
.eq-select:focus-visible{ outline: none; border-color: var(--pcolor); box-shadow: 0 0 0 3px rgba(68, 73, 166, 0.15); }
.eq-make-btn{
  flex-shrink: 0; min-height: 42px; padding: 0 22px; border: none; border-radius: 999px;
  background: var(--pcolor); color: #fff; font-size: 15px; font-weight: 700; font-family: inherit; cursor: pointer;
  box-shadow: 0 4px 12px rgba(68, 73, 166, 0.25);
}
.eq-make-btn:hover:not(:disabled){ background: #3a3f96; }
.eq-make-btn:disabled{ opacity: 0.5; cursor: not-allowed; box-shadow: none; }

.processing{
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; padding: 8px 12px;
  background: #f6f7fc; border-radius: 8px; color: var(--pcolor); font-size: 13px; font-weight: 600;
}
.processing.hide{ display: none; }
.proc-spin{
  width: 16px; height: 16px; border: 2px solid var(--pcolor); border-top-color: rgba(255,255,255,0.4);
  border-radius: 50%; animation: eq-spin 0.8s linear infinite; flex-shrink: 0;
}
@keyframes eq-spin{ to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce){ .proc-spin{ animation-duration: 2.4s; } }
.cancel-btn{
  margin-left: auto; padding: 4px 2px; border: none; background: none; color: #b00d44;
  font-size: 13px; font-weight: 700; font-family: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.cancel-btn:disabled{ opacity: 0.4; cursor: not-allowed; }
.result-card{ display: flex; flex-direction: column; gap: 8px; margin-top: 12px; padding: 12px; background: #f6f7fc; border-radius: 10px; }
.result-card.hide{ display: none; }
.result-card audio{ width: 100%; height: 40px; }
.result-side{ display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.result-meta{ font-size: 13px; color: #3f4460; font-weight: 600; }
.result-actions{ display: flex; gap: 12px; align-items: center; }
.result-actions .download-btn{
  height: 38px; padding: 0 18px; border-radius: 8px; background: var(--pcolor); color: #fff;
  font-size: 14px; font-weight: 700; text-decoration: none; display: inline-flex; align-items: center;
}
.result-actions .download-btn:hover{ background: #3a3f96; }
.result-actions .ctrl-btn{
  padding: 4px 2px; border: none; background: none; color: #4a4f6a; font-size: 13px; font-weight: 600;
  font-family: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}

/* ==================== Article (content pass) ==================== */
.illus{ margin: 24px 0 36px; display: flex; justify-content: center; }
.illus img{ max-width: 100%; height: auto; border-radius: 16px; box-shadow: 0 14px 40px rgba(68, 73, 166, 0.14); }
.eq-table-wrap{ overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 18px 0; }
.articlesec table{ width: 100%; border-collapse: collapse; margin: 0; font-size: 15px; background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 8px rgba(68, 73, 166, 0.06); }
.articlesec thead{ background: var(--pcolor); color: #fff; }
.articlesec th{ text-align: left; padding: 12px 14px; font-weight: 600; font-size: 14px; }
.articlesec td{ padding: 11px 14px; border-top: 1px solid #eef0fa; color: #262626; vertical-align: top; }
.articlesec tbody tr:nth-child(even){ background: #f8f9ff; }

/* ==================== Phones ==================== */
@media screen and (max-width: 640px){
  .eq-stage{ padding: 4px 12px; }   /* same side padding as the other tool pages */
  .eq-card{ padding: 4px 14px 14px; }
  .eq-player{ gap: 10px; }
  .eq-play-btn{ min-height: 46px; }
  .eq-seek{ flex-basis: 100%; order: 3; }
  .eq-ab{ margin-left: auto; }
  .eq-row{ flex-wrap: nowrap; min-height: 44px; }
  .eq-row-label{ flex-basis: 64px; }
  .eq-select{ max-width: none; height: 44px; }
  .eq-make-btn{ min-height: 46px; }
  .eq-bands{ gap: 2px; padding: 10px 2px 6px; }
  .eq-band-slot{ height: 120px; }
  .eq-band-slot input[type="range"]{ width: 120px; }
  .eq-band-val, .eq-band-hz{ font-size: 10px; }
  .articlesec th{ padding: 10px 10px; font-size: 13px; }
  .articlesec td{ padding: 9px 10px; font-size: 14px; }
}
