.folder-tree {
    padding: 0.5rem 0 2rem;
    display: flex;
    flex-direction: column;
}

.folder-tree-message {
    padding: 0.75rem 1rem;
    margin: 0;
    color: #8b949e;
    font-size: 12px;
}

.folder-tree-message.error {
    color: #ff7b72;
}

.folder-tree .nav-item {
    margin-bottom: 0.25rem;
}

/* Folder header ------------------------------------------------------- */

.folder-tree summary {
    cursor: pointer;
    padding: 8px 16px;
    background: linear-gradient(90deg, #21262d 0%, #30363d 100%);
    color: #ff6600;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.02em;
    border-left: 3px solid transparent;
    transition: background 0.15s ease, border-color 0.15s ease;
    list-style: none;
    display: flex;
    align-items: center;
}

.folder-tree summary::-webkit-details-marker {
    display: none;
}

.folder-tree summary::before {
    content: "▶";
    margin-right: 8px;
    font-size: 9px;
    transition: transform 0.15s ease;
}

.folder-tree details[open] > summary::before {
    transform: rotate(90deg);
}

.folder-tree summary:hover {
    background: linear-gradient(90deg, #30363d 0%, #484f58 100%);
    border-left-color: #ff6600;
}

/* Playlist links ------------------------------------------------------ */

.folder-tree .nav-link {
    color: #c9d1d9;
    padding: 6px 16px 6px 40px;
    font-size: 13px;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    display: block;
    background: transparent;
}

/* Only leaf playlists get the note — a folder summary is also .nav-link,
   and previously inherited it, which hid its disclosure triangle. */
.folder-tree a.nav-link::before {
    content: "♫";
    margin-right: 8px;
    font-size: 11px;
    opacity: 0.55;
}

.folder-tree a.root-playlist {
    padding-left: 27px;
}

.folder-tree a.nav-link:hover {
    color: #ffffff;
    background: #21262d;
    border-left-color: #ffaa44;
}

.folder-tree a.nav-link.active {
    color: #ffffff;
    background: linear-gradient(90deg, rgba(255, 102, 0, 0.9) 0%, rgba(255, 136, 51, 0.75) 100%);
    border-left-color: #ffffff;
    font-weight: 600;
}

.folder-tree a.nav-link.active::before {
    opacity: 1;
}

.folder-children {
    padding: 2px 0;
}

/* Collection freshness -------------------------------------------------- */

.collection-status {
    margin-top: auto;
    padding: 0.9rem 1rem 0;
    border-top: 1px solid #21262d;
    color: #6e7681;
    font-size: 10.5px;
    line-height: 1.5;
}

.collection-status-added {
    margin-top: 2px;
    /* One line only: a track title can be very long. */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
