/**
 * News Hot - Frontend Styles
 */

.news-hot-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    background-color: #ff0000;
    padding: 12px 0;
    z-index: 1;
    pointer-events: auto;
}

/* Đảm bảo không che admin bar */
.admin-bar .news-hot-container {
    z-index: 1;
    margin-top: 0;
}

/* Nếu plugin được đặt ở position fixed, đẩy xuống dưới admin bar */
.news-hot-container[style*="position: fixed"],
.news-hot-container[style*="position:fixed"] {
    top: 0 !important;
    z-index: 99 !important;
}

.admin-bar .news-hot-container[style*="position: fixed"],
.admin-bar .news-hot-container[style*="position:fixed"] {
    top: 32px !important;
    z-index: 99 !important;
}

@media screen and (max-width: 782px) {
    .admin-bar .news-hot-container[style*="position: fixed"],
    .admin-bar .news-hot-container[style*="position:fixed"] {
        top: 46px !important;
    }
}

.news-hot-wrapper {
    display: flex;
    align-items: center;
    max-width: 100%;
}

.news-hot-badge {
    flex-shrink: 0;
    padding: 8px 16px;
    margin: 0 15px;
    background-color: #ff0000;
    color: #ffffff;
    font-weight: bold;
    font-size: 14px;
    text-transform: uppercase;
    border-radius: 4px;
    animation: pulse 2s infinite;
    z-index: 2;
    position: relative;
    pointer-events: auto;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.news-hot-content {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.news-hot-marquee {
    display: inline-block;
    white-space: nowrap;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    will-change: transform;
}

.news-hot-marquee.scroll-left {
    animation-name: scrollLeft;
}

.news-hot-marquee.scroll-right {
    animation-name: scrollRight;
}

@keyframes scrollLeft {
    0% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(-100%);
    }
}

@keyframes scrollRight {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.news-hot-item {
    display: inline-block;
    color: inherit;
    font-size: 15px;
    line-height: 1.6;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.news-hot-item:hover {
    color: inherit;
    text-decoration: underline;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

.news-hot-item:visited {
    color: inherit;
}

.news-hot-item:active {
    transform: scale(0.98);
}

.news-hot-separator {
    display: inline-block;
    margin: 0 8px;
    color: inherit;
    opacity: 0.7;
    font-weight: bold;
}

.news-hot-spacer {
    display: inline-block;
    width: 300px;
}

/* Pause on hover */
.news-hot-container:hover .news-hot-marquee {
    animation-play-state: paused;
}

/* Responsive */
@media (max-width: 768px) {
    .news-hot-badge {
        padding: 6px 12px;
        font-size: 12px;
        margin: 0 10px;
    }
    
    .news-hot-item {
        font-size: 13px;
    }
    
    .news-hot-separator {
        margin: 0 10px;
    }
}

@media (max-width: 480px) {
    .news-hot-container {
        padding: 8px 0;
    }
    
    .news-hot-badge {
        padding: 4px 8px;
        font-size: 11px;
        margin: 0 8px;
    }
    
    .news-hot-item {
        font-size: 12px;
    }
    
    .news-hot-separator {
        margin: 0 8px;
    }
}
