/* ============================================================
   Musikaa Playlist — playlist.css v1.0.0
   ============================================================ */

.mpl-wrapper {
    display: flex;
    gap: 0;
    width: 100%;
    background: #0a0a0a;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(0,0,0,0.5);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    min-height: 360px;
}

/* ---- ÁREA DO PLAYER ---- */
.mpl-player-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: #000;
}

.mpl-player-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.mpl-player-container presto-player,
.mpl-player-container .mpl-presto {
    width: 100%;
    height: 100%;
    display: block;
}

.mpl-now-playing {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #111;
    border-top: 1px solid #1e1e1e;
    min-height: 44px;
}

.mpl-np-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #e63946;
    flex-shrink: 0;
}

.mpl-np-title {
    font-size: 13px;
    color: #e0e0e0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---- LISTA ---- */
.mpl-list-area {
    width: 300px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    background: #111;
    border-left: 1px solid #1e1e1e;
    overflow: hidden;
}

.mpl-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px 10px;
    border-bottom: 1px solid #1e1e1e;
    flex-shrink: 0;
}

.mpl-list-title {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.mpl-list-count {
    font-size: 11px;
    color: #555;
}

.mpl-list-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 6px 0;
    scrollbar-width: thin;
    scrollbar-color: #2a2a2a #111;
}

.mpl-list-scroll::-webkit-scrollbar {
    width: 4px;
}
.mpl-list-scroll::-webkit-scrollbar-track {
    background: #111;
}
.mpl-list-scroll::-webkit-scrollbar-thumb {
    background: #2a2a2a;
    border-radius: 2px;
}

/* ---- ITEM ---- */
.mpl-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px 8px 12px;
    cursor: pointer;
    position: relative;
    transition: background 0.15s ease;
    border-left: 3px solid transparent;
}

.mpl-item:hover {
    background: #1a1a1a;
}

.mpl-item--active {
    background: #161616;
    border-left-color: #e63946;
}

.mpl-item-active-bar {
    display: none;
}

/* Thumbnail */
.mpl-item-thumb {
    width: 56px;
    height: 36px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
    background: #1e1e1e;
}

.mpl-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mpl-item-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
}

.mpl-item-play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    transition: opacity 0.15s;
}

.mpl-item:hover .mpl-item-play-overlay,
.mpl-item--active .mpl-item-play-overlay {
    opacity: 1;
}

/* Info */
.mpl-item-info {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.mpl-item-num {
    font-size: 11px;
    color: #333;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
    line-height: 1.4;
    margin-top: 2px;
}

.mpl-item--active .mpl-item-num {
    color: #e63946;
}

.mpl-item-meta {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.mpl-item-title {
    font-size: 12px;
    font-weight: 500;
    color: #ccc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
    transition: color 0.15s;
}

.mpl-item--active .mpl-item-title {
    color: #fff;
}

.mpl-item:hover .mpl-item-title {
    color: #fff;
}

.mpl-item-date {
    font-size: 10px;
    color: #444;
    display: flex;
    align-items: center;
    gap: 4px;
}

.mpl-item-date svg {
    color: #333;
}

/* ---- ERRO / VAZIO ---- */
.mpl-error,
.mpl-empty {
    padding: 12px;
    color: #888;
    font-size: 13px;
}

/* ---- RESPONSIVO ---- */
@media (max-width: 680px) {
    .mpl-wrapper {
        flex-direction: column;
    }
    .mpl-list-area {
        width: 100%;
        max-height: 260px;
        border-left: none;
        border-top: 1px solid #1e1e1e;
    }
}

@media (max-width: 480px) {
    .mpl-list-area {
        max-height: 220px;
    }
    .mpl-item-thumb {
        width: 48px;
        height: 30px;
    }
}
