.banner-carousel { width: 100%; min-width: 0; margin-block: 1.5em; padding: var(--bc-mobile-padding-y, 0px) var(--bc-mobile-padding-x, 0px); background: transparent; }
.banner-carousel, .banner-carousel * { box-sizing: border-box; }
/* Match the heading size and 2rem content gap of most-visited-tags. */
.banner-carousel .banner-carousel__heading { margin: 0 0 2rem; padding: 0; font: inherit; font-size: var(--font-size-articles-head, 2rem); font-weight: 700; line-height: normal; color: var(--color-font, inherit); }
.banner-carousel__body { position: relative; }
.banner-carousel .banner-carousel__track { display: grid; grid-auto-flow: column; grid-auto-columns: min(var(--bc-width, 340px), 85%); gap: var(--bc-gap, 20px); overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: thin; padding: 0 0 10px; margin: 0; }
.banner-carousel .banner-carousel__card { display: block; position: relative; min-width: 0; aspect-ratio: var(--bc-ratio, 340 / 425); padding: 0; margin: 0; border: 1px solid #ffffff26; border-radius: var(--bc-radius, 20px); overflow: hidden; isolation: isolate; background: #202020; color: #fff; text-decoration: none; scroll-snap-align: start; scroll-margin-inline: 0; }
.banner-carousel .banner-carousel__hero, .banner-carousel .banner-carousel__video { position: absolute; inset: 0; display: block; width: 100%; height: 100%; max-width: none; margin: 0; padding: 0; border: 0; border-radius: 0; object-fit: cover; object-position: var(--bc-position, 50% 50%); }
.banner-carousel .banner-carousel__video { opacity: 0; pointer-events: none; transition: opacity .25s ease; }
.banner-carousel .banner-carousel__card.is-previewing .banner-carousel__video { opacity: 1; }
.banner-carousel__shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to bottom, transparent 35%, rgb(0 0 0 / calc(var(--bc-shade, .75) * .45)) 65%, rgb(0 0 0 / var(--bc-shade, .75)) 100%); }
.banner-carousel .banner-carousel__content { position: absolute; inset: auto 24px 26px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; max-height: 75%; overflow-y: auto; scrollbar-width: thin; color: #fff; text-align: left; overflow-wrap: anywhere; }
.banner-carousel .banner-carousel__label { display: block; max-width: 100%; width: fit-content; padding: 4px 9px; border-radius: 8px; background: #19191980; color: #fff; font: inherit; font-size: .85rem; font-weight: 700; line-height: 1.3; }
.banner-carousel .banner-carousel__logo { display: block; position: static; flex-shrink: 0; width: var(--bc-logo-width, 50%); max-width: 100%; height: auto; max-height: none; object-fit: contain; object-position: left bottom; padding: 0; margin: 0; border: 0; border-radius: 0; background: transparent; }
.banner-carousel .banner-carousel__logo--white { filter: brightness(0) invert(1); }
.banner-carousel .banner-carousel__title { font: inherit; font-size: clamp(1.3rem, 3vw, 1.9rem); font-weight: 800; line-height: 1.1; color: #fff; }
.banner-carousel .banner-carousel__text { font: inherit; font-size: 1rem; line-height: 1.4; color: #fff; white-space: pre-wrap; text-shadow: 0 1px 6px #0008; }
.banner-carousel .banner-carousel__arrow { position: absolute; top: calc(50% - 5px); transform: translateY(-50%); z-index: 2; display: grid; place-items: center; width: 32px; height: 32px; padding: 0; margin: 0; border: 1px solid currentColor; border-radius: 50%; background: transparent; color: #fff; font: inherit; cursor: pointer; }
.banner-carousel .banner-carousel__arrow--prev { left: 12px; }
.banner-carousel .banner-carousel__arrow--next { right: 12px; }
.banner-carousel .banner-carousel__arrow::before { content: ''; position: absolute; top: 10px; left: 9px; width: 8px; height: 8px; border-top: 2px solid currentColor; border-right: 2px solid currentColor; transform: rotate(45deg); }
.banner-carousel .banner-carousel__arrow--prev::before { left: 12px; transform: rotate(-135deg); }
.banner-carousel .banner-carousel__arrow::after { content: ''; position: absolute; inset: -6px; border-radius: 50%; }
.banner-carousel .banner-carousel__arrow:not(:disabled):hover { background: rgb(255 255 255 / .12); }
.banner-carousel .banner-carousel__arrow[hidden] { display: none; }
.banner-carousel .banner-carousel__arrow:disabled { opacity: .3; cursor: default; }
.banner-carousel .banner-carousel__card:focus-visible, .banner-carousel .banner-carousel__track:focus-visible { outline: 3px solid #78bfff; outline-offset: -4px; }
.banner-carousel .banner-carousel__arrow:focus-visible { outline: 3px solid #78bfff; outline-offset: 2px; }
@media (max-width: 480px) {
    .banner-carousel .banner-carousel__content { inset-inline: 18px; bottom: 20px; gap: 8px; }
}
/* Same breakpoint as the theme's mobile/desktop visibility classes. */
@media (min-width: 768px) {
    .banner-carousel { padding: var(--bc-padding-y, 0px) var(--bc-padding-x, 0px); }
}
@media (prefers-reduced-motion: reduce) { .banner-carousel .banner-carousel__video { transition: none; } }

/* Keep article link styles from recolouring or underlining the entire banner. */
.banner-carousel .banner-carousel__track .banner-carousel__card,
.banner-carousel .banner-carousel__track .banner-carousel__card:hover,
.banner-carousel .banner-carousel__track .banner-carousel__card:hover > * { color: #fff; text-decoration: none; }
