﻿/* container */
.ng-tracklist {
    width: 100%;
    margin-top: 8px;
}

/* table skeleton */
.ng-tracklist-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

    .ng-tracklist-table thead th {
        text-align: left;
        font-size: 0.75rem;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        color: #b3b3b3;
        padding: 0 16px 8px;
        border-bottom: 1px solid #282828;
        font-weight: 500;
    }

.ng-col-index {
    width: 40px;
}

.ng-col-duration {
    width: 70px;
    text-align: right;
}

.ng-col-like {
    width: 40px;
}

.ng-col-more {
    width: 32px;
}

/* rows */
.ng-track-row {
    color: #fff;
    font-size: 0.95rem;
    cursor: pointer;
}

    .ng-track-row td {
        padding: 6px 16px;
        vertical-align: middle;
        border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    }

    .ng-track-row:hover {
        background: #1a1a1a;
    }

/* current track highlight */
.ng-row-current {
    background: #282828;
}

    .ng-row-current .ng-track-title {
        color: #1db954;
    }

/* index / play button */
.ng-row-index-btn {
    border: none;
    background: transparent;
    color: #b3b3b3;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    padding: 0;
}

.ng-row-index-number {
    display: inline-block;
}

.ng-row-index-play {
    display: none;
    font-size: 0.8rem;
}

/* show play icon on hover instead of number */
.ng-track-row:hover .ng-row-index-number {
    display: none;
}

.ng-track-row:hover .ng-row-index-play {
    display: inline-block;
}

/* artwork + text */
.ng-title-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ng-track-art {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
}

.ng-title-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.ng-track-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ng-track-artist {
    font-size: 0.8rem;
    color: #b3b3b3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* album cell */
.ng-cell-album {
    font-size: 0.9rem;
    color: #b3b3b3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* duration */
.ng-cell-duration {
    text-align: right;
    font-size: 0.85rem;
    color: #b3b3b3;
}

/* like + more buttons */
.ng-cell-like,
.ng-cell-more {
    text-align: center;
}

.ng-icon-button {
    border: none;
    background: transparent;
    color: #b3b3b3;
    cursor: pointer;
    padding: 0;
}

    .ng-icon-button:hover {
        color: #fff;
    }

/* generic text button (album link) */
.ng-link-button {
    border: none;
    background: transparent;
    padding: 0;
    color: #fff;
    cursor: pointer;
}

    .ng-link-button:hover {
        text-decoration: underline;
    }

/* empty message */
.ng-tracklist-empty {
    color: #b3b3b3;
    font-size: 0.9rem;
}


.ng-menu-overlay {
    position: fixed;
    inset: 0;
    background: transparent;
    z-index: 1000;
}

.ng-track-menu {
    position: fixed;
    width: 240px;
    background: #181818;
    border-radius: 6px;
    padding: 8px 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    z-index: 2000;
    animation: fadeIn 0.08s ease-out;
}

.ng-menu-item {
    width: 100%;
    background: transparent;
    border: none;
    padding: 10px 16px;
    text-align: left;
    color: #fff;
    font-size: 0.9rem;
    cursor: pointer;
}

    .ng-menu-item:hover {
        background: #2a2a2a;
    }

.ng-menu-separator {
    height: 1px;
    margin: 6px 0;
    background: #333;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-2px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ng-info-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2500;
}

.ng-track-info {
    background: #181818;
    border-radius: 8px;
    padding: 20px 24px;
    max-width: 480px;
    width: calc(100% - 32px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 0.9rem;
}

.ng-track-info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

    .ng-track-info-header h5 {
        margin: 0;
        font-size: 1rem;
    }

.ng-info-close {
    border: none;
    background: transparent;
    color: #b3b3b3;
    cursor: pointer;
    font-size: 1rem;
}

    .ng-info-close:hover {
        color: #fff;
    }

.ng-track-info-grid {
    display: grid;
    grid-template-columns: 120px 1fr;
    column-gap: 16px;
    row-gap: 4px;
    margin: 0;
}

    .ng-track-info-grid dt {
        font-weight: 500;
        color: #b3b3b3;
    }

    .ng-track-info-grid dd {
        margin: 0;
        word-break: break-all;
    }


.ng-col-added {
    width: 110px;
}

.ng-cell-added {
    font-size: 0.85rem;
    color: #b3b3b3;
    white-space: nowrap;
}

/* ====== RESPONSIVE LAYOUT FOR TRACK LIST ================================= */

/* ====== MOBILE LAYOUT (phones) ======================================= */
@media (max-width: 768px) {

    /* Hide header row completely */
    .ng-tracklist-table thead {
        display: none;
    }

    /* Hide index, artwork, album, added, duration */
    .ng-col-index,
    .ng-cell-index,
    .ng-track-art,
    .ng-col-album,
    .ng-cell-album,
    .ng-col-added,
    .ng-cell-added,
    .ng-col-duration,
    .ng-cell-duration {
        display: none !important;
    }

    /* Row spacing */
    .ng-track-row td {
        padding: 10px 12px;
    }

    /* Title + artist block gets more space */
    .ng-title-wrap {
        gap: 0; /* no need for artwork gap */
        padding-left: 0;
    }

    .ng-title-text {
        flex-direction: column;
        min-width: 0;
    }

    .ng-track-title {
        font-size: 1rem;
        font-weight: 500;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .ng-track-artist {
        font-size: 0.8rem;
        opacity: 0.8;
    }

    /* Like + more icons stay aligned to the right */
    .ng-col-like,
    .ng-cell-like,
    .ng-col-more,
    .ng-cell-more {
        width: 32px;
        text-align: right;
    }

    .ng-cell-like,
    .ng-cell-more {
        padding-left: 6px;
        padding-right: 6px;
    }

    /* Entire row feels like a list entry */
    .ng-track-row {
        height: 56px;
    }
}

/* Super-small phones: hide index even if table tries to show it */
@media (max-width: 480px) {
    .ng-col-index,
    .ng-cell-index {
        display: none !important;
    }
}


/* MOBILE: compact track rows (no #, no time, no artwork) */
@media (max-width: 768px) {
    /* Only affect mobile shell */
    .ng-shell-mobile .ng-tracklist-table {
        table-layout: auto; /* let the title cell breathe */
    }

        /* Hide index + duration columns (headers) */
        .ng-shell-mobile .ng-tracklist-table thead .ng-col-index,
        .ng-shell-mobile .ng-tracklist-table thead .ng-col-duration {
            display: none;
        }

        /* Hide index + duration cells in body */
        .ng-shell-mobile .ng-tracklist-table tbody .ng-cell-index,
        .ng-shell-mobile .ng-tracklist-table tbody .ng-cell-duration {
            display: none;
        }

        /* Hide small artwork in track rows */
        .ng-shell-mobile .ng-tracklist-table .ng-track-art {
            display: none;
        }

        /* Tighten padding a bit on mobile */
        .ng-shell-mobile .ng-tracklist-table .ng-track-row td {
            padding: 8px 8px;
        }

        /* Let title/artist use full width */
        .ng-shell-mobile .ng-tracklist-table .ng-title-wrap {
            gap: 8px;
        }
}
