/* Shared card media and compact mobile pagination; loaded after the base theme. */
.video_item { min-width: 0; }
.video_item:not(.-tiktok-wrapper) .default_loading,
.video_item:not(.-tiktok-wrapper) .default_thumbnail,
.video_item:not(.-tiktok-wrapper) .video-splash,
.video_item:not(.-tiktok-wrapper) .video-splash-mov,
.video_item > div > .skeleton {
    display: block;
    width: 100%;
    height: auto;
    padding-top: 0;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}
.video_item:not(.-tiktok-wrapper) .video-splash {
    background-size: 400% 400%;
    background-position: 0 66.666667%;
}
.video_item:not(.-tiktok-wrapper) .video-splash:hover {
    animation: 1.6s steps(4) infinite ab-splash-x, 6.4s steps(4) infinite ab-splash-y !important;
}
@keyframes ab-splash-x { from { background-position-x: 0; } to { background-position-x: 133.333333%; } }
@keyframes ab-splash-y { from { background-position-y: 0; } to { background-position-y: 133.333333%; } }
.video_item.ab-static-thumbnail .video-splash {
    background-size: cover;
    background-position: center;
}
.video_item.ab-static-thumbnail .video-splash:hover { animation: none !important; }
.ab-pagination-arrow { display: none; }
@media (max-width: 991.98px) {
    .ab-pagination {
        flex-wrap: nowrap !important;
        align-items: center;
        justify-content: center;
        gap: 4px;
        max-width: 100%;
    }
    .ab-pagination > .page-item { flex: 0 0 auto; }
    .ab-pagination > .ab-pagination-number:not(.active) { display: none; }
    .ab-pagination .page-link {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 44px;
        min-height: 44px;
        margin: 0;
        padding: 8px 12px;
        white-space: nowrap;
    }
    .ab-pagination-label { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
    .ab-pagination-arrow { display: inline; font-size: 24px; line-height: 1; }
}

.ab-playback-notice { color: #b9bec5; background: #171b20; border: 1px solid #343a40; border-radius: 10px; padding: 12px 14px; font-size: 14px; line-height: 1.5; }

/* Collapse before desktop actions collide; keep the mobile action strip deliberate. */
.ab-navbar .container-lg { gap: 12px; }
.ab-navbar-header, .ab-navbar-tools, .ab-navbar-links { gap: 8px; }
.ab-navbar-header, .ab-navbar-tools { flex-shrink: 0; }
.ab-navbar-menu { flex-grow: 0; }
.ab-navbar-links { align-items: center; }
.ab-navbar .nav-btn, .ab-navbar .nav-item { margin: 0 !important; }
.ab-navbar .btn, .ab-navbar .navbar-toggler { min-width: 44px; min-height: 44px; white-space: nowrap; }
.ab-navbar .navbar-brand { margin: 0; }
/* Keep action labels/icons centered within equal touch targets, not baseline-aligned. */
.ab-navbar-links > .nav-btn > .btn,
.ab-navbar-tools > .btn,
.ab-navbar-tools > .navbar-toggler {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 44px;
    padding: 0 12px;
    margin: 0;
    line-height: 1;
    vertical-align: middle;
}
.ab-navbar-links > .nav-btn > .btn { width: auto !important; }
.ab-navbar-links > .nav-btn { flex: 0 0 auto; }
.ab-navbar .btn svg { flex-shrink: 0; display: block; }

@media (max-width: 991.98px) {
    .ab-navbar-header { width: 100%; min-width: 0; }
    .ab-navbar .navbar-brand { min-width: 0; max-width: calc(100% - 112px); }
    .ab-navbar .logo-img { display: block; max-width: 100%; object-fit: contain; }
    .ab-navbar-menu { flex-basis: 100%; width: 100%; }
    .ab-navbar-links { flex-direction: row; flex-wrap: wrap; padding: 8px 0; }
    .ab-navbar-links > .nav-btn { flex: 0 0 auto; min-width: 44px; }
    .ab-navbar-links { justify-content: flex-end; }

    .ab-navbar-links > .dropdown { position: static; }
    .ab-navbar-links .dropdown-menu { position: absolute; top: 100%; right: 12px; left: 12px; width: auto; min-width: 0; max-width: none; transform: none !important; }
}


/* Mobile uses the same ad nodes once, outside Livewire, after four video cards.
   CSS-only placement avoids moving/recreating third-party iframes on refresh. */
@media (max-width: 767.98px) {
    .ab-home-content {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
        gap: 18px;
    }
    .ab-home-feed,
    .ab-home-feed > section,
    .ab-home-video-grid { display: contents; }
    .ab-home-feed > .header { grid-column: 1 / -1; order: -1; margin: 0 !important; }
    .ab-home-video-grid > * { order: 2; min-width: 0; }
    .ab-home-video-grid > :nth-child(-n+4) { order: 0; }
    .ab-home-banners { grid-column: 1 / -1; order: 1; min-width: 0; }
    .ab-home-pagination { grid-column: 1 / -1; order: 3; }
}


.video_item.ab-sprite-thumbnail .video-splash,
.video_item.ab-static-thumbnail .video-splash { animation: none; }

.ab-sprite-thumbnail a:focus-visible .video-splash,
.ab-sprite-thumbnail a:active .video-splash {
    animation: 1.6s steps(4) infinite ab-splash-x, 6.4s steps(4) infinite ab-splash-y !important;
}
@media (prefers-reduced-motion: reduce) {
    .video_item.ab-sprite-thumbnail .video-splash,
    .video_item.ab-sprite-thumbnail .video-splash:hover,
    .video_item.ab-sprite-thumbnail a:focus-visible .video-splash,
    .video_item.ab-sprite-thumbnail a:active .video-splash { animation: none !important; }
}

@media (min-width: 992px) {
    .ab-navbar.navbar-expand-lg .navbar-toggler { display: none; }
}

/* Anchor durations to the card instead of offsetting an in-flow row past its edge. */
.video_item { position: relative; --ab-card-padding: 14px; padding: var(--ab-card-padding); }
.video_item > .duration,
.video_item > .duration-tiktok {
    position: absolute;
    top: calc(var(--ab-card-padding) + 8px);
    right: calc(var(--ab-card-padding) + 8px);
    left: auto;
    width: auto;
    padding: 0;
    z-index: 9;
    pointer-events: none;
}
.video_item > .duration > span,
.video_item > .duration-tiktok > span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 6px;
    border-radius: 5px;
    color: #fff;
    background: rgba(0, 0, 0, .7);
    font-size: 12px;
    line-height: 1.25;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.video_item > .duration > span > svg { flex: 0 0 14px; }

/* Dense listings: remove legacy 14px card padding and 290px width cap. */
.ab_grid { column-gap: 8px; row-gap: 14px; align-items: start; }
.ab_grid > .video_item,
.ab-home-video-grid > .video_item {
    --ab-card-padding: 0px;
    padding: 0;
    width: 100%;
    max-width: none;
    margin: 0;
    align-self: start;
}
.video_item .info { padding: 4px 2px 6px; }
.video_item .info p { margin: 2px 0 0; }
.video_item .info a { line-height: 1.3; }
@media (max-width: 767.98px) {
    .ab-home-content { column-gap: 8px; row-gap: 14px; align-items: start; }
}

/* An immediate, playful Discord hop; pause briefly between repeats. */
.hero .socials .discord {
    transform-origin: 50% 65%;
    animation: ab-discord-hello 3s linear infinite;
}
@keyframes ab-discord-hello {
    0%, 22%, 100% { transform: translateY(0) rotate(0) scale(1); }
    3% { transform: translateY(-3px) rotate(-12deg) scale(1.05); }
    6% { transform: translateY(-10px) rotate(18deg) scale(1.12); }
    9% { transform: translateY(-8px) rotate(-18deg) scale(1.12); }
    12% { transform: translateY(-9px) rotate(14deg) scale(1.1); }
    15% { transform: translateY(-3px) rotate(-10deg) scale(1.04); }
    18% { transform: translateY(-5px) rotate(6deg) scale(1.06); }
}
.hero .socials .discord:hover,
.hero .socials .discord:focus-visible { animation: none; }
@media (prefers-reduced-motion: reduce) {
    .hero .socials .discord { animation: none; }
}
