/* Top 30 Music Chart Styles — Soul & Reggae — Flicker Theme */

:root {
    --top30-main:      #dd4377;   /* Flicker colorMain */
    --top30-dark:      #1a1a1a;   /* Flicker colorDark */
    --top30-card:      #222222;   /* Flicker colorDarkGrey */
    --top30-reggae:    #1dab63;   /* Reggae accent green */
    --top30-soul:      #dd4377;   /* Soul accent pink/magenta */
}

/* -----------------------------------------------------------------------
   Side-by-side page layout (70px gap & increased container width)
------------------------------------------------------------------------ */
.top30-sidebyside-outer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 70px;
    align-items: stretch;
    max-width: 1440px;
    margin: 0 auto;
    width: 100%;
}

.top30-sidebyside-col {
    min-width: 0; /* Prevent grid overflow */
    display: flex;
    flex-direction: column;
}

@media (max-width: 1024px) {
    .top30-sidebyside-outer {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

/* -----------------------------------------------------------------------
   Individual chart wrapper
------------------------------------------------------------------------ */
.top30-chart-wrapper {
    max-width: 100%;
    width: 100%;
    margin: 0;
    font-family: "Montserrat", "Roboto", -apple-system, BlinkMacSystemFont, sans-serif;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* -----------------------------------------------------------------------
   DJ Hero Banner (fixed 190px height for exact column alignment)
------------------------------------------------------------------------ */
.top30-dj-hero {
    background: linear-gradient(135deg, #111111 0%, #1a1a1a 55%, #20121a 100%);
    border: 1px solid rgba(221, 67, 119, 0.25);
    border-radius: 16px;
    padding: 16px 24px;
    height: 190px;
    min-height: 190px;
    max-height: 190px;
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    box-shadow: 0 18px 40px rgba(0,0,0,0.5);
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

/* Reggae variant — green accent on hero */
.top30-type-reggae .top30-dj-hero {
    border-color: rgba(29, 171, 99, 0.3);
    background: linear-gradient(135deg, #0d1a11 0%, #1a1a1a 55%, #112018 100%);
}

.top30-dj-hero::before {
    content: '';
    position: absolute;
    top: -60px; right: -60px;
    width: 280px; height: 280px;
    background: radial-gradient(circle, rgba(221,67,119,0.2) 0%, transparent 70%);
    pointer-events: none;
}

.top30-type-reggae .top30-dj-hero::before {
    background: radial-gradient(circle, rgba(29,171,99,0.18) 0%, transparent 70%);
}

.top30-dj-hero-content {
    flex: 1;
    z-index: 2;
    min-width: 0;
}

/* Genre Badge */
.top30-genre-badge {
    display: inline-block;
    background: rgba(221, 67, 119, 0.15);
    border: 1px solid rgba(221, 67, 119, 0.5);
    color: #dd4377;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2px;
    padding: 5px 14px;
    border-radius: 4px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.top30-type-reggae .top30-genre-badge {
    background: rgba(29, 171, 99, 0.15);
    border-color: rgba(29, 171, 99, 0.5);
    color: #1dab63;
}

/* Title */
.top30-dj-title {
    font-size: 1.65rem;
    font-weight: 900;
    margin: 0 0 12px 0;
    letter-spacing: -0.5px;
    text-transform: uppercase;
    color: #ffffff;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Meta pills */
.top30-hero-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.top30-meta-item {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.85rem;
    color: #dddddd;
    display: flex;
    align-items: center;
    gap: 7px;
}

.top30-meta-item strong { color: #ffffff; }

/* =======================================================================
   DJ PHOTO — CIRCLE + NAME BADGE ON THE BOTTOM EDGE
   Structure assumed:
   <div class="top30-dj-hero-image-wrap">
       <div class="top30-dj-image-frame">
           <img class="top30-dj-photo" ...>
       </div>
       <span class="top30-dj-name-badge">DJ SLY</span>
   </div>
======================================================================= */
.top30-dj-hero-image-wrap {
    position: relative;          /* anchor for the name badge */
    z-index: 3;
    flex-shrink: 0;
    padding-bottom: 12px;        /* room for the badge overhang */
}

/* The coloured ring */
.top30-dj-image-frame {
    position: relative;
    width: 138px;
    height: 138px;
    border-radius: 50%;
    padding: 3px;
    box-sizing: border-box;
    background: linear-gradient(135deg, #dd4377 0%, #f27a9b 100%);
    box-shadow: 0 0 26px 5px rgba(221, 67, 119, 0.45),
                0 10px 28px rgba(0, 0, 0, 0.45);
    transition: transform 0.3s ease;
    /* No overflow:hidden — the image masks itself below, and hiding
       overflow here would clip the name badge if it ever sits inside. */
}

.top30-type-reggae .top30-dj-image-frame {
    background: linear-gradient(135deg, #1dab63 0%, #63d99a 100%);
    box-shadow: 0 0 26px 5px rgba(29, 171, 99, 0.42),
                0 10px 28px rgba(0, 0, 0, 0.45);
}

.top30-dj-image-frame:hover {
    transform: scale(1.04);
}

/* ---- The photo itself -------------------------------------------------
   High specificity + !important so this beats any leftover rule, minified
   theme stylesheet, or inline style="height:155px" on the <img>.
   clip-path guarantees the circle even if border-radius is overridden.
---------------------------------------------------------------------- */
.top30-dj-hero .top30-dj-image-frame img.top30-dj-photo,
.top30-dj-hero-image-wrap .top30-dj-image-frame img.top30-dj-photo,
.top30-dj-image-frame > img.top30-dj-photo {
    position: absolute !important;
    top: 3px !important;
    left: 3px !important;
    right: auto !important;
    bottom: auto !important;
    width: calc(100% - 6px) !important;
    height: calc(100% - 6px) !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
    object-fit: cover !important;
    object-position: center 20% !important;  /* lower % = more headroom */
    border-radius: 50% !important;
    clip-path: circle(50% at 50% 50%) !important;
    display: block !important;
}

/* ---- Name badge: overlaps the bottom edge of the circle ---- */
.top30-dj-hero-image-wrap .top30-dj-name-badge,
.top30-dj-name-badge {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    background: #dd4377;
    color: #ffffff;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 1.5px;
    padding: 5px 15px;
    border-radius: 14px;
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.55);
    text-transform: uppercase;
    line-height: 1.2;
    z-index: 4;
}

.top30-type-reggae .top30-dj-name-badge {
    background: #1dab63;
}

/* -----------------------------------------------------------------------
   Song List Container & Table Header
------------------------------------------------------------------------ */
.top30-song-list {
    background: #1a1a1a;
    border-radius: 12px;
    padding: 16px;
    border: 1px solid rgba(255,255,255,0.07);
    flex: 1;
}

.top30-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
    height: 38px;
    min-height: 38px;
    max-height: 38px;
    box-sizing: border-box;      /* was "border-border" — invalid, so ignored */
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: #666666;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    margin-bottom: 10px;
}

/* -----------------------------------------------------------------------
   Song Items (strict 64px height for perfect row alignment across columns)
------------------------------------------------------------------------ */
.top30-song-item {
    display: flex;
    align-items: center;
    background: #222222;
    border: 1px solid rgba(255,255,255,0.04);
    border-left: 4px solid transparent;
    border-radius: 6px;
    padding: 0 16px;
    height: 64px;
    min-height: 64px;
    max-height: 64px;
    box-sizing: border-box;
    margin-bottom: 8px;
    transition: all 0.2s ease;
}

.top30-song-item:last-child { margin-bottom: 0; }

.top30-song-item:hover {
    background: #2a2a2a;
    border-left-color: #dd4377;
    transform: translateX(3px);
}

.top30-type-reggae .top30-song-item:hover {
    border-left-color: #1dab63;
}

/* Rank column */
.top30-rank-col {
    min-width: 48px;
    width: 48px;
    flex-shrink: 0;
}

.top30-rank-num {
    font-size: 1.25rem;
    font-weight: 900;
    color: #555555;
}

/* Top 3 accent colours */
.top30-song-item.rank-1 { border-left-color: #fbbf24 !important; }
.top30-song-item.rank-1 .top30-rank-num { color: #fbbf24; font-size: 1.4rem; }

.top30-song-item.rank-2 { border-left-color: #e2e8f0 !important; }
.top30-song-item.rank-2 .top30-rank-num { color: #e2e8f0; font-size: 1.35rem; }

.top30-song-item.rank-3 { border-left-color: #f59e0b !important; }
.top30-song-item.rank-3 .top30-rank-num { color: #f59e0b; font-size: 1.3rem; }

/* Info column (Title + Artist) */
.top30-info-col {
    flex: 1;
    min-width: 0; /* Crucial for text-overflow ellipsis inside flex */
    padding-right: 12px;
}

.top30-song-title {
    font-size: 0.98rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 2px;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.top30-song-artist {
    font-size: 0.86rem;
    color: #dd4377;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.top30-type-reggae .top30-song-artist {
    color: #1dab63;
}

/* Label badge column */
.top30-label-col {
    text-align: right;
    flex-shrink: 0;
}

.top30-label-badge {
    display: inline-block;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    color: #aaaaaa;
    font-size: 0.76rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 3px;
    letter-spacing: 0.3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
}

/* No-data state */
.top30-no-data {
    padding: 30px;
    text-align: center;
    background: #1a1a1a;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    color: #888888;
}

/* -----------------------------------------------------------------------
   Responsive
------------------------------------------------------------------------ */
@media (max-width: 1024px) {
    .top30-dj-hero {
        height: auto;
        min-height: initial;
        max-height: initial;
        padding: 20px;
    }
}

@media (max-width: 640px) {
    .top30-label-col {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .top30-dj-image-frame,
    .top30-song-item {
        transition: none;
    }
    .top30-dj-image-frame:hover,
    .top30-song-item:hover {
        transform: none;
    }
}