/**
 * Frontend Styles for News Live TV Plugin
 */

/* Live TV Player Container */
.nltv-player-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    background: transparent;
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
}

/* Video Container with size controls */
.nltv-video-container {
    position: relative;
    background: transparent;
    width: 100% !important;
    max-width: 100% !important;
}

.nltv-player-inner {
    position: relative;
    width: 100%;
}

.nltv-player-wrapper {
    position: relative;
    width: 100%;
    background: transparent;
}

/* Responsive video wrapper for YouTube/Facebook (16:9 aspect ratio) */
.nltv-responsive-video {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    background: transparent;
}

.nltv-responsive-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Hide YouTube branding and logo - Global styles */
.nltv-custom-player .ytp-watermark,
.nltv-custom-player .ytp-chrome-top,
.nltv-custom-player .ytp-show-cards-title,
.nltv-custom-player .ytp-title,
.nltv-custom-player .ytp-title-text,
.nltv-custom-player .ytp-title-link,
.nltv-custom-player .ytp-youtube-button,
.nltv-custom-player .ytp-pause-overlay,
.nltv-custom-player a[class*="ytp"],
.nltv-custom-player div[class*="ytp-watermark"],
.nltv-custom-player .ytp-impression-link {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* Cover YouTube logo area */
.nltv-logo-cover {
    position: absolute !important;
    bottom: 0 !important;
    right: 0 !important;
    width: 90px !important;
    height: 60px !important;
    background: linear-gradient(to top right, rgba(0,0,0,0.3) 0%, transparent 50%) !important;
    z-index: 999 !important;
    pointer-events: none !important;
}

/* Additional overlay to hide YouTube logo */
.nltv-responsive-video::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 100px;
    height: 70px;
    background: transparent;
    z-index: 998;
    pointer-events: none;
}

/* Force hide on hover */
.nltv-video-container:hover .ytp-watermark,
.nltv-video-container:hover .ytp-youtube-button,
.nltv-video-container:hover .ytp-title {
    display: none !important;
    opacity: 0 !important;
}

.nltv-player-wrapper video {
    display: block;
    width: 100%;
    background: transparent;
}

/* Live Badge */
.nltv-live-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(220, 53, 69, 0.95);
    color: #fff;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.nltv-pulse {
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    animation: nltv-pulse-animation 2s infinite;
}

@keyframes nltv-pulse-animation {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

.nltv-live-text {
    font-weight: 700;
}

/* Offline Overlay */
.nltv-offline-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
}

.nltv-offline-content {
    text-align: center;
    color: #fff;
    padding: 40px 20px;
}

.nltv-offline-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    opacity: 0.8;
}

.nltv-offline-content h3 {
    font-size: 28px;
    margin: 0 0 10px 0;
    font-weight: 600;
}

.nltv-offline-content p {
    font-size: 16px;
    margin: 0;
    opacity: 0.9;
}

/* Inactive Message */
.nltv-inactive-message {
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 60px 20px;
    text-align: center;
}

.nltv-inactive-message p {
    font-size: 18px;
    color: #6c757d;
    margin: 0;
}

/* Live TV Button */
.nltv-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nltv-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    text-decoration: none;
}

.nltv-button-icon {
    width: 20px;
    height: 20px;
}

.nltv-button-text {
    font-weight: 700;
}

.nltv-button-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    background: currentColor;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: nltv-button-pulse-animation 2s infinite;
    opacity: 0.3;
}

@keyframes nltv-button-pulse-animation {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.3;
    }
    50% {
        transform: translate(-50%, -50%) scale(3);
        opacity: 0;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.3;
    }
}

.nltv-live-indicator {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
}

.nltv-button-active {
    animation: nltv-button-glow 2s infinite;
}

@keyframes nltv-button-glow {
    0%, 100% {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    }
    50% {
        box-shadow: 0 2px 20px rgba(220, 53, 69, 0.4);
    }
}

/* Embed Wrapper */
.nltv-embed-wrapper {
    position: relative;
    width: 100%;
}

.nltv-embed-wrapper > * {
    max-width: 100%;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nltv-player-container {
        border-radius: 0;
    }
    
    .nltv-live-badge {
        top: 10px;
        left: 10px;
        padding: 4px 8px;
        font-size: 10px;
    }
    
    .nltv-pulse {
        width: 6px;
        height: 6px;
    }
    
    .nltv-offline-content h3 {
        font-size: 22px;
    }
    
    .nltv-offline-content p {
        font-size: 14px;
    }
    
    .nltv-offline-icon {
        width: 60px;
        height: 60px;
    }
    
    .nltv-button {
        padding: 10px 18px;
        font-size: 14px;
    }
    
    .nltv-button-icon {
        width: 16px;
        height: 16px;
    }
}

/* Utility Classes */
.nltv-mb-20 {
    margin-bottom: 20px;
}

.nltv-text-center {
    text-align: center;
}

.nltv-mt-30 {
    margin-top: 30px;
}
