/* Short-video reel section. All classes are prefixed to avoid clashing with style.css */

#reels { text-align: center; }

.reels-frame {
    position: relative;
    width: min(360px, 100%);
    height: min(640px, 80vh);
    margin: 1.5rem auto 1rem;
    border-radius: 20px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.reels-feed {
    height: 100%;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.reels-feed::-webkit-scrollbar { display: none; }
.reels-feed:focus-visible { outline: 3px solid #fff; outline-offset: -3px; }

.reel {
    position: relative;
    height: 100%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    background: #000;
}

.reel video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    cursor: pointer;
}

.reel-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 2.5rem 1rem 1rem;
    text-align: left;
    color: #fff;
    pointer-events: none;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.75), transparent);
}
.reel-caption strong { display: block; font-size: 1.1rem; }
.reel-caption span { font-size: 0.9rem; opacity: 0.9; }

/* Paused indicator */
.reel.is-paused::after {
    content: "\25B6";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.85);
    pointer-events: none;
}

.reels-sound,
.reels-nav button {
    border: none;
    cursor: pointer;
    color: #fff;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    line-height: 1;
}
.reels-sound {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.1rem;
    z-index: 2;
}
.reels-nav {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 2;
}
.reels-nav button {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 0.8rem;
}
.reels-sound:hover, .reels-nav button:hover { background: rgba(0, 0, 0, 0.8); }

/* Phones swipe, so the arrows aren't needed there */
@media (hover: none) and (pointer: coarse) {
    .reels-nav { display: none; }
}

.reels-more {
    display: inline-block;
    margin-top: 0.5rem;
    font-weight: 600;
    text-decoration: none;
}
.reels-more i { margin-right: 0.35rem; }

@media (prefers-reduced-motion: reduce) {
    .reels-feed { scroll-behavior: auto; }
}
