/* ============================================================
   Bass Booster - Pi7
   Scoped under .bs-stage. Same look as the equalizer page: one slider,
   three bass types, the player, and the save step.
   ============================================================ */

.bs-stage{ margin: 12px auto 0; padding: 6px 12px; position: relative; }   /* full column width, like the other tools */
.bs-card{
  max-width: 880px;            /* the select box spans the column, the settings do not */
  margin: 0 auto;
  background: #fff;
  padding: 6px 22px 18px;
}
.bs-step{ padding: 16px 0; }
.bs-step + .bs-step:not(.hide){ border-top: 1px solid #eef0f6; }
.bs-step-title{
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 14px;
  font-size: 16px; font-weight: 700; color: #2d3150;
}
.bs-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;
}
.bs-hint{ margin: 10px 0 0; font-size: 13px; color: var(--muted); line-height: 1.45; }
.bs-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 */
.bs-media{ position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; left: 0; bottom: 0; }

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

.bs-file{
  border: 1px solid #dfe2f2; border-left: 4px solid var(--pcolor);
  border-radius: 3px; background: #f8f9ff; padding: 12px 14px 12px 16px;
}
.bs-file.hide{ display: none; }
.bs-file-head{ display: flex; align-items: baseline; gap: 8px 12px; flex-wrap: wrap; margin-bottom: 10px; }
.bs-file-name{ font-size: 15px; font-weight: 600; color: #2d3150; word-break: break-word; }
.bs-file-sub{ font-size: 13px; color: var(--muted); }
.bs-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;
}
.bs-player{ display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.bs-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);
}
.bs-play-btn:hover:not(:disabled){ background: #3a3f96; }
.bs-play-btn:disabled{ opacity: 0.5; cursor: not-allowed; box-shadow: none; }
.bs-play-btn svg{ width: 14px; height: 14px; }
.bs-play-btn .bs-ic-pause{ display: none; }
.bs-play-btn.playing .bs-ic-play{ display: none; }
.bs-play-btn.playing .bs-ic-pause{ display: block; }
.bs-play-btn.playing{ background: #c2185b; box-shadow: 0 4px 12px rgba(194, 24, 91, 0.25); }
.bs-seek{ flex: 1 1 200px; display: flex; align-items: center; gap: 10px; min-width: 0; }
.bs-seek input[type="range"]{ flex: 1; min-width: 0; margin: 0; accent-color: var(--pcolor); }
.bs-time{ font-size: 13px; color: #4a4f6a; font-variant-numeric: tabular-nums; white-space: nowrap; }

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

/* ==================== Step 2: presets and sliders ==================== */
.bs-types{ display: flex; flex-wrap: wrap; gap: 8px; }
.bs-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;
}
.bs-chip:hover{ border-color: var(--pcolor); }
.bs-chip.selected{ background: var(--pcolor); border-color: var(--pcolor); color: #fff; }
.bs-chip:focus-visible{ outline: 2px solid #8a90d9; outline-offset: 2px; }
.bs-type-desc{ margin: 10px 0 14px; font-size: 14px; color: #4a4f6a; line-height: 1.5; min-height: 21px; }

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

.bs-gain-note{ margin: 12px 0 0; font-size: 13px; font-weight: 600; color: #4a4f6a; }

/* ==================== Step 3: save ==================== */
.bs-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;
}
.bs-select:focus-visible{ outline: none; border-color: var(--pcolor); box-shadow: 0 0 0 3px rgba(68, 73, 166, 0.15); }
.bs-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);
}
.bs-make-btn:hover:not(:disabled){ background: #3a3f96; }
.bs-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: bs-spin 0.8s linear infinite; flex-shrink: 0;
}
@keyframes bs-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); }
.bs-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){
  .bs-stage{ padding: 4px 12px; }   /* same side padding as the other tool pages */
  .bs-card{ padding: 4px 14px 14px; }
  .bs-player{ gap: 10px; }
  .bs-play-btn{ min-height: 46px; }
  .bs-seek{ flex-basis: 100%; order: 3; }
  .bs-ab{ margin-left: auto; }
  .bs-row{ flex-wrap: nowrap; min-height: 44px; }
  .bs-row-label{ flex-basis: 64px; }
  .bs-select{ max-width: none; height: 44px; }
  .bs-make-btn{ min-height: 46px; }
  .articlesec th{ padding: 10px 10px; font-size: 13px; }
  .articlesec td{ padding: 9px 10px; font-size: 14px; }
}

/* ==================== Bass booster extras ==================== */
.bs-section-label{
  margin: 14px 0 8px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; color: #7a7f95;
}
.bs-amount-row{ min-height: 48px; }
.bs-amount-row .bs-row-label{ flex-basis: 112px; }
.bs-amount-row input[type="range"]{ height: 28px; }
.bs-amount-row .bs-value{ font-size: 16px; min-width: 66px; }
@media screen and (max-width: 640px){
  .bs-amount-row .bs-row-label{ flex-basis: 96px; }
}
