/* B0X3 v126 - "our projects" cards (js/Ads.js) and the ring sponsor's name */

.ad {
    --ad-h: 54px;
    display: block;
    width: min(100%, 360px);
    margin: 10px auto 0;
    text-align: left;
    pointer-events: auto;
}
.ad-label {
    display: block;
    margin: 0 0 3px 2px;
    font: 600 9px/1 'Oswald', Arial, sans-serif;
    letter-spacing: 3px;
    color: rgba(255, 255, 255, .38);
}
.ad-slot { height: var(--ad-h); transition: opacity .22s ease; }
.ad-slot.ad-out { opacity: 0; }
.ad-card {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 100%;
    padding: 0 10px 0 7px;
    box-sizing: border-box;
    border-radius: 10px;
    background: linear-gradient(100deg, color-mix(in srgb, var(--ad-c2) 82%, transparent), rgba(10, 10, 14, .72));
    border: 1px solid color-mix(in srgb, var(--ad-c1) 45%, transparent);
    color: #f2f0ea;
    text-decoration: none;
    overflow: hidden;
    transition: border-color .2s, transform .2s;
}
@supports not (background: color-mix(in srgb, red 50%, blue)) {
    .ad-card { background: rgba(10, 10, 14, .78); border-color: rgba(255, 255, 255, .18); }
}
.ad-card:hover, .ad-card:focus-visible { border-color: var(--ad-c1); }
.ad-card:focus-visible { outline: 2px solid var(--gold, #f0c040); outline-offset: 2px; }
.ad-mark {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 38px; height: 38px;
    border-radius: 9px;
    background: var(--ad-c1);
    color: var(--ad-c2);
    font: 700 15px/1 'Oswald', Arial, sans-serif;
    letter-spacing: .5px;
    box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .22);
}
.ad-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ad-name {
    font: 600 15px/1.1 'Oswald', Arial, sans-serif;
    letter-spacing: .5px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ad-tag {
    font: 400 11.5px/1.25 Arial, sans-serif;
    color: rgba(242, 240, 234, .72);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ad-go {
    flex: 0 0 auto;
    padding: 6px 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .1);
    font: 600 11px/1 'Oswald', Arial, sans-serif;
    letter-spacing: 1.5px;
    color: #fff;
}
.ad-card:hover .ad-go { background: var(--ad-c1); color: var(--ad-c2); }

/* placements */
.ad-victory { margin-top: 8px; }
.ad-lobby { width: min(100%, 420px); }
.ad-page { width: min(100% - 32px, 520px); margin: 28px auto 8px; --ad-h: 60px; }
.ad-page .ad-label { color: #888; }

/* ring sponsor's name next to flowky.ai */
.ring-sponsor a { color: var(--gold-dim, rgba(240, 192, 64, .5)); text-decoration: none; }
.ring-sponsor a:hover { color: var(--gold, #f0c040); }
.vic-ring-sponsor { font-size: 10px; letter-spacing: 3px; color: rgba(255, 255, 255, .45); margin-left: 6px; }

/* phones: short landscape screens keep the menu buttons first */
@media (max-height: 500px) and (orientation: landscape) {
    .ad { --ad-h: 44px; margin-top: 6px; }
    .ad-label { display: none; }
    .ad-mark { width: 30px; height: 30px; font-size: 12px; }
    .ad-tag { -webkit-line-clamp: 1; }
}
@media (max-height: 350px) {
    .menu-ad, .vic-ad { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .ad-slot, .ad-card { transition: none; }
}

/* The victory screen is faded out, not removed, during a fight: its project card must not take touches then
   (v126: it sat invisible over the portrait punch controls). */
#victory:not(.v) .vic-ad, #victory:not(.v) .vic-ad * { pointer-events: none !important; visibility: hidden; }
