/* ==========================================================================
   top10-carousel.css

   ROOT CAUSE FIX:
   The buttons are position:absolute at left:-50px / right:-50px.
   They CANNOT be children of .nf-top10-wrap because that element has
   overflow:hidden (needed to clip the sliding track). Clipping also hides
   anything outside the boundary, including the buttons.

   SOLUTION:
   - Move the buttons OUT of .nf-top10-wrap in the HTML so they are direct
     children of .top10-section instead.
   - Give .top10-section position:relative — the buttons anchor to IT.
   - .top10-section has padding:0 60px, so left:-50px / right:-50px lands
     inside that 60px gutter and is visible.
   - The hover trigger is .top10-section:hover (same pattern as
     .content-row:hover in global.css).
   - .nf-top10-wrap keeps overflow:hidden to clip the sliding track only.
   ========================================================================== */

/* ── Section wrapper ─────────────────────────────────────────────────────── */
.top10-section {
    margin-bottom: 80px;
    padding: 0 60px;          /* 60px gutter = room for the -50px buttons     */
    position: relative;       /* anchors the absolute prev/next buttons        */
}

.top10-title {
    font-size: 1.4em;
    font-weight: 600;
    margin-bottom: 20px;
    color: #e5e5e5;
}

/* ── Carousel wrap — clips the sliding track ONLY ───────────────────────── */
.nf-top10-wrap {
    position: relative;       /* still needed for track offset calculations   */
    overflow: hidden;         /* clips track — buttons must NOT be inside here */
    touch-action: pan-y;
}

/* ── Sliding track ───────────────────────────────────────────────────────── */
.top10-track {
    display: flex;
    transition: transform 0.32s ease;
    will-change: transform;
    overflow: visible;
    padding: 10px 0 30px;
}

/* ── Cell widths ─────────────────────────────────────────────────────────── */
.top10-cell {
    flex: 0 0 calc(100% / 2);
    max-width: calc(100% / 2);
    padding: 0 6px;
    box-sizing: border-box;
}

@media (min-width: 600px) {
    .top10-cell {
        flex: 0 0 calc(100% / 4);
        max-width: calc(100% / 4);
    }
}

@media (min-width: 992px) {
    .top10-cell {
        flex: 0 0 calc(100% / 6);
        max-width: calc(100% / 6);
        
        
    }
}

@media (min-width:601px) and (max-width: 1200px) {
    .top10-cell {
        flex: 0 0 calc(100% / 4);
        max-width: calc(100% / 4);
    }
}



/* ── Item: rank number + card ────────────────────────────────────────────── */
.top10-item {
    position: relative;
    display: flex;
    align-items: flex-end;
}

/* Giant rank number */
.top10-rank {
    font-size: clamp(5.5rem, 16vw, 10rem);
    font-weight: 900;
    line-height: 0.85;
    letter-spacing: -0.04em;
    color: transparent;
   
    background: linear-gradient(180deg, rgba(255,255,255,0.25) 0%, rgba(0,0,0,0) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    position: absolute;
    left: 0;
    bottom: 0;
    z-index: 1;
    pointer-events: none;
    user-select: none;
    transform: translateX(-8%);
}

@media (min-width: 1990px) {

    .top10-rank {font-size: 15rem;border: solid 1px red;}
}


/* ── Portrait card wrapper ───────────────────────────────────────────────── */
.top10-card-wrap {
    position: relative;
    z-index: 2;
    margin-left: clamp(26px, 8vw, 80px);
    flex: 1;
    min-width: 0;
}

.top10-card-wrap .card {
    margin: 0;
}

/* Portrait ratio — overrides global 16/9 */
.top10-card-wrap .card-thumbnail {
    aspect-ratio: 2 / 3;
    border-radius: 6px;
    overflow: hidden;
    background: #222;
    width: 100%;
    font-size: 0.8em;
}

/* ── Below-card info (mobile/tablet only) ────────────────────────────────── */
.top10-card-info {
    margin-top: 6px;
    padding: 0 2px;
    display: none;
}

.top10-card-info .card-info-title {
    font-size: 0.72rem;
    font-weight: 600;
    color: #e5e5e5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.top10-card-info .card-info-sub {
    font-size: 0.6rem;
    color: #888;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

    .top10-card-wrap .modal-meta {font-size: .8em;}

@media (hover: none), (pointer: coarse) {
    .top10-card-info { display: block; }
}

/* ── Prev / Next buttons ─────────────────────────────────────────────────
   Buttons are siblings of .nf-top10-wrap inside .top10-section.
   They use position:absolute, anchored to .top10-section (position:relative).
   top/bottom:0 + margin-top for the title height makes them span the wrap.
   global.css sets their visual style — we only set position & reveal here.

   The buttons must be positioned to align with .nf-top10-wrap vertically.
   We use top equal to the title block height so they don't overlap the title.
   Using top:0/bottom:0 on .top10-section spans the full section height which
   is fine — they're visually clipped to the wrap area by their own height:auto.
   ─────────────────────────────────────────────────────────────────────────── */

/* Override global.css height:auto so buttons span the wrap height exactly  */
.top10-section .carousel-control-prev,
.top10-section .carousel-control-next {
    /* Position anchors to .top10-section */
    position: absolute;
    /* Align to the wrap: top = title (~1.4em line + 20px margin-bottom ≈ 54px) */
    top: 54px;
    bottom: 0;
    /* Land inside the 60px padding gutter */
    width: 50px;
    z-index: 1100;
    opacity: 0;
    transition: opacity 0.3s;
}

.top10-section .carousel-control-prev { left: 0; }
.top10-section .carousel-control-next { right: 0; }

/* Reveal on section hover — mirrors .content-row:hover in global.css */
.top10-section:hover .carousel-control-prev,
.top10-section:hover .carousel-control-next {
    opacity: 1;
}

/* Disabled — stay hidden */
.top10-section .carousel-control-prev:disabled,
.top10-section .carousel-control-next:disabled {
    opacity: 0 !important;
    pointer-events: none;
}

/* ── Responsive padding ──────────────────────────────────────────────────── */
@media (max-width: 991px) {
    .top10-section {
        padding: 0 20px;
    }

    .top10-rank {bottom: unset; top: 0; font-size: 200px;}
    .top10-cell:last-child .top10-rank {font-size: 125px; letter-spacing: -5px; }
}

@media (max-width: 576px) {
    .top10-section {
        padding: 0 16px;
    }

    .top10-card-wrap{
        margin-left: 40px;
    }
    .top10-rank {
        font-size: clamp(3.5rem, 14vw, 6rem);bottom: unset; top: 0; font-size: 150px;
    }

    .top10-cell:last-child .top10-rank {font-size: 100px; letter-spacing: -5px;}

}
