/* ==============================================
   Playlist Header — Album page metadata
   Liquid Glass + Premium design
   ============================================== */

/* --- Variables --- */
.playlist-header {
    --ph-glass-bg: var(--t-glass-bg, rgba(255, 255, 255, 0.04));
    --ph-glass-border: var(--t-glass-border, rgba(255, 255, 255, 0.08));
    --ph-glass-blur: 16px;
    --ph-text-primary: var(--t-text-strong, #f3f4f6);
    --ph-text-secondary: var(--t-text-muted, rgba(255, 255, 255, 0.55));
    --ph-text-muted: var(--t-placeholder, rgba(255, 255, 255, 0.3));
    --ph-dot-color: var(--t-placeholder, rgba(255, 255, 255, 0.2));
    --ph-badge-bg: var(--t-card-bg, rgba(255, 255, 255, 0.06));
    --ph-badge-border: var(--t-glass-border, rgba(255, 255, 255, 0.1));
    --ph-radius: 16px;
    --ph-cover-size: 100px;

    display: flex;
    gap: 1.25rem;
    align-items: center;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    border-radius: var(--ph-radius);
    background: var(--ph-glass-bg);
    backdrop-filter: blur(var(--ph-glass-blur)) saturate(150%);
    -webkit-backdrop-filter: blur(var(--ph-glass-blur)) saturate(150%);
    border: 1px solid var(--ph-glass-border);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    position: relative;
}

/* --- Gradient border overlay (liquid glass) --- */
.playlist-header::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--ph-radius);
    padding: 1px;
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.12),
            rgba(255, 255, 255, 0.02) 40%,
            rgba(255, 255, 255, 0.06));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    pointer-events: none;
}

/* --- Cover thumbnail --- */
.playlist-header__cover {
    flex-shrink: 0;
    width: var(--ph-cover-size);
    height: var(--ph-cover-size);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.playlist-header__cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.9) contrast(1.1);
}

/* --- Metadata --- */
.playlist-header__meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* --- Badges --- */
.playlist-header__badges {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.playlist-header__badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    border-radius: 999px;
    font-family: var(--font-mono, ui-monospace, monospace);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    background: var(--ph-badge-bg);
    border: 1px solid var(--ph-badge-border);
}

.playlist-header__badge--genre {
    color: var(--ph-text-primary);
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.25);
}

.playlist-header__badge--mood {
    color: var(--badge-color, var(--ph-text-secondary));
    background: color-mix(in srgb, var(--badge-color) 12%, transparent);
    border-color: color-mix(in srgb, var(--badge-color) 25%, transparent);
}

/* --- Featured artists --- */
.playlist-header__artists {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--ph-text-primary);
    line-height: 1.3;
    letter-spacing: -0.01em;
}

/* --- Details line --- */
.playlist-header__details {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    flex-wrap: wrap;
}

.playlist-header__detail {
    font-family: var(--font-mono, ui-monospace, monospace);
    font-size: 0.75rem;
    color: var(--ph-text-muted);
    letter-spacing: 0.02em;
}

.playlist-header__dot {
    color: var(--ph-dot-color);
    font-size: 0.75rem;
    font-weight: 300;
    user-select: none;
}

/* --- Responsive (mobile) --- */
@media (max-width: 640px) {
    .playlist-header {
        padding: 1rem;
        gap: 0.75rem;
        --ph-glass-blur: 12px;
        flex-wrap: wrap;
    }

    .playlist-header__cover {
        --ph-cover-size: 72px;
        border-radius: 10px;
    }

    .playlist-header__badges {
        flex-wrap: nowrap;
        overflow: hidden;
    }

    .playlist-header__badge {
        font-size: 0.625rem;
        padding: 0.1875rem 0.5rem;
        flex-shrink: 0;
    }

    .playlist-header__artists {
        font-size: 0.8125rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .playlist-header__details {
        flex-wrap: nowrap;
        overflow: hidden;
    }

    .playlist-header__detail {
        font-size: 0.6875rem;
        white-space: nowrap;
    }
}

/* Very small screens — hide cover */
@media (max-width: 380px) {
    .playlist-header__cover {
        display: none;
    }
}


/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
    .playlist-header__cover-img {
        filter: none;
    }
}