/* NextBall - "What's new" modal (whatsnew.js) */
.wn-overlay {
    position: fixed; inset: 0; z-index: 10040;
    display: flex; align-items: center; justify-content: center; padding: 16px;
    background: rgba(5, 7, 10, .78);
    opacity: 0; transition: opacity 180ms ease;
}
.wn-overlay[hidden] { display: none; }
.wn-overlay.is-in { opacity: 1; }
body.wn-open { overflow: hidden; }

.wn-dialog {
    position: relative; display: flex; flex-direction: column;
    width: min(760px, 100%); max-height: calc(100dvh - 32px);
    background: var(--bg-1, #15181D); border: 1px solid var(--line-strong, rgba(255,255,255,.14)); border-radius: var(--r-lg, 6px);
    box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .9);
    color: var(--fg-0, #fff); font: 500 15px/1.5 var(--f-body, 'Exo 2', system-ui, sans-serif);
    transform: translateY(10px) scale(.985); transition: transform 220ms cubic-bezier(.2, .8, .2, 1);
    overflow: hidden;
}
.wn-overlay.is-in .wn-dialog { transform: none; }

.wn-head { display: flex; align-items: baseline; gap: 12px; padding: 16px 20px 12px; flex: none; }
.wn-heading { margin: 0; font: 800 22px/1 var(--f-display, 'Chakra Petch', sans-serif); letter-spacing: .06em; text-transform: uppercase; }
.wn-date { color: var(--fg-3, #666D79); font: 600 12px/1 var(--f-body); letter-spacing: .08em; text-transform: uppercase; }
.wn-close {
    margin-left: auto; align-self: center; display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border: 0; border-radius: var(--r, 4px); background: transparent; color: var(--fg-2, #9BA1AC); cursor: pointer;
}
.wn-close:hover { background: var(--bg-3, #242932); color: var(--fg-0, #fff); }

.wn-viewport { overflow: hidden; flex: 1 1 auto; min-height: 0; touch-action: pan-y; }
.wn-track { display: flex; height: 100%; transition: transform 320ms cubic-bezier(.2, .8, .2, 1); }
.wn-slide { flex: 0 0 100%; min-width: 0; overflow-y: auto; }

.wn-media { position: relative; margin: 0 20px; aspect-ratio: 16 / 9; border-radius: var(--r, 4px); overflow: hidden; background: var(--bg-0, #0F1115); border: 1px solid var(--line, rgba(255,255,255,.07)); }
.wn-media img, .wn-media svg, .wn-media .wn-video { display: block; width: 100%; height: 100%; object-fit: cover; user-select: none; -webkit-user-drag: none; }

.wn-body { padding: 16px 20px 8px; }
.wn-kicker { display: inline-block; color: var(--orange, #FF6A13); font: 700 12px/1 var(--f-display); letter-spacing: .14em; text-transform: uppercase; }
.wn-title { margin: 8px 0 6px; font: 800 26px/1.1 var(--f-display); letter-spacing: .02em; text-transform: uppercase; }
.wn-text { margin: 0; color: var(--fg-1, #DDE0E6); max-width: 62ch; }
.wn-points { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; color: var(--fg-2, #9BA1AC); font-size: 14px; }
.wn-points li { position: relative; padding-left: 16px; }
.wn-points li::before { content: ''; position: absolute; left: 0; top: .6em; width: 6px; height: 6px; background: var(--orange, #FF6A13); transform: rotate(45deg); }
.wn-points b, .wn-text b { color: var(--fg-0, #fff); font-weight: 700; }
.wn-dialog kbd {
    display: inline-block; min-width: 1.6em; padding: 0 .4em; border-radius: 3px; text-align: center;
    background: var(--bg-3, #242932); border: 1px solid var(--line-strong); border-bottom-width: 2px;
    color: var(--fg-0); font: 700 .85em/1.5 var(--f-display);
}

.wn-foot { display: flex; align-items: center; gap: 12px; padding: 12px 20px 16px; flex: none; border-top: 1px solid var(--line, rgba(255,255,255,.07)); }
.wn-nav {
    flex: none; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
    border: 1px solid var(--line-strong); border-radius: var(--r, 4px); background: transparent; color: var(--fg-1); cursor: pointer;
}
.wn-nav:hover:not(:disabled) { background: var(--bg-3); color: var(--fg-0); }
.wn-nav:disabled { opacity: .3; cursor: default; }
.wn-dots { display: flex; gap: 2px; flex: 0 1 auto; min-width: 0; overflow: hidden; }
/* many slides: the dots shrink (never the buttons) */
.wn-dot { flex: 0 1 22px; min-width: 9px; height: 24px; padding: 0; border: 0; background: transparent; cursor: pointer; position: relative; }
.wn-dot::before { content: ''; position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: var(--bg-4, #2F3641); transition: width 200ms, margin 200ms, background 200ms; }
.wn-dot:hover::before { background: var(--fg-3); }
.wn-dot.is-on { flex: 0 0 26px; }
.wn-dot.is-on::before { width: 20px; margin-left: -10px; border-radius: 4px; background: var(--orange, #FF6A13); }
.wn-all { margin-left: auto; flex: none; white-space: nowrap; color: var(--fg-2); font: 600 13px/1 var(--f-body); text-decoration: none; }
.wn-all:hover { color: var(--fg-0); text-decoration: underline; }
.wn-next {
    flex: none; height: 40px; min-width: 120px; padding: 0 20px; border: 0; border-radius: var(--r, 4px); cursor: pointer;
    background: var(--orange, #FF6A13); color: var(--orange-ink, #1A0900);
    font: 800 15px/1 var(--f-display); letter-spacing: .08em; text-transform: uppercase;
}
.wn-next:hover { background: var(--orange-hi, #FF8A45); }
.wn-dialog :focus-visible { outline: 2px solid var(--orange, #FF6A13); outline-offset: 2px; }

/* Lob illustration */
.wn-lob .wn-p circle { stroke: #fff; stroke-width: 2.5; }
.wn-lob .wn-p--red circle { fill: #E0322E; }
.wn-lob .wn-p--blue circle { fill: #2E7BE0; }
.wn-lob .wn-p text { fill: #fff; font: 700 14px 'Chakra Petch', sans-serif; text-anchor: middle; }
.wn-lob .wn-key rect { fill: #15181D; stroke: rgba(255,255,255,.5); stroke-width: 2; }
.wn-lob .wn-key text { fill: #fff; font: 800 24px 'Chakra Petch', sans-serif; text-anchor: middle; }
.wn-lob .wn-lob-note { fill: #fff; font: 700 17px 'Exo 2', sans-serif; paint-order: stroke; stroke: rgba(0,0,0,.45); stroke-width: 4px; }

/* Hosted rooms illustration */
.wn-host .wn-host-p circle { stroke: #fff; stroke-width: 2.5; }
.wn-host .wn-host-p text { fill: #DDE0E6; font: 700 15px 'Exo 2', sans-serif; text-anchor: middle; }
.wn-host .wn-host-label { fill: #FF6A13; font: 800 18px 'Chakra Petch', sans-serif; letter-spacing: .14em; text-anchor: middle; }
.wn-host .wn-host-links path { animation: wn-dash 1.2s linear infinite; }
@keyframes wn-dash { to { stroke-dashoffset: -28; } }
@media (prefers-reduced-motion: reduce) { .wn-host .wn-host-links path { animation: none; } }

@media (max-width: 560px) {
    .wn-overlay { padding: 0; align-items: stretch; }
    .wn-dialog { width: 100%; max-height: 100dvh; border-radius: 0; border: 0; }
    .wn-head { padding: 14px 16px 10px; }
    .wn-media { margin: 0 16px; }
    .wn-body { padding: 14px 16px 8px; }
    .wn-title { font-size: 22px; }
    .wn-foot { padding: 10px 16px 14px; gap: 8px; }
    .wn-nav--prev, .wn-all { display: none; }
    .wn-dots { margin-right: auto; }
    .wn-next { min-width: 0; flex: 0 0 auto; }
}
@media (max-height: 640px) and (min-width: 561px) {
    .wn-media { margin: 0 auto; width: min(100% - 40px, 60vh * 16 / 9); }
}
@media (prefers-reduced-motion: reduce) {
    .wn-track, .wn-dialog, .wn-overlay { transition: none; }
}

/* Header button (index.html #btn-whatsnew): dot until the release has been seen */
.btn-whatsnew { position: relative; }
.btn-whatsnew.has-new::after {
    content: ''; position: absolute; top: 7px; right: 5px; width: 7px; height: 7px; border-radius: 50%;
    background: var(--orange, #FF6A13); box-shadow: 0 0 0 2px var(--bg-0, #0F1115);
}
@media (max-width: 700px) {
    /* phones: header links wrap instead of running off the screen */
    .header-buttons { flex-wrap: wrap; row-gap: 0; }
}

/* "Five new sports" slide: a mosaic of real in-game captures */
.wn-media--svg .wn-sports { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(6, 1fr); grid-template-rows: 1fr 1fr; gap: 3px; background: #07090D; }
.wn-sport { position: relative; margin: 0; overflow: hidden; grid-column: span 2; }
.wn-sport--icehockey, .wn-sport--minigolf { grid-column: span 3; }
.wn-sport img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wn-sport figcaption { position: absolute; left: 8px; bottom: 7px; padding: 3px 8px; border-radius: 2px; background: rgba(4, 5, 13, .78); color: #fff; font: italic 800 13px/1 var(--f-display, 'Barlow Condensed', Arial, sans-serif); letter-spacing: .05em; text-transform: uppercase; }

.wn-catch .wn-catch-big { font: 800 34px 'Chakra Petch', sans-serif; text-anchor: middle; letter-spacing: .06em; paint-order: stroke; stroke: rgba(0,0,0,.55); stroke-width: 6px; }
.wn-catch .wn-catch-a { fill: #FFB020; }
.wn-catch .wn-catch-b { fill: #fff; }
