/* Playlist flutuante + modal (todas as páginas) */

.michelly-pl-fab {
    position: fixed;
    bottom: 1.35rem;
    left: 1.35rem;
    z-index: 9992;
    width: 58px;
    height: 58px;
    padding: 0;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.35), transparent 45%),
        linear-gradient(145deg, #1a1210, #0a0808);
    box-shadow:
        0 4px 18px rgba(0, 0, 0, 0.45),
        0 0 0 2px rgba(255, 214, 160, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.michelly-pl-fab:hover {
    transform: scale(1.06);
    box-shadow:
        0 8px 28px rgba(0, 0, 0, 0.5),
        0 0 0 2px rgba(255, 214, 160, 0.55);
}

.michelly-pl-fab:focus-visible {
    outline: 2px solid #f0d68a;
    outline-offset: 3px;
}

.michelly-pl-fab__img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 50%;
    pointer-events: none;
}

.michelly-pl-fab__img--spin {
    animation: michelly-pl-spin 4.2s linear infinite;
}

@keyframes michelly-pl-spin {
    to {
        transform: rotate(360deg);
    }
}

:is(body.page-primeiro-mes, body.page-segundo-mes) .michelly-pl-fab {
    bottom: 6.75rem;
}

/* Primeiro mês — mobile: mini-player tipo Spotify + modal em bottom sheet */
@media (max-width: 768px) {
    :is(body.page-primeiro-mes, body.page-segundo-mes) .michelly-pl-fab {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        bottom: calc(0.55rem + env(safe-area-inset-bottom, 0px));
        width: calc(100% - 1.25rem);
        max-width: 26rem;
        height: 56px;
        border-radius: 14px;
        justify-content: flex-start;
        padding: 0 0.7rem;
        gap: 0.65rem;
        background: linear-gradient(180deg, rgba(38, 20, 30, 0.98) 0%, rgba(14, 6, 10, 0.99) 100%);
        border: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow:
            0 10px 40px rgba(0, 0, 0, 0.45),
            inset 0 1px 0 rgba(255, 255, 255, 0.06);
    }

    :is(body.page-primeiro-mes, body.page-segundo-mes) .michelly-pl-fab__img {
        width: 44px;
        height: 44px;
        border-radius: 6px;
        object-fit: cover;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
    }

    :is(body.page-primeiro-mes, body.page-segundo-mes) .michelly-pl-fab__img--spin {
        animation: none;
    }

    :is(body.page-primeiro-mes, body.page-segundo-mes) .michelly-pl-modal__art {
        max-width: min(220px, 52vw);
        margin-bottom: 1.1rem;
    }

    :is(body.page-primeiro-mes, body.page-segundo-mes) .michelly-pl-fab:hover {
        transform: translateX(-50%) scale(1.02);
    }

    :is(body.page-primeiro-mes, body.page-segundo-mes) .michelly-pl-modal {
        left: 0;
        right: 0;
        top: auto;
        bottom: 0;
        width: 100%;
        max-width: none;
        min-height: min(52dvh, 55vh);
        max-height: min(88dvh, 92vh);
        padding: 1.15rem 1.1rem calc(1.15rem + env(safe-area-inset-bottom, 0px));
        border-radius: 20px 20px 0 0;
        border-left: none;
        border-right: none;
        border-bottom: none;
        transform: translateY(105%);
        transition:
            transform 0.32s cubic-bezier(0.32, 0.72, 0, 1),
            opacity 0.25s ease,
            visibility 0.25s ease;
    }

    :is(body.page-primeiro-mes, body.page-segundo-mes) .michelly-pl-modal.is-open {
        transform: translateY(0);
    }

    :is(body.page-primeiro-mes, body.page-segundo-mes) .michelly-pl-backdrop {
        background: rgba(8, 3, 6, 0.65);
        backdrop-filter: blur(14px);
    }
}

@media (max-width: 480px) {
    .michelly-pl-fab {
        left: 0.85rem;
        bottom: 1.1rem;
        width: 52px;
        height: 52px;
    }

    .michelly-pl-fab__img {
        width: 42px;
        height: 42px;
    }

    :is(body.page-primeiro-mes, body.page-segundo-mes) .michelly-pl-fab {
        width: calc(100% - 1.1rem);
        max-width: none;
        height: 54px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .michelly-pl-fab__img--spin {
        animation: none;
    }
}

.michelly-pl-backdrop {
    position: fixed;
    inset: 0;
    z-index: 10040;
    background: rgba(12, 6, 10, 0.55);
    backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.michelly-pl-backdrop.is-open {
    opacity: 1;
    visibility: visible;
}

.michelly-pl-modal {
    position: fixed;
    z-index: 10041;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(0.94);
    width: min(92vw, 380px);
    padding: 1.35rem 1.25rem 1.25rem;
    border-radius: 1.25rem;
    font-family: var(--font-body, 'Poppins', sans-serif);
    color: #fff8fb;
    background: linear-gradient(160deg, rgba(40, 18, 28, 0.97), rgba(18, 8, 14, 0.98));
    border: 1px solid rgba(255, 179, 198, 0.35);
    box-shadow:
        0 24px 64px rgba(0, 0, 0, 0.55),
        inset 0 0 60px rgba(255, 107, 138, 0.06);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease;
}

.michelly-pl-modal.is-open {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.michelly-pl-modal__art {
    margin: 0 auto 1rem;
    max-width: 200px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 179, 198, 0.2);
}

.michelly-pl-modal__cover {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
}

.michelly-pl-modal__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.michelly-pl-modal__title {
    margin: 0;
    font-family: var(--font-display, 'Dancing Script', cursive);
    font-size: 1.65rem;
    font-weight: 600;
    color: #ffe8f0;
    line-height: 1.2;
}

.michelly-pl-modal__close {
    flex-shrink: 0;
    width: 2.25rem;
    height: 2.25rem;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: rgba(255, 248, 251, 0.85);
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, color 0.2s ease;
}

.michelly-pl-modal__close:hover {
    background: rgba(255, 107, 138, 0.25);
    color: #fff;
}

.michelly-pl-modal__track {
    font-size: 0.95rem;
    line-height: 1.45;
    color: rgba(255, 236, 242, 0.92);
    margin: 0 0 1.15rem;
    min-height: 2.9rem;
}

.michelly-pl-modal__controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
}

.michelly-pl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 2.75rem;
    padding: 0 1.1rem;
    border: none;
    border-radius: 9999px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    color: #1a0a12;
    background: linear-gradient(135deg, #ffd6e0, #f0d68a);
    box-shadow: 0 4px 18px rgba(255, 107, 138, 0.28);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.michelly-pl-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 22px rgba(255, 107, 138, 0.38);
}

.michelly-pl-btn--icon {
    width: 2.85rem;
    min-width: 2.85rem;
    padding: 0;
    font-size: 1rem;
}

.michelly-pl-btn--ghost {
    color: #ffe8f0;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 179, 198, 0.35);
    box-shadow: none;
}

.michelly-pl-btn--ghost:hover {
    background: rgba(255, 179, 198, 0.18);
}

.michelly-pl-modal__hint {
    margin: 1rem 0 0;
    font-size: 0.78rem;
    line-height: 1.5;
    color: rgba(255, 236, 242, 0.65);
    text-align: center;
}
