/* =========================
   Éclair Player — clean CSS
   ========================= */

/* Layout wrapper */
.eclair-player-wrap { width: 100%; margin: .3rem auto; }
.eclair-player-title { font-weight: 600; font-size: .95rem; margin: 0 0 .35rem; }

/* Player shell */
.ep-ui{
  width: 100%;
  max-width: var(--ep-max, 420px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 6.2rem 1fr auto; /* play | timepair | seek | volwrap */
  align-items: center;
  gap: .5rem;
  background: transparent;
  border-radius: 36px;
  padding: .3rem .9rem;
  box-shadow: none;
}

/* Force transparency even if theme injects styles */
.eclair-player-wrap,
.eclair-player-wrap .ep-ui{ background: transparent !important; box-shadow: none !important; }
.eclair-player-wrap::before,
.eclair-player-wrap::after,
.ep-ui::before,
.ep-ui::after{ content: none !important; }

/* === Controls === */

/* Buttons (play/mute) */
.ep-btn,
.ep-mute{
  width: 34px; height: 34px;
  border-radius: 999px; border: 0;
  background: #f0f3f5;
  display: grid; place-items: center;
  cursor: pointer;
}

/* ONE place to size ALL icons */
.ep-btn svg,
.ep-mute svg{
  width: 99%;
  height: 99%;
  fill: #222;
}

/* Time label */
.ep-time{ font-size: 12px; color: #111; min-width: 6.2rem; text-align: center; }

/* === Seek slider === */
.ep-seek{
  -webkit-appearance: none; appearance: none;
  width: 100%;
  height: 6px;
  background: #d6dde1;        /* track (light) */
  border-radius: 999px;
  outline: none; border: 0;
  accent-color: #cfd6d9;       /* knob/progress (slightly darker) */
}
.ep-seek::-webkit-slider-runnable-track{ height: 6px; border-radius: 999px; background: #d6dde1; }
.ep-seek::-webkit-slider-thumb{
  -webkit-appearance: none; appearance: none;
  width: 12px; height: 12px; border-radius: 50%;
  background: #cfd6d9; border: 0; cursor: pointer; margin-top: -3px;
}
.ep-seek::-moz-range-track{ height: 6px; border-radius: 999px; background: #d6dde1; }
.ep-seek::-moz-range-thumb{ width: 12px; height: 12px; border-radius: 50%; background: #cfd6d9; border: 0; cursor: pointer; }

/* Focus ring (accessible, neutral) */
.ep-btn:focus-visible, .ep-seek:focus-visible,
.ep-mute:focus-visible, .ep-vol:focus-visible{ outline: 2px solid #111; outline-offset: 2px; }

/* === Volume (hover reveal, no flicker, no layout shift) === */
.ep-volwrap{
  position: relative;
  width: 34px;                 /* grid column stays fixed */
  display: inline-grid;
  place-items: center;
}

/* Invisible hover carpet covering the slider area to the left */
.ep-volwrap::before{
  content: "";
  position: absolute;
  left: -92px;                 /* how far slider extends */
  top: 0;
  bottom: 0;
  width: 92px;
}

/* Volume slider (appears to the LEFT of mute) */
.ep-vol{
  position: absolute;
  left: -82px;                 /* sits left of the button; tweak ±2–4px if desired */
  top: 50%;
  transform: translateY(-50%) translateX(6px);
  width: 0;
  opacity: 0;
  transition: width .18s ease, opacity .18s ease, transform .18s ease;

  -webkit-appearance: none; appearance: none;
  height: 6px;
  background: #d6dde1;        /* track (light) */
  border-radius: 999px; outline: none; border: 0;
  accent-color: #cfd6d9;       /* knob (slightly darker) */
}
.ep-vol::-webkit-slider-runnable-track{ height: 6px; border-radius: 999px; background: #d6dde1; }
.ep-vol::-webkit-slider-thumb{
  -webkit-appearance: none;
  width: 12px; height: 12px; border-radius: 50%;
  background: #cfd6d9; border: 0; cursor: pointer; margin-top: -3px;
}
.ep-vol::-moz-range-track{ height: 6px; border-radius: 999px; background: #d6dde1; }
.ep-vol::-moz-range-thumb{ width: 12px; height: 12px; border-radius: 50%; background: #cfd6d9; border: 0; cursor: pointer; }

/* Reveal when hovered/focused or when JS sets .is-open (touch) */
.ep-volwrap:hover .ep-vol,
.ep-volwrap:focus-within .ep-vol,
.ep-volwrap.is-open .ep-vol{ width: 72px; opacity: 1; transform: translateY(-50%) translateX(0); }

/* Shrink seek while volume is open so nothing overlaps */
.ep-ui.ep-vol-open .ep-seek{ width: calc(100% - 110px); }

/* Small screens: hide slider (mute still works) */
@media (max-width: 420px){ .ep-vol{ display: none; } }
