/**
 * Live Viewers Badge Styles
 * Style cho badge hiển thị số người đang xem
 */

/* Container badge */
.live-viewers-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(220, 20, 60, 0.95);
    padding: 3px 8px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 9;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.live-viewers-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(220, 20, 60, 0.5);
}

/* Live indicator dot - nhấp nháy */
.live-indicator-dot {
    width: 6px;
    height: 6px;
    background: #fff;
    border-radius: 50%;
    animation: pulse-dot 1.5s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes pulse-dot {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

/* Số viewers */
.live-viewers-count {
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Label */
.live-viewers-label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 9px;
    font-weight: 600;
    line-height: 1;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Responsive mobile */
@media screen and (max-width: 768px) {
    .live-viewers-badge {
        top: 5px;
        right: 5px;
        padding: 2px 6px;
        gap: 3px;
        border-radius: 10px;
    }

    .live-indicator-dot {
        width: 5px;
        height: 5px;
    }

    .live-viewers-count {
        font-size: 10px;
    }

    .live-viewers-label {
        font-size: 8px;
    }
}

/* Variant màu khác */
.live-viewers-badge.viewers-high {
    background: rgba(220, 20, 60, 1);
}

.live-viewers-badge.viewers-medium {
    background: rgba(255, 152, 0, 0.95);
}

.live-viewers-badge.viewers-low {
    background: rgba(76, 175, 80, 0.95);
}

/* Integration với poster */
article.movies .poster,
article.tvshows .poster {
    position: relative;
}

/* Khi có cả countdown và live viewers */
.poster .countdown-badge {
    top: 5px;
    left: 5px;
}

.poster .live-viewers-badge {
    top: 6px;
    right: 6px;
}

/* Hiệu ứng fade in khi xuất hiện */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.live-viewers-badge {
    animation: fadeInUp 0.3s ease-out;
}

/* Dark theme support */
.dark-mode .live-viewers-badge {
    background: rgba(220, 20, 60, 0.9);
}

/* Print - ẩn đi */
@media print {
    .live-viewers-badge {
        display: none;
    }
}
