/* ==========================================================================
   music.css — player chrome for the WWW WASHME TV ambient score
   --------------------------------------------------------------------------
   Anchored bottom-left so it never collides with the chatbot launcher
   (bottom-right, z-index 2147483000). Same gold-on-black vocabulary as the
   rest of the site: Cinzel for the label, a hairline gold border, no fill
   until the score is actually playing.
   ========================================================================== */

.washme-music,
.washme-music * {
  box-sizing: border-box;
}

.washme-music {
  --music-gold: #c9a84c;
  --music-gold-bright: #f0d080;
  --music-ink: #08080a;
  --music-muted: #9b937f;
  position: fixed;
  left: 22px;
  bottom: 22px;
  z-index: 2147482900;
  display: flex;
  flex-direction: column-reverse; /* panel renders above the button */
  align-items: flex-start;
  gap: 9px;
  font-family: "Open Sans", ui-sans-serif, system-ui, sans-serif;
  color: #f5f5f5;
}

/* ------------------------------------------------------------------ button */

.washme-music__toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 8px 18px 8px 14px;
  color: var(--music-gold-bright);
  background: rgba(8, 8, 10, 0.92);
  border: 1px solid rgba(201, 168, 76, 0.55);
  border-radius: 999px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  font: inherit;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: border-color 200ms ease, box-shadow 200ms ease, transform 200ms ease, color 200ms ease;
}

.washme-music__toggle:hover {
  border-color: var(--music-gold);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55), 0 0 26px rgba(201, 168, 76, 0.22);
}

.washme-music.is-playing .washme-music__toggle {
  border-color: var(--music-gold);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(201, 168, 76, 0.25);
}

.washme-music__icon {
  display: block;
  width: 19px;
  height: 19px;
  flex: none;
}

.washme-music__icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.washme-music__label {
  font-family: "Cinzel", Georgia, serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ------------------------------------------------------------- level meter */

.washme-music__eq {
  display: none;
  align-items: flex-end;
  gap: 2px;
  width: 17px;
  height: 15px;
  flex: none;
}

.washme-music.is-playing .washme-music__eq {
  display: inline-flex;
}

.washme-music__eq i {
  display: block;
  width: 3px;
  height: 30%;
  background: currentColor;
  border-radius: 1px;
  animation: washme-music-eq 1.6s ease-in-out infinite;
}

.washme-music__eq i:nth-child(2) { animation-delay: 0.32s; }
.washme-music__eq i:nth-child(3) { animation-delay: 0.66s; }
.washme-music__eq i:nth-child(4) { animation-delay: 0.14s; }

@keyframes washme-music-eq {
  0%, 100% { height: 22%; opacity: 0.7; }
  50% { height: 100%; opacity: 1; }
}

/* --------------------------------------------------------------- info panel */

.washme-music__panel {
  width: 218px;
  padding: 14px 16px 15px;
  background: rgba(8, 8, 10, 0.95);
  border: 1px solid rgba(201, 168, 76, 0.32);
  border-radius: 14px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.52);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 240ms ease, transform 240ms ease, visibility 240ms;
}

.washme-music.is-playing .washme-music__panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.washme-music__now {
  margin: 0 0 12px;
}

.washme-music__track {
  display: block;
  font-family: "Cinzel", Georgia, serif;
  font-size: 0.86rem;
  letter-spacing: 1px;
  color: var(--music-gold-bright);
}

.washme-music__kicker {
  display: block;
  margin-top: 3px;
  font-size: 0.66rem;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--music-muted);
}

.washme-music__volume {
  display: block;
}

.washme-music__volume-label {
  display: block;
  margin-bottom: 7px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--music-gold);
}

/* Range input, styled in both engines so it matches the gold palette */
.washme-music__slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 22px;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.washme-music__slider::-webkit-slider-runnable-track {
  height: 3px;
  background: rgba(201, 168, 76, 0.28);
  border-radius: 3px;
}

.washme-music__slider::-moz-range-track {
  height: 3px;
  background: rgba(201, 168, 76, 0.28);
  border-radius: 3px;
}

.washme-music__slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  margin-top: -5.5px;
  background: linear-gradient(135deg, var(--music-gold-bright), #8b6914);
  border: 0;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(201, 168, 76, 0.5);
}

.washme-music__slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  background: linear-gradient(135deg, var(--music-gold-bright), #8b6914);
  border: 0;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(201, 168, 76, 0.5);
}

.washme-music button:focus-visible,
.washme-music input:focus-visible {
  outline: 3px solid var(--music-gold-bright);
  outline-offset: 3px;
}

/* -------------------------------------------------------------- responsive */

@media (max-width: 560px) {
  .washme-music {
    left: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
  }

  /* Room is tight next to the chat launcher, so the button becomes a disc */
  .washme-music__toggle {
    width: 52px;
    height: 52px;
    min-height: 52px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
  }

  .washme-music__label { display: none; }
  .washme-music.is-playing .washme-music__eq { display: none; }
  .washme-music__panel { width: min(216px, calc(100vw - 24px)); }
}

@media (prefers-reduced-motion: reduce) {
  .washme-music__toggle,
  .washme-music__panel {
    transition: none;
  }

  .washme-music__toggle:hover { transform: none; }
  .washme-music__eq i { animation: none; height: 60%; }
}
