:root {
    --rpp-global-playlist-title-color: #333333;
    --rpp-global-playlist-cover-size: 70px;
    --rpp-pl-font-size: 15px;
}

.rpp-catbar {
    margin: 24px 0;
}

.rpp-catbar-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.rpp-tab {
    padding: 6px 16px;
    border-radius: 20px;
    border: 1px solid #ccc;
    background: #fff;
    cursor: pointer;
    font-size: .83rem;
    font-weight: 600;
    color: #333;
    transition: all .2s;
}

.rpp-tab:hover,
.rpp-tab.active {
    background: #1c1c1e;
    color: #fff;
    border-color: #1c1c1e;
}

.rpp-tab-sub {
    font-size: .76rem;
    opacity: .85;
}

.rpp-catbar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 18px;
}

.rpp-tabs-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}

.rpp-tabs-btn {
    display: inline-flex;
    align-items: center;
    padding: 7px 15px;
    border-radius: 6px;
    border: 1px solid #ccc;
    background: #fff;
    color: #333;
    cursor: pointer;
    font-size: .82rem;
    font-weight: 600;
}

.rpp-tabs-btn.is-active {
    background: #1c1c1e;
    color: #fff;
}

.rpp-tabs-btn-logo {
    height: 18px;
    vertical-align: middle;
    margin-right: 5px;
    border-radius: 2px;
}

/* Fallback styles per eventuali playlist renderizzate fuori Shadow DOM */
.playlist .pl-viewport {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    cursor: grab;
}

.playlist .pl-viewport::-webkit-scrollbar { display: none; }
.playlist .pl-viewport.is-dragging { cursor: grabbing; user-select: none; }

.playlist .pl-list {
    list-style: none;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0;
    padding: 0;
    margin: 0;
    width: max-content;
}

.playlist .pl-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    padding: 8px 8px 10px;
    width: 160px;
    flex-shrink: 0;
    border-right: 1px solid rgba(0, 0, 0, .08);
    background: transparent;
    transition: background 140ms ease;
    box-sizing: border-box;
}

.playlist .pl-item:last-child { border-right: none; }
.playlist .pl-item:hover { background: rgba(0, 0, 0, .03); }

.playlist .pl-art {
    width: 100%;
    aspect-ratio: 1/1;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    display: block;
}

.playlist .pl-info {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.playlist .pl-t {
    color: var(--rpp-global-playlist-title-color);
    font-size: var(--rpp-pl-font-size);
    font-weight: 600;
    line-height: 1.25;
    display: block !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.playlist .pl-a {
    font-size: calc(var(--rpp-pl-font-size) * .86);
    line-height: 1.25;
    margin-top: 3px;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.playlist .rpp-track-info {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.playlist .rpp-track-title {
    color: var(--rpp-global-playlist-title-color, #111111) !important;
    font-size: var(--rpp-pl-font-size);
    font-weight: 700 !important;
    display: block !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 1 !important;
    text-shadow: none !important;
    width: 100%;
}

.playlist .rpp-track-artist {
    display: block;
    font-size: calc(var(--rpp-pl-font-size) * .86);
    margin-top: 2px;
    color: #333;
    opacity: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: none;
    width: 100%;
}

.playlist .pl-dots {
    display: flex;
    justify-content: center;
    gap: 5px;
    padding: 6px 0 8px;
}

.playlist .pl-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(0, 0, 0, .18);
    transition: background .2s, transform .2s;
    cursor: pointer;
}

.playlist .pl-dot.active {
    background: rgba(0, 0, 0, .55);
    transform: scale(1.3);
}
