/* ไฟล์: css/live_stream_notification_enhanced.css */
/* CSS เพิ่มเติมสำหรับการแสดงเฉพาะวิดีโอ */

.live-stream-video {
    width: 100%;
    height: 100%;
    position: relative;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
}

.live-stream-video iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: #000;
    border-radius: 12px;
    position: relative;
    z-index: 10;
}

/* ป้องกันการแสดง YouTube logo และ related videos */
.live-stream-video iframe::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

/* Loading state เมื่อวิดีโอกำลังโหลด */
.live-stream-video::before {
    content: "กำลังโหลดวิดีโอ...";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 1.2rem;
    font-weight: 500;
    z-index: 5;
    animation: pulse 1.5s ease-in-out infinite;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

/* ซ่อน loading text เมื่อ iframe โหลดเสร็จ */
.live-stream-video iframe[src] ~ .loading-text,
.live-stream-video iframe:not([src=""]) + .loading-text {
    display: none;
}

/* เอฟเฟกต์พิเศษสำหรับ live streaming */
.live-stream-content::before {
    content: "🔴 LIVE";
    position: absolute;
    top: 25px;
    left: 25px;
    background: linear-gradient(45deg, #ff0000, #ff4444);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 700;
    z-index: 10002;
    animation: liveBlink 2s ease-in-out infinite;
    box-shadow: 0 4px 12px rgba(255, 0, 0, 0.4);
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

@keyframes liveBlink {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(255, 0, 0, 0.4);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
        box-shadow: 0 6px 20px rgba(255, 0, 0, 0.6);
    }
}

/* ปรับปรุง control bar overlay */
.live-stream-header {
    background: linear-gradient(
        to bottom, 
        rgba(0,0,0,0.9) 0%, 
        rgba(0,0,0,0.7) 40%, 
        rgba(0,0,0,0.3) 70%,
        transparent 100%
    );
    backdrop-filter: blur(10px);
}

/* เอฟเฟกต์เมื่อ hover */
.live-stream-video:hover::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.05);
    pointer-events: none;
    transition: all 0.3s ease;
    border-radius: 12px;
}

/* ปรับปรุงการแสดงผลบน mobile */
@media (max-width: 768px) {
    .live-stream-content::before {
        top: 15px;
        left: 15px;
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    
    .live-stream-video::before {
        font-size: 1rem;
    }
}

/* เอฟเฟกต์สำหรับการเปลี่ยน quality วิดีโอ */
.live-stream-video.quality-changing::before {
    content: "กำลังปรับคุณภาพวิดีโอ...";
    background: rgba(0, 0, 0, 0.8);
    padding: 12px 24px;
    border-radius: 8px;
    backdrop-filter: blur(5px);
}

/* ปรับปรุงการแสดงใน fullscreen mode */
.live-stream-overlay:-webkit-full-screen .live-stream-content {
    border-radius: 0;
    width: 100vw;
    height: 100vh;
    max-width: none;
    max-height: none;
}

.live-stream-overlay:-moz-full-screen .live-stream-content {
    border-radius: 0;
    width: 100vw;
    height: 100vh;
    max-width: none;
    max-height: none;
}

.live-stream-overlay:fullscreen .live-stream-content {
    border-radius: 0;
    width: 100vw;
    height: 100vh;
    max-width: none;
    max-height: none;
}

/* เอฟเฟกต์การโฟกัส */
.live-stream-overlay:focus-within .live-stream-content {
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.5);
}

/* ปรับปรุงประสิทธิภาพการแสดงผล */
.live-stream-video iframe {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* เอฟเฟกต์เมื่อเสียงหาย (muted) */
.live-stream-content.muted::after {
    content: "🔇";
    position: absolute;
    top: 25px;
    right: 80px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px;
    border-radius: 50%;
    font-size: 1rem;
    z-index: 10002;
    backdrop-filter: blur(10px);
}

/* เพิ่มความนุ่มนวลในการเปลี่ยน state */
.live-stream-content * {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ปรับปรุง scrollbar ถ้ามี */
.live-stream-content::-webkit-scrollbar {
    display: none;
}

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