/**
 * Fullscreen Player Styles (YouTube Shorts Style)
 */

.tbvw-fullscreen-player {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: #000;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.tbvw-fullscreen-player.active {
    display: flex;
}

/* Video container */
.tbvw-fs-video-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.tbvw-fs-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* For vertical videos */
@media (orientation: portrait), (max-width: 768px) {
    .tbvw-fs-video {
        object-fit: cover;
    }
}

/* Close button - Top Left */
.tbvw-fs-close {
    position: absolute !important;
    top: 20px !important;
    left: 20px !important;
    background: #ffffff !important;
    border: none !important;
    border-radius: 12px !important;
    width: 50px !important;
    height: 50px !important;
    color: #333 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 26px !important;
    z-index: 999999 !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4) !important;
    opacity: 1 !important;
    visibility: visible !important;
    padding: 0 !important;
    line-height: 1 !important;
}

.tbvw-fs-close:hover {
    background: #f5f5f5 !important;
    transform: scale(1.1) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5) !important;
}

.tbvw-fs-close .dashicons,
.tbvw-fs-close .dashicons-before:before {
    line-height: 1 !important;
    font-size: 28px !important;
    width: 28px !important;
    height: 28px !important;
    display: inline-block !important;
    color: #333 !important;
    vertical-align: middle !important;
}

/* Mute/Unmute button - Top Right */
.tbvw-fs-mute {
    position: absolute !important;
    top: 20px !important;
    right: 20px !important;
    background: #ffffff !important;
    border: none !important;
    border-radius: 12px !important;
    width: 50px !important;
    height: 50px !important;
    color: #333 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 24px !important;
    z-index: 999999 !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4) !important;
    opacity: 1 !important;
    visibility: visible !important;
    padding: 0 !important;
    line-height: 1 !important;
}

.tbvw-fs-mute:hover {
    background: #f5f5f5 !important;
    transform: scale(1.1) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5) !important;
}

.tbvw-fs-mute .dashicons,
.tbvw-fs-mute .dashicons-before:before {
    line-height: 1 !important;
    font-size: 26px !important;
    width: 26px !important;
    height: 26px !important;
    display: inline-block !important;
    color: #333 !important;
    vertical-align: middle !important;
}

/* Video info overlay (bottom) */
.tbvw-fs-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 80px 20px 20px 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.7) 50%, transparent 100%);
    color: #fff;
    z-index: 5;
    transition: opacity 0.3s ease;
}

.tbvw-fullscreen-player.controls-hidden .tbvw-fs-info {
    opacity: 0;
}

.tbvw-fs-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 8px 0;
}

.tbvw-fs-description {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    margin: 0 0 15px 0;
    line-height: 1.4;
}

/* Progress bar */
.tbvw-fs-progress {
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 15px;
}

.tbvw-fs-progress-bar {
    height: 100%;
    background: #0073aa;
    width: 0%;
    transition: width 0.3s ease;
}

/* Product links */
.tbvw-fs-products {
    display: flex !important;
    gap: 10px !important;
    flex-wrap: wrap !important;
    margin-bottom: 15px !important;
}

.tbvw-fs-product-link {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px) !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 12px 20px !important;
    color: #333 !important;
    text-decoration: none !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
    line-height: 1.2 !important;
}

.tbvw-fs-product-link:hover {
    background: rgba(255, 255, 255, 1) !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4) !important;
}

.tbvw-fs-product-link::before {
    content: '🛒';
    font-size: 18px;
}

/* CTA Button */
.tbvw-fs-cta {
    display: inline-block !important;
    padding: 14px 28px !important;
    border-radius: 10px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    border: none !important;
    cursor: pointer !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
    line-height: 1.2 !important;
}

.tbvw-fs-cta.primary {
    background: #0073aa !important;
    color: #fff !important;
}

.tbvw-fs-cta.primary:hover {
    background: #005a87 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4) !important;
}

.tbvw-fs-cta.secondary {
    background: #666 !important;
    color: #fff !important;
}

.tbvw-fs-cta.secondary:hover {
    background: #555 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4) !important;
}

.tbvw-fs-cta.success {
    background: #46b450 !important;
    color: #fff !important;
}

.tbvw-fs-cta.success:hover {
    background: #3a9642 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4) !important;
}

.tbvw-fs-cta.danger {
    background: #dc3232 !important;
    color: #fff !important;
}

.tbvw-fs-cta.danger:hover {
    background: #c02424 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4) !important;
}

/* Play/Pause overlay */
.tbvw-fs-play-pause {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 40px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.tbvw-fullscreen-player.show-play-pause .tbvw-fs-play-pause {
    opacity: 1;
}

/* Swipe indicators */
.tbvw-fs-swipe-indicator {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 20;
    pointer-events: none;
}

.tbvw-fs-swipe-indicator.top {
    top: 100px;
}

.tbvw-fs-swipe-indicator.bottom {
    bottom: 150px;
}

.tbvw-fs-swipe-indicator.visible {
    opacity: 1;
}

/* Navigation hints (arrows) */
.tbvw-fs-nav-hint {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.5);
    font-size: 48px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tbvw-fs-nav-hint.prev {
    top: 20%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.tbvw-fs-nav-hint.next {
    bottom: 20%;
    top: auto;
    left: 50%;
    transform: translate(-50%, 50%);
}

.tbvw-fullscreen-player:hover .tbvw-fs-nav-hint {
    opacity: 0.7;
}

/* Loading state */
.tbvw-fullscreen-player.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: tbvw-fs-spin 0.8s linear infinite;
    z-index: 100;
}

@keyframes tbvw-fs-spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Video counter - Top Center */
.tbvw-fs-counter {
    position: absolute !important;
    top: 25px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    background: #ffffff !important;
    border: none !important;
    color: #333 !important;
    padding: 10px 20px !important;
    border-radius: 20px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    z-index: 999999 !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4) !important;
    opacity: 1 !important;
    visibility: visible !important;
    line-height: 1.2 !important;
}

/* Animations */
@keyframes tbvw-slide-up {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes tbvw-slide-down {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.tbvw-fs-video-container.slide-up {
    animation: tbvw-slide-up 0.4s ease forwards;
}

.tbvw-fs-video-container.slide-down {
    animation: tbvw-slide-down 0.4s ease forwards;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .tbvw-fs-close,
    .tbvw-fs-mute {
        width: 48px;
        height: 48px;
        top: 15px;
        border-radius: 10px;
    }
    
    .tbvw-fs-close {
        left: 15px;
    }
    
    .tbvw-fs-mute {
        right: 15px;
    }
    
    .tbvw-fs-counter {
        font-size: 14px;
        padding: 8px 16px;
        top: 20px;
    }
    
    .tbvw-fs-title {
        font-size: 16px;
    }
    
    .tbvw-fs-description {
        font-size: 13px;
    }
    
    .tbvw-fs-product-link {
        font-size: 13px;
        padding: 10px 16px;
    }
    
    .tbvw-fs-cta {
        width: 100%;
        text-align: center;
        padding: 12px 24px;
    }
}

/* Landscape mobile */
@media (orientation: landscape) and (max-height: 500px) {
    .tbvw-fs-info {
        padding: 40px 20px 10px 20px;
    }
    
    .tbvw-fs-title {
        font-size: 14px;
        margin-bottom: 4px;
    }
    
    .tbvw-fs-description {
        font-size: 12px;
        margin-bottom: 8px;
    }
}

