/**
 * Synergy Reels Player Styles
 * Instagram/TikTok-style vertical scrolling video player
 * 
 * @package CornerStripeBaseball
 * @version 1.0.0
 */

/* H22: Explicit heights to ensure proper scroll-snap behavior */
/* Reels Player Container */
.synergy-reels-player {
    position: relative;
    width: 100%;
    max-width: 900px;
    height: 600px;
    margin: 0 auto;
    padding: 0;
    background: #000;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

/* Reels Scroll Container */
.synergy-reels-container {
    position: relative;
    width: 100%;
    height: 600px;
    margin: 0;
    padding: 0;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scroll-padding-top: 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
}

.synergy-reels-container::-webkit-scrollbar {
    display: none; /* Chrome, Safari */
}

/* Individual Reel Item */
.synergy-reel-item {
    position: relative;
    width: 100%;
    height: 600px;
    min-height: 600px;
    margin: 0;
    padding: 0;
    flex-shrink: 0;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    overflow: hidden;
}

.synergy-reel-video {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain;
    background: #000;
    transform: scale(1.5);
}

/* Reel Overlay */
.synergy-reel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,0.3) 0%,
        transparent 20%,
        transparent 80%,
        rgba(0,0,0,0.5) 100%
    );
}

/* Reel Info (bottom left) */
.synergy-reel-info {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 90px;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
    pointer-events: auto;
}

.synergy-reel-player {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 8px 0;
    line-height: 1.2;
}

.synergy-reel-stats {
    font-size: 15px;
    font-weight: 500;
    margin: 0 0 6px 0;
    opacity: 0.95;
}

.synergy-reel-game {
    font-size: 13px;
    margin: 0;
    opacity: 0.85;
}

/* Reel Actions (right side) */
.synergy-reel-actions {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 20px;
    pointer-events: auto;
}

.synergy-reel-action {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    border: none;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.synergy-reel-action:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: scale(1.1);
}

.synergy-reel-action:active {
    transform: scale(0.95);
}

.synergy-reel-action i {
    font-size: 22px;
}

.synergy-reel-count {
    font-size: 11px;
    font-weight: 600;
    margin-top: 2px;
}

.synergy-reel-like.liked i {
    color: #ff4458;
}

/* Progress Bar */
.synergy-reel-progress {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.2);
    pointer-events: none;
}

.synergy-reel-progress-bar {
    height: 100%;
    width: 0;
    background: #fff;
    transition: width 0.1s linear;
}

/* Navigation Arrows */
.synergy-reels-navigation {
    position: absolute;
    right: 50%;
    top: 50%;
    transform: translate(50%, -50%);
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 10;
    pointer-events: none;
}

.synergy-reels-nav {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    pointer-events: auto;
    opacity: 0;
}

.synergy-reels-player:hover .synergy-reels-nav {
    opacity: 1;
}

.synergy-reels-nav:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.1);
}

.synergy-reels-nav:active {
    transform: scale(0.95);
}

.synergy-reels-nav i {
    font-size: 18px;
}

/* Loading Indicator */
.synergy-reels-loading {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: none;
    z-index: 100;
}

.synergy-reels-loading .synergy-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: synergy-spin 0.8s linear infinite;
}

@keyframes synergy-spin {
    to { transform: rotate(360deg); }
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .synergy-reels-player {
        max-width: 100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .synergy-reels-container {
        height: 100vh;
        display: block;
    }
    
    .synergy-reel-item {
        height: 100vh;
        min-height: 100vh;
    }
    
    .synergy-reel-item:first-child {
        margin-top: -122px;
    }
    
    .synergy-reel-actions {
        right: 12px;
        top: 50%;
        transform: translateY(-50%);
        gap: 16px;
    }
    
    .synergy-reel-action {
        width: 46px;
        height: 46px;
    }
    
    .synergy-reel-action i {
        font-size: 20px;
    }
    
    .synergy-reels-navigation {
        display: none; /* Hide arrows on mobile, use swipe */
    }
}

@media (max-width: 480px) {
    .synergy-reel-info {
        bottom: 16px;
        left: 16px;
        right: 70px;
    }
    
    .synergy-reel-player {
        font-size: 18px;
    }
    
    .synergy-reel-stats {
        font-size: 14px;
    }
    
    .synergy-reel-game {
        font-size: 12px;
    }
    
    .synergy-reel-actions {
        right: 10px;
        top: 50%;
        transform: translateY(-50%);
        gap: 14px;
    }
    
    .synergy-reel-action {
        width: 42px;
        height: 42px;
    }
    
    .synergy-reel-action i {
        font-size: 18px;
    }
}

/* Fullscreen Mode */
.synergy-reels-player.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100vh;
    max-width: 100%;
    max-height: 100vh;
    border-radius: 0;
    z-index: 99999;
}

/* Camera Angle Modal */
.synergy-camera-modal {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(20px);
    border-radius: 12px;
    padding: 16px;
    display: none;
    z-index: 200;
    pointer-events: auto;
}

.synergy-camera-modal.active {
    display: block;
}

.synergy-camera-options {
    display: flex;
    gap: 8px;
}

.synergy-camera-option {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.synergy-camera-option:hover {
    background: rgba(255, 255, 255, 0.2);
}

.synergy-camera-option.active {
    background: #1e90ff;
    border-color: #1e90ff;
}

/* Share Modal */
.synergy-share-modal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 24px;
    display: none;
    z-index: 200;
    max-width: 90%;
    pointer-events: auto;
}

.synergy-share-modal.active {
    display: block;
}

.synergy-share-options {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 16px;
}

.synergy-share-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    color: #fff;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.synergy-share-option:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.synergy-share-option i {
    font-size: 24px;
}

.synergy-share-option span {
    font-size: 12px;
}

/* Accessibility */
.synergy-reel-item:focus {
    outline: 2px solid #1e90ff;
    outline-offset: -2px;
}

.synergy-reel-action:focus,
.synergy-reels-nav:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* Animations */
@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.synergy-reel-info {
    animation: fade-in 0.5s ease-out;
}

.synergy-reel-actions {
    animation: fade-in 0.5s ease-out 0.2s backwards;
}
