/* ==========================================================================
   METRONOME FAB — single bottom-left pill that toggles the global metronome.
   (Back-to-top lives in the bottom-right corner; see back-to-top.css.)
   ========================================================================== */

.tfab-fab {
    position: fixed;
    left: 20px;
    bottom: 20px;
    z-index: 521;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, rgba(191, 173, 255, 0.92) 0%, rgba(124, 92, 255, 0.88) 45%, rgba(94, 62, 220, 0.92) 100%);
    backdrop-filter: blur(10px) saturate(180%);
    -webkit-backdrop-filter: blur(10px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.45),
        inset 0 -1px 2px rgba(40, 20, 90, 0.35),
        0 6px 20px rgba(124, 92, 255, 0.45),
        0 2px 8px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.tfab-fab:hover:not(:disabled) { transform: translateY(-2px) scale(1.04); }
.tfab-fab:disabled { opacity: 0.4; cursor: default; }

.tfab-icon { width: 18px; height: 18px; fill: #fff; }

/* Running: deeper purple ring + the current bpm tucked under the icon. */
.tfab-fab--active {
    background: linear-gradient(160deg, rgba(124, 92, 255, 0.95), rgba(94, 62, 220, 0.98));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.45),
        inset 0 -1px 2px rgba(40, 20, 90, 0.35),
        0 0 0 2px rgba(255, 209, 102, 0.55),
        0 6px 20px rgba(124, 92, 255, 0.45);
}
.tfab-bpm {
    position: absolute;
    left: 50%;
    top: calc(100% + 4px);
    transform: translateX(-50%);
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    color: #eee9ff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
    pointer-events: none;
}
.tfab-bpm:empty { display: none; }

/* Beat flash */
.tfab-fab--flash {
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.45),
        inset 0 -1px 2px rgba(40, 20, 90, 0.35),
        0 0 0 4px rgba(255, 209, 102, 0.5),
        0 2px 8px rgba(0, 0, 0, 0.3);
}
