/* ============================================================
   FAVORITOS — YOKA
============================================================ */

.favorites-page {
    width: 100%;
    min-height: 100vh;

    padding: 40px 0 80px;
}


/* ============================================================
   CONTAINER PRINCIPAL
============================================================ */

.favorites-container {
    width: 50%;

    margin: 0 auto;

    box-sizing: border-box;
}


/* ============================================================
   CABEÇALHO
============================================================ */

.favorites-header {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 30px;
}


.favorites-header h1 {
    margin: 0;

    color: white;

    font-size: 28px;
    font-weight: 700;

    line-height: 1.3;
}


.favorites-count {
    flex-shrink: 0;

    padding: 7px 12px;

    border-radius: 20px;

    background: #f3f4f6;

    color: #4b5563;

    font-size: 14px;
    font-weight: 600;
}


/* ============================================================
   MENSAGENS
============================================================ */

.song-message {
    width: 100%;

    padding: 30px 20px;

    margin-bottom: 25px;

    border: 1px solid #e5e7eb;

    border-radius: 12px;

    background: #ffffff;

    color: #6b7280;

    text-align: center;

    font-size: 15px;

    box-sizing: border-box;
}


/* ============================================================
   ERRO
============================================================ */

#favoritesError {
    color: #b91c1c;

    background: #fef2f2;

    border-color: #fecaca;
}


/* ============================================================
   LISTA DE FAVORITOS
============================================================ */

.favorites-list {
    width: 100%;

    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 20px;

    box-sizing: border-box;
}


/* ============================================================
   CARD
============================================================ */

.favorite-song-card {
    width: 100%;
    min-width: 0;
    max-width: 100%;

    display: flex;
    flex-direction: column;

    box-sizing: border-box;

    overflow: hidden;

    border: 1px solid #e5e7eb;

    border-radius: 12px;

    background: #ffffff;

    box-shadow:
        0 2px 8px rgba(
            0,
            0,
            0,
            0.04
        );

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}


.favorite-song-card:hover {
    transform: translateY(-3px);

    box-shadow:
        0 8px 24px rgba(
            0,
            0,
            0,
            0.08
        );
}


/* ============================================================
   CAPA
============================================================ */

.favorite-song-cover {
    width: 100%;

    aspect-ratio: 1 / 1;

    overflow: hidden;

    background: #f3f4f6;

    box-sizing: border-box;
}


.favorite-song-cover img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;
}


.favorite-no-cover {
    width: 100%;
    height: 100%;

    display: flex;

    align-items: center;
    justify-content: center;

    font-size: 35px;

    color: #9ca3af;
}


/* ============================================================
   INFORMAÇÕES
============================================================ */

.favorite-song-info {
    width: 100%;

    padding: 12px;

    box-sizing: border-box;
}


.favorite-song-info h2 {
    width: 100%;

    margin: 0 0 5px;

    overflow: hidden;

    color: #111827;

    font-size: 20px;
    font-weight: 700;

    line-height: 1.3;

    white-space: nowrap;

    text-overflow: ellipsis;
}


.favorite-song-info p {
    width: 100%;

    margin: 0;

    overflow: hidden;

    color: #6b7280;

    font-size: 18px;

    line-height: 1.4;

    white-space: nowrap;

    text-overflow: ellipsis;
}


/* ============================================================
   AÇÕES
============================================================ */

.favorite-song-actions {
    width: 100%;

    display: flex;

    align-items: center;

    gap: 6px;

    padding: 0 12px 12px;

    box-sizing: border-box;
}


.favorite-song-actions button {
    min-width: 0;
    max-width: 100%;

    flex: 1;

    padding: 8px 6px;

    border-radius: 7px;

    font-size: 11px;
    font-weight: 600;

    cursor: pointer;

    box-sizing: border-box;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease;
}


/* ============================================================
   BOTÃO OUVIR
============================================================ */

.favorite-play-button {
    border: 1px solid #111827;

    background: #111827;

    color: #ffffff;
}


.favorite-play-button:hover {
    border-color: #374151;

    background: #374151;
}


/* ============================================================
   BOTÃO REMOVER
============================================================ */

.favorite-remove-button {
    border: 1px solid #e5e7eb;

    background: #ffffff;

    color: #6b7280;
}


.favorite-remove-button:hover {
    border-color: #fecaca;

    background: #fef2f2;

    color: #dc2626;
}


.favorite-remove-button:disabled {
    opacity: 0.6;

    cursor: not-allowed;
}


/* ============================================================
   TABLET
============================================================ */

@media (max-width: 1100px) {

    .favorites-container {
        width: 70%;
    }


    .favorites-list {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }

}


/* ============================================================
   MOBILE
============================================================ */

@media (max-width: 700px) {

    .favorites-page {
        padding: 30px 0 60px;
    }


    .favorites-container {
        width: 90%;
    }


    .favorites-header {
        align-items: flex-start;

        flex-direction: column;

        gap: 10px;
    }


    .favorites-header h1 {
        font-size: 24px;
    }


    .favorites-list {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 16px;
    }

}


/* ============================================================
   MOBILE PEQUENO
============================================================ */

@media (max-width: 480px) {

    .favorites-container {
        width: 94%;
    }


    .favorites-header h1 {
        font-size: 21px;
    }


    .favorites-list {
        grid-template-columns: 1fr;

        gap: 18px;
    }


    .favorite-song-actions {
        flex-direction: column;
    }


    .favorite-song-actions button {
        width: 100%;

        font-size: 12px;

        padding: 9px;
    }

}
