/* TradeIt.gg affiliate banners - free-tier only. See tradeit-banner.js. */

/* Until the script reveals a mount (free tier) it stays fully hidden - no
   empty gap for Pro users, who never get mounted. */
[data-tradeit-mount][hidden] {
    display: none !important;
}

.tradeit-ad {
    position: relative;
    display: block;
    line-height: 0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.tradeit-ad:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
}

.tradeit-ad img {
    display: block;
    width: 100%;
    height: auto;
}

/* Small disclosure tag for honesty/FTC. */
.tradeit-ad__label {
    position: absolute;
    top: 6px;
    left: 6px;
    padding: 1px 6px;
    font-size: 9px;
    line-height: 1.4;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.82);
    background: rgba(0, 0, 0, 0.5);
    border-radius: 4px;
    pointer-events: none;
}

/* ---- Sidebar skyscraper (index + builder) -------------------------------- */
/* Fixed right rail so it never disturbs the centered .container grid.
   Only appears when there is genuine horizontal room beside the content. */
.tradeit-rail {
    display: none;
}

.tradeit-rail:empty {
    display: none !important; /* pro users / unfilled = no ghost box */
}

@media (min-width: 1500px) {
    .tradeit-rail {
        display: block;
        position: fixed;
        top: 120px;
        right: 24px;
        width: 225px;
        z-index: 40;
    }
}

/* ---- In-feed / gate rectangles ------------------------------------------- */
.tradeit-infeed,
.tradeit-gate {
    display: flex;
    justify-content: center;
    margin: 24px auto;
}

.tradeit-infeed .tradeit-ad,
.tradeit-gate .tradeit-ad {
    width: 300px;
    max-width: 100%;
}

/* ---- Inline bottom leaderboard (spans content width, above the footer) --- */
.tradeit-bottom {
    margin: 8px 0 24px;
}

.tradeit-bottom .tradeit-ad {
    width: 100%;
    border-radius: 12px;
}

.tradeit-bottom .tradeit-ad img {
    width: 100%;
    height: auto;
}

/* ---- Sticky footer leaderboard ------------------------------------------- */
.tradeit-footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 48px 8px 8px;
    background: rgba(10, 12, 20, 0.92);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.tradeit-footer .tradeit-ad {
    box-shadow: none;
    border-radius: 6px;
}

.tradeit-footer .tradeit-ad:hover {
    transform: none;
}

.tradeit-footer .tradeit-ad img {
    width: auto;
    max-width: 100%;
    max-height: 100px;
}

.tradeit-footer__close {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    line-height: 1;
    color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.08);
    border: none;
    border-radius: 50%;
    cursor: pointer;
}

.tradeit-footer__close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
}

/* Keep the fixed footer from covering page content. */
body.has-tradeit-footer {
    padding-bottom: 132px;
}

@media (max-width: 960px) {
    .tradeit-footer .tradeit-ad img {
        max-height: 60px;
    }
    body.has-tradeit-footer {
        padding-bottom: 88px;
    }
}
