/* 5 Nov 2026: sponsor banner on the website pages (_partials/sponsor-slot.blade.php, assets/scripts/sponsors.02.js).
   The card as in the live-app (public/live-app/css/style.css, SPONS).
   5 Nov 2026 (sponsors.02): kept in view while scrolling, as in the live-app: sticky just below the fixed navbar
   (#header, 56 px; sponsors.02.js sets --spons-top to its real height). Not on short touch screens (phones in
   landscape), where it would take too much space; the same condition as the live-app. */

.spons-slot {
    margin: 0 0 15px;
}

@media (min-height: 450px), (hover: hover) and (pointer: fine) {
    .spons-slot {
        position: sticky;
        top: var(--spons-top, 56px);
        z-index: 10;                /* above panels and tables scrolling under it; the navbar is 1000 */
        margin: -8px 0 7px;         /* the padding below keeps the same spacing as above */
        padding: 8px 0;
        background: #f1f3f6;        /* the page background (#wrapper), so nothing shows through */
        /* the strip runs on to the left edge of #wrapper (--spons-left, set by sponsors.02.js; not over the sidebar)
           and past the right edge: wide tables (trials/table on a phone) are wider than .content */
        box-shadow: 0 0 0 100vmax #f1f3f6;
        clip-path: inset(0 -100vmax 0 calc(-1 * var(--spons-left, 0px)));
    }
}

.spons-slot[hidden] {
    display: none;
}

.spons-card {
    position: relative;
    display: block;
    width: 100%;
    max-width: 500px;
    aspect-ratio: 5 / 1;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 4px;
    border: 1px solid #e9e9eb;
    background: #fefefe;
    box-shadow: 0 1px 3px rgba(0,0,0,.2);
    box-sizing: border-box;
}

.spons-card img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;          /* safety net if an image has a different ratio */
    opacity: 0;
    transition: opacity .5s;
}

.spons-card img.active {
    opacity: 1;
}

.spons-card .spons-label::before {
    content: 'Sponsor';
}

.spons-card .spons-label {
    position: absolute;
    top: 3px;
    right: 5px;
    font-size: 9px;
    line-height: 1.4;
    color: #fff;
    background: rgba(0,0,0,.5);
    padding: 1px 5px;
    border-radius: 3px;
}
