/* Shared dimensions keep the content aligned when navigating between pages. */
.site-content-layout {
    --side-ad-width: max(120px, calc((100vh - 100px) / 6));
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    width: 100%;
    margin-inline: auto;
    padding: 64px 0 0;
    box-sizing: border-box;
    min-width: 0;
}

.site-content-layout > div {
    min-width: 0;
}

.site-content-layout #leftBannerWrap,
.site-content-layout #rightBannerWrap {
    width: 100%;
}

.site-content-layout #leftBanner,
.site-content-layout #rightBanner {
    top: 80px;
}

.site-content-layout #leftBanner > a,
.site-content-layout #rightBanner > a {
    height: max(600px, calc(100vh - 100px));
    max-height: none;
    aspect-ratio: 1 / 6;
    max-width: 100%;
}

.site-mobile-banner {
    position: fixed;
    top: 64px;
    left: 0;
    width: 100%;
    padding: 8px 24px;
    z-index: 30;
    background: #15161d;
}

.site-mobile-banner img {
    display: block;
    width: 100%;
    height: auto;
}

.site-mobile-banner-toggle {
    position: absolute;
    left: 0;
    bottom: -28px;
    padding: 6px 10px;
    border-radius: 0 0 8px 0;
    background: #23252e;
    color: #d4d4d8;
}

.site-mobile-banner-edge {
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 100%;
    height: 6px;
    background: #23252e;
    border-top: 1px solid #30323c;
}

.site-mobile-banner.is-collapsed > a {
    display: none;
}

.home-affiliate-page {
    width: 100%;
    min-width: 0;
    padding: 0;
}

.affiliate-marquee-item {
    width: 168px;
    height: 56px;
    padding-inline: 16px;
}

.affiliate-marquee-item img {
    max-height: 64px;
}

#featuredAffiliateGrid,
#affiliateGrid,
#secondaryAffiliateGrid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.featured-affiliate-logo {
    height: 32px;
}

.featured-affiliate-caption {
    align-items: flex-start;
    gap: 4px;
    padding: 0;
    font-size: 9px;
    line-height: 1.5;
}

.featured-affiliate-check {
    width: 12px;
    height: 12px;
}

.affiliate-list-card {
    min-height: 0;
    height: 50px;
    padding: 8px;
    border-radius: 8px;
}

.affiliate-list-logo {
    width: 100%;
    height: 32px;
}

.home-affiliate-search {
    margin-bottom: 12px;
    padding-inline: 16px;
}

@media (max-width: 767px) {
    .site-content-layout {
        padding-top: calc(64px + var(--mobile-banner-space, 0px));
    }

    .site-content-layout #leftBannerWrap,
    .site-content-layout #rightBannerWrap {
        display: none;
    }

    .site-content-layout.has-mobile-banner > div > .mb-6.block.md\:hidden {
        display: none;
    }

    .home-affiliate-page h1 {
        font-size: 16px;
        line-height: 24px;
    }
}

@media (min-width: 768px) {
    .site-content-layout {
        /* Narrow, tall tablets retain room for the content without overflowing. */
        grid-template-columns:
            min(var(--side-ad-width), max(120px, calc((100% - 440px) / 2)))
            minmax(0, 1280px)
            min(var(--side-ad-width), max(120px, calc((100% - 440px) / 2)));
        max-width: calc(1280px + var(--side-ad-width) * 2 + 40px);
    }

    .site-mobile-banner {
        display: none;
    }

    .affiliate-list-card {
        height: 106px;
        padding-block: 28px;
    }

    .affiliate-list-logo {
        height: 48px;
    }
}

@media (min-width: 1024px) {
    .featured-affiliate-caption {
        align-items: center;
        gap: 8px;
        padding-inline: 8px;
        font-size: 12px;
    }

    .featured-affiliate-check {
        width: 20px;
        height: 20px;
    }
}

@media (min-width: 1280px) {
    .affiliate-marquee-item {
        width: 274px;
        height: calc(274px / 3);
    }

    .affiliate-marquee-item img {
        max-height: 80px;
    }

    #featuredAffiliateGrid,
    #affiliateGrid,
    #secondaryAffiliateGrid {
        gap: 16px;
    }

    .featured-affiliate-logo {
        height: 64px;
    }

    .affiliate-list-card {
        height: 90px;
        padding: 12px;
        border-radius: 12px;
    }

    .affiliate-list-logo {
        height: 64px;
    }

    .site-sidebar-offset {
        margin-left: var(--sidebar-offset, 288px) !important;
    }

    .site-header-offset {
        padding-left: var(--sidebar-offset, 288px) !important;
    }

    .site-header-reward {
        left: var(--sidebar-offset, 288px) !important;
    }

    #default-sidebar.sidebar-collapsed {
        width: 83px;
        transform: translateX(0);
    }

    #default-sidebar.sidebar-collapsed [aria-label="Home Link"],
    #default-sidebar.sidebar-collapsed .sidebar-link-text,
    #default-sidebar.sidebar-collapsed .sidebar-footer,
    #default-sidebar.sidebar-collapsed .sidebar-group-title,
    #default-sidebar.sidebar-collapsed .sidebar-group-toggle {
        display: none;
    }

    #default-sidebar.sidebar-collapsed .sidebar-logo-row {
        justify-content: center;
        gap: 0;
    }

    #default-sidebar.sidebar-collapsed .sidebar-logo-row > div {
        margin-left: 0;
    }

    #default-sidebar.sidebar-collapsed a.menu-item-bg {
        justify-content: center;
        gap: 0;
        padding-inline: 0;
    }

    #default-sidebar.sidebar-collapsed li[data-v-87a0b421] a {
        font-size: 0;
        justify-content: center;
        padding-inline: 0;
        gap: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .affiliate-marquee-track {
        animation: none;
    }
}

[data-ticket-page] [data-ticket-status-tabs] {
    flex: 0 0 auto !important;
    align-content: flex-start !important;
    height: auto !important;
    min-height: 0 !important;
}

[data-ticket-page] .ticket-winners-panel {
    position: absolute;
    z-index: 20;
    display: flex;
    justify-content: center;
    left: 0;
    right: 0;
    top: 12px;
    pointer-events: none;
}

[data-ticket-page] .ticket-winners-panel .winners-leaderboard {
    pointer-events: auto;
    width: 256px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
    font-family: Inter, sans-serif;
}

[data-ticket-page] .winners-title-row { display: flex; align-items: center; gap: 12px; }
[data-ticket-page] .winners-title-divider { flex: 1; height: 1px; background: #ffffff0a; }
[data-ticket-page] .winners-title-text { font-size: 12px; font-weight: 500; letter-spacing: 2.4px; text-transform: uppercase; color: #fafafa; white-space: nowrap; }
[data-ticket-page] .winners-filter-btn { display: flex; align-items: center; width: 100%; padding: 8px 12px; border-radius: 6px; border: none; cursor: pointer; color: inherit; background: linear-gradient(180deg, rgba(255,255,255,.08) 0%, transparent 100%), #2c2f3a; }
[data-ticket-page] .winners-filter-label { flex: 1; text-align: center; font-size: 11px; font-weight: 500; color: #fafafa; }
[data-ticket-page] .winners-table { width: 256px; display: flex; flex-direction: column; }
[data-ticket-page] .winners-table-header,
[data-ticket-page] .winners-row { display: grid; grid-template-columns: 54px 128px 74px; align-items: center; }
[data-ticket-page] .winners-table-header { height: 30px; border-bottom: 1px solid rgba(255,255,255,.04); font-size: 10px; font-weight: 500; text-transform: uppercase; color: #d4d4d8; }
[data-ticket-page] .winners-col-rank,
[data-ticket-page] .winners-col-value { text-align: right; padding-right: 12px; }
[data-ticket-page] .winners-col-user { padding-left: 8px; min-width: 0; display: flex; align-items: center; gap: 6px; }
[data-ticket-page] .winners-row { height: 38px; border-bottom: 1px solid rgba(255,255,255,.04); }
[data-ticket-page] .winners-rank-text,
[data-ticket-page] .winners-username,
[data-ticket-page] .winners-value-text { font-size: 10px; font-weight: 500; color: #fafafa; }
[data-ticket-page] .winners-username { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
[data-ticket-page] .winners-avatar { width: 16px; height: 16px; border-radius: 50%; object-fit: cover; background: #3f3f46; }
[data-ticket-page] .winners-value--top { font-weight: 700; }
[data-ticket-page] .winners-value--rest { color: #d4d4d8; }
[data-ticket-page] .winners-row--rank-1 { background: linear-gradient(90deg, transparent, #ffcc004d); }
[data-ticket-page] .winners-row--rank-2 { background: linear-gradient(90deg, transparent, #12ff6933); }
[data-ticket-page] .winners-row--rank-3 { background: linear-gradient(90deg, transparent, #60a5fa33); }
[data-ticket-page] .winners-more-btn { display: flex; align-items: center; justify-content: center; width: 100%; margin-top: 8px; padding: 6px 12px; border: none; border-radius: 6px; cursor: pointer; background: #ffffff0a; color: #d4d4d8; font-size: 10px; }
[data-ticket-page] .winners-rows--expanded { max-height: 380px; overflow-y: auto; }

@media (min-width: 1280px) {
    [data-ticket-page] .ticket-winners-panel {
        left: auto;
        right: 2.5rem;
        top: 0;
        bottom: 0;
        align-items: center;
    }
}

@media (max-width: 1279px) {
    [data-ticket-page] [data-ticket-hero-left],
    [data-ticket-page] [data-ticket-hero-right] {
        display: none !important;
    }

    [data-ticket-page] [data-ticket-hero-card] {
        min-height: 460px !important;
        height: 460px !important;
    }
}
