/* ไฟล์: css/live_stream_notification.css */
/* CSS สำหรับ Live Stream Notification Popup */

.live-stream-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease-out;
    font-family: 'Kanit', sans-serif;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(5px);
    }
}

.live-stream-content {
    position: relative;
    width: 90vw;
    height: 90vh;
    max-width: 1200px;
    max-height: 800px;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
    animation: slideIn 0.4s ease-out;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

@keyframes slideIn {
    from {
        transform: scale(0.9) translateY(20px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.live-stream-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    color: white;
    cursor: pointer;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.live-stream-close:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.1) rotate(90deg);
}

.live-stream-close:active {
    transform: scale(0.95) rotate(90deg);
}

.live-stream-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(
        to bottom, 
        rgba(0,0,0,0.8) 0%, 
        rgba(0,0,0,0.6) 50%, 
        transparent 100%
    );
    padding: 20px 80px 40px 20px;
    z-index: 10000;
}

.live-stream-header h2 {
    color: white;
    font-family: 'Kanit', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    animation: titleGlow 2s ease-in-out infinite alternate;
}

@keyframes titleGlow {
    from {
        text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    }
    to {
        text-shadow: 0 2px 4px rgba(0,0,0,0.5), 0 0 20px rgba(255,255,255,0.3);
    }
}

.live-stream-video {
    width: 100%;
    height: 100%;
    position: relative;
}

.live-stream-video iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: #000;
}

/* Loading state */
.live-stream-video::before {
    content: "กำลังโหลดวิดีโอ...";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 1.2rem;
    z-index: 1;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.7;
    }
    50% {
        opacity: 1;
    }
}

.live-stream-video iframe + * {
    display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .live-stream-content {
        width: 95vw;
        height: 95vh;
        border-radius: 8px;
    }
    
    .live-stream-header h2 {
        font-size: 1.2rem;
        line-height: 1.4;
    }
    
    .live-stream-close {
        width: 40px;
        height: 40px;
        top: 10px;
        right: 10px;
    }
    
    .live-stream-header {
        padding: 15px 60px 30px 15px;
    }
}

@media (max-width: 480px) {
    .live-stream-content {
        width: 98vw;
        height: 98vh;
        border-radius: 0;
    }
    
    .live-stream-header h2 {
        font-size: 1rem;
    }
    
    .live-stream-close {
        width: 36px;
        height: 36px;
        top: 8px;
        right: 8px;
    }
    
    .live-stream-header {
        padding: 12px 50px 25px 12px;
    }
}

/* ซ่อน popup ตอนเริ่มต้น */
.live-stream-overlay.hidden {
    display: none;
}

/* เอฟเฟกต์การปิด */
.live-stream-overlay.closing {
    animation: fadeOut 0.3s ease-out forwards;
}

@keyframes fadeOut {
    from {
        opacity: 1;
        backdrop-filter: blur(5px);
    }
    to {
        opacity: 0;
        backdrop-filter: blur(0px);
    }
}

.live-stream-overlay.closing .live-stream-content {
    animation: slideOut 0.3s ease-out forwards;
}

@keyframes slideOut {
    from {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
    to {
        transform: scale(0.9) translateY(20px);
        opacity: 0;
    }
}

/* เอฟเฟกต์สำหรับ Live indicator */
.live-indicator {
    position: absolute;
    top: 20px;
    left: 20px;
    background: #ff4444;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 10001;
    animation: livePulse 2s ease-in-out infinite;
    box-shadow: 0 2px 8px rgba(255, 68, 68, 0.4);
}

@keyframes livePulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(255, 68, 68, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 4px 16px rgba(255, 68, 68, 0.6);
    }
}

/* เอฟเฟกต์เมื่อ hover ที่ video area */
.live-stream-video:hover .live-stream-header {
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

/* Custom scrollbar สำหรับ mobile */
.live-stream-overlay::-webkit-scrollbar {
    display: none;
}

.live-stream-overlay {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .live-stream-overlay,
    .live-stream-content,
    .live-stream-close,
    .live-stream-header h2,
    .live-indicator {
        animation: none;
    }
    
    .live-stream-close:hover {
        transform: scale(1.1);
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .live-stream-overlay {
        background: rgba(0, 0, 0, 0.98);
    }
    
    .live-stream-close {
        background: rgba(255, 255, 255, 0.2);
        border-color: rgba(255, 255, 255, 0.5);
    }
    
    .live-stream-header {
        background: linear-gradient(to bottom, rgba(0,0,0,0.9), transparent);
    }
}