/*
========================================
File: listing-page-uniform.css
========================================
*/

/* --- Header da Página de Listagem (Reutilizado) --- */
.listing-hero {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: var(--spacing-4);
    padding: var(--spacing-8) var(--spacing-6);
    background: linear-gradient(90deg, #4F46E5, #EC4899);
    border-radius: var(--border-radius-lg);
    min-height: 280px;
    margin-bottom: var(--spacing-8);
    margin-top: 20px;
}

.listing-hero__subtitle {
    font-size: var(--fs-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-primary);
}

.listing-hero__title {
    font-size: var(--fs-5xl);
    font-weight: 900;
    color: var(--color-text-primary);
    line-height: 1.1;
}

.listing-hero__description {
    max-width: 500px;
    color: rgba(239, 239, 239, 0.8);
}

@media (min-width: 768px) {
    .listing-hero {
        padding: var(--spacing-12);
    }

    .listing-hero__title {
        font-size: 5rem;
    }
}

/* --- Barra de Ações (Reutilizado) --- */
.actions-bar {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-4);
    align-items: center;
    margin-bottom: var(--spacing-6);
}

.actions-bar__play-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background-color: var(--color-primary);
    border-radius: 50%;
    color: var(--color-bg-dark);
    font-size: var(--fs-3xl);
    box-shadow: 0 4px 15px rgba(29, 185, 84, 0.4);
    transition: var(--transition-fast);
}

.actions-bar__play-btn:hover {
    background-color: var(--color-primary-darker);
    transform: scale(1.05);
}

.actions-bar__sort-select {
    background-color: var(--color-bg-content);
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border);
    padding: var(--spacing-2) var(--spacing-4);
    border-radius: var(--border-radius-md);
    font-size: var(--fs-sm);
    margin-left: auto;
}

.actions-bar__sort-select:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--color-primary);
}

.list-songs {
    display: flex;
    overflow-x: auto;
    gap: var(--spacing-4);
    padding-bottom: var(--spacing-4);
    margin: 0 calc(var(--spacing-4) * -1);
    padding-left: var(--spacing-4);
    padding-right: var(--spacing-4);
    flex-wrap: wrap;
}



/* --- Lista de Músicas (REESCRITA PARA UNIFORMIDADE) --- */
.song-list-container {
    display: flex;
    flex-direction: column;
}

.song-list__header {
    display: none;
    /* Escondido em mobile */
    padding: var(--spacing-2) var(--spacing-4);
    border-bottom: 1px solid var(--color-border);
    font-size: var(--fs-xs);
    text-transform: uppercase;
    color: var(--color-text-tertiary);
    letter-spacing: 0.05em;

    /* Grid para alinhar os cabeçalhos */
    display: grid;
    grid-template-columns: 2rem 1fr 1fr 5rem;
    /* #, Título, Álbum, Duração */
    gap: var(--spacing-4);
    align-items: center;
}

@media (max-width: 1023px) {

    /* Tablet */
    .song-list__header {
        grid-template-columns: 2rem 1fr 5rem;
        /* Oculta Álbum */
    }

    .song-list__header .header-album {
        display: none;
    }
}

@media (max-width: 767px) {

    /* Mobile */
    .song-list__header {
        display: none;
    }

    .list-songs .card {
        width: 43.3dvw;
        flex: unset;
    }
}

/* Item da Lista de Música */
.song-list__item-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    /* Mobile: Capa, Info, Opções */
    gap: var(--spacing-4);
    align-items: center;
    padding: var(--spacing-3) var(--spacing-2);
    border-bottom: 1px solid var(--color-border);
    transition: background-color 0.15s ease-in-out;
}

.song-list__item-row:hover {
    background-color: var(--color-bg-elevated);
}

.song-list__item-row:last-child {
    border-bottom: none;
}

.song-list__item-cover-wrapper {
    display: flex;
    align-items: center;
    gap: var(--spacing-4);
    overflow: hidden;
}

.song-list__item-cover {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: var(--border-radius-sm);
    flex-shrink: 0;
}

.song-list__item-info {
    overflow: hidden;
}

.song-list__item-title {
    font-weight: 500;
    color: var(--color-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-list__item-artist {
    font-size: var(--fs-sm);
    color: var(--color-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-list__item-options {
    color: var(--color-text-tertiary);
    background: none;
    border: none;
    padding: var(--spacing-2);
    cursor: pointer;
}

.song-list__item-options:hover {
    color: var(--color-text-primary);
}

/* Layout para Desktop e Tablet */
@media (min-width: 768px) {
    .song-list__item-row {
        grid-template-columns: 2rem 1fr 5rem;
        /* #, Título/Artista, Duração/Opções */
        padding: var(--spacing-3) var(--spacing-4);
    }

    .song-list__item-rank {
        font-size: var(--fs-sm);
        color: var(--color-text-tertiary);
        text-align: center;
    }

    .song-list__item-duration {
        font-size: var(--fs-sm);
        color: var(--color-text-secondary);
        text-align: right;
    }

    .song-list__item-actions-desktop {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        /* Alinha à direita */
        gap: var(--spacing-4);
    }
}

@media (min-width: 1024px) {
    .song-list__item-row {
        grid-template-columns: 2rem 2fr 1.5fr 5rem;
        /* #, Título/Artista, Álbum, Duração/Opções */
    }

    .song-list__item-album {
        font-size: var(--fs-sm);
        color: var(--color-text-secondary);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}