/* The Realnaps soundtrack (includes/music-player.php, js/music.js): a small player in the
   bottom-left corner, out of the chat's way on the right. Phones: above the sticky call to
   action. */

.rm-player {
    position: fixed;
    left: 16px;
    bottom: 16px;
    z-index: 55;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto auto auto auto;
    align-items: center;
    gap: 4px 6px;
    width: min(420px, calc(100vw - 32px));
    padding: 8px 10px;
    border: 1px solid #1f3c2d;
    border-radius: 16px;
    background: rgba(11, 23, 18, 0.94);
    color: #f3f6f2;
    font-size: 13px;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.rm-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.rm-btn {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #f3f6f2;
    font-size: 17px;
    cursor: pointer;
}

.rm-btn:hover {
    background: rgba(255, 255, 255, 0.08);
}

.rm-btn:focus-visible,
.rm-volume input:focus-visible {
    outline: 3px solid #b9e660;
    outline-offset: 2px;
}

.rm-btn--main {
    width: 38px;
    height: 38px;
    background: #b9e660;
    color: #07120b;
    font-size: 20px;
}

.rm-btn--main:hover {
    background: #cdf07f;
}

.rm-btn--small {
    width: 26px;
    height: 26px;
    font-size: 13px;
    color: #9db3a6;
}

.rm-info {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.rm-title {
    overflow: hidden;
    font-weight: 600;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rm-player.is-waiting .rm-title {
    color: #b9e660;
}

/* Three bars that dance while a song plays */
.rm-eq {
    display: inline-flex;
    align-items: flex-end;
    gap: 2px;
    flex: none;
    width: 14px;
    height: 14px;
}

.rm-eq i {
    width: 3px;
    height: 4px;
    border-radius: 1px;
    background: #b9e660;
}

.rm-player.is-playing .rm-eq i {
    animation: rm-eq 0.9s infinite ease-in-out;
}

.rm-player.is-playing .rm-eq i:nth-child(2) {
    animation-delay: 0.2s;
}

.rm-player.is-playing .rm-eq i:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes rm-eq {
    0%, 100% { height: 4px; }
    50% { height: 14px; }
}

.rm-volume input {
    width: 72px;
    accent-color: #b9e660;
    cursor: pointer;
}

.rm-note {
    grid-column: 1 / -1;
    margin: 0;
    color: #9db3a6;
    font-size: 11.5px;
    line-height: 1.35;
}

.rm-note a {
    color: #b9e660;
}

/* Hidden away: just a music button */
.rm-player.is-folded {
    grid-template-columns: auto;
    width: auto;
    padding: 6px;
}

.rm-player.is-folded > :not([data-rm-fold]) {
    display: none;
}

.rm-player.is-folded [data-rm-fold] {
    width: 38px;
    height: 38px;
    color: #b9e660;
    font-size: 18px;
}

@media (max-width: 991.98px) {
    .rm-player {
        bottom: calc(84px + env(safe-area-inset-bottom));
    }
}

@media (max-width: 480px) {
    .rm-volume {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .rm-player.is-playing .rm-eq i {
        animation: none;
        height: 10px;
    }
}
