/* music-widget.css — floating ambient-music toggle (Howler.js, see bg-music.js),
   shared by the landing page and Espaço Zen. Extracted from landing.css so a
   second page could use the same widget without pulling in the rest of that
   stylesheet.

   .music-control is the fixed anchor; the radial satellites (skip/volume) are
   positioned absolutely against it, independent of the toggle button itself.
   The active-state color follows --accent when the page defines one (Espaço
   Zen's current mode), falling back to --accent-blue on pages that don't
   (the landing page). */

.music-control {
    position: fixed;
    bottom: 1.75rem;
    left: 1.75rem;
    width: 56px;
    height: 56px;
    z-index: 200;
}

.music-toggle {
    position: relative;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--color-surface-raised);
    border: 1px solid var(--color-border-strong);
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), color 0.3s ease, border-color 0.3s ease;
}

.music-toggle:hover {
    transform: translateY(-2px);
    color: var(--color-text);
}

.music-toggle.is-playing {
    color: var(--accent, var(--accent-blue));
    border-color: var(--accent, var(--accent-blue));
}

.music-toggle svg { display: none; }
.music-toggle .icon-music-off { display: block; }
.music-toggle.is-playing .icon-music-off { display: none; }
.music-toggle.is-playing .icon-music-on { display: block; }

/* Radial menu: skip / volume satellites fan out from behind the main button
   (still painted on top, since it comes later in the DOM) when .music-control
   gets .is-open — hover on desktop, long-press on touch (see bg-music.js). Each
   satellite's open position comes from its own --x/--y custom properties (inline
   style, per button) rather than trig-in-CSS. */
.radial-menu {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.radial-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--color-surface-raised);
    border: 1px solid var(--color-border-strong);
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(0.3);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s ease, color 0.3s ease, border-color 0.3s ease;
}

.radial-btn:hover {
    color: var(--color-text);
    border-color: var(--accent, var(--accent-blue));
}

.music-control.is-open .radial-btn {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%) translate(var(--x), var(--y)) scale(1);
}

.radial-menu .radial-btn:nth-child(1) { transition-delay: 0s; }
.radial-menu .radial-btn:nth-child(2) { transition-delay: 0.04s; }
.radial-menu .radial-btn:nth-child(3) { transition-delay: 0.08s; }
