/* Premium News Ticker Styles */
.news-ticker-container {
    position: relative;
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    margin: 20px 0;
    overflow: hidden;
    z-index: 1000;
}

.news-ticker-container.color-green {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.news-ticker-container.color-yellow {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
}

.news-ticker-container.color-red {
    background: linear-gradient(135deg, #dc3545 0%, #e83e8c 100%);
}

.news-ticker-container.color-blue {
    background: linear-gradient(135deg, #007bff 0%, #6f42c1 100%);
}

.news-ticker-header {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    background: rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.news-ticker-label {
    font-weight: bold;
    color: white;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-right: 15px;
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.news-ticker-label::before {
    content: "📢";
    margin-right: 8px;
    font-size: 16px;
    animation: pulse 2s infinite;
}

.news-ticker-content {
    flex: 1;
    overflow: hidden;
    position: relative;
    height: 24px;
    display: flex;
    align-items: center;
}

.news-ticker-text {
    color: white;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    animation: scroll-left 30s linear infinite;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    will-change: transform;
    backface-visibility: hidden;
    perspective: 1000px;
}

.news-ticker-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ticker-control-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 12px;
}

.ticker-control-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.ticker-control-btn:active {
    transform: scale(0.95);
}

/* Animation for scrolling text */
@keyframes scroll-left {
    0% {
        transform: translate3d(100%, 0, 0);
    }
    100% {
        transform: translate3d(-100%, 0, 0);
    }
}

/* Pause animation on hover */
.news-ticker-container:hover .news-ticker-text {
    animation-play-state: paused;
}

/* Pulse animation for the icon */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .news-ticker-container {
        margin: 15px 0;
        border-radius: 6px;
        touch-action: manipulation;
    }
    
    .news-ticker-header {
        padding: 10px 15px;
    }
    
    .news-ticker-label {
        font-size: 12px;
        margin-right: 10px;
    }
    
    .news-ticker-text {
        font-size: 13px;
        line-height: 1.4;
    }
    
    .ticker-control-btn {
        width: 32px;
        height: 32px;
        font-size: 11px;
        min-width: 32px;
        min-height: 32px;
        touch-action: manipulation;
    }
    
    .news-ticker-controls {
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .news-ticker-header {
        padding: 8px 12px;
        flex-wrap: nowrap;
    }
    
    .news-ticker-label {
        font-size: 11px;
        margin-right: 8px;
        flex-shrink: 0;
    }
    
    .news-ticker-text {
        font-size: 12px;
        line-height: 1.3;
    }
    
    .news-ticker-controls {
        gap: 6px;
        flex-shrink: 0;
    }
    
    .ticker-control-btn {
        width: 28px;
        height: 28px;
        font-size: 10px;
        min-width: 28px;
        min-height: 28px;
        touch-action: manipulation;
    }
    
    /* Ensure content doesn't overflow on very small screens */
    .news-ticker-content {
        min-width: 0;
        flex: 1;
    }
}

/* Smooth entrance animation */
.news-ticker-container {
    animation: slideInFromTop 0.5s ease-out;
}

@keyframes slideInFromTop {
    0% {
        transform: translateY(-100%);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Multiple announcements support */
.news-ticker-text.multiple {
    animation: scroll-left-multiple 45s linear infinite;
}

@keyframes scroll-left-multiple {
    0% {
        transform: translate3d(100%, 0, 0);
    }
    100% {
        transform: translate3d(-100%, 0, 0);
    }
}

/* Fade effect for text edges */
.news-ticker-content::before,
.news-ticker-content::after {
    content: '';
    position: absolute;
    top: 0;
    width: 20px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.news-ticker-content::before {
    left: 0;
    background: linear-gradient(to right, rgba(0,0,0,0.1), transparent);
}

.news-ticker-content::after {
    right: 0;
    background: linear-gradient(to left, rgba(0,0,0,0.1), transparent);
}

/* Enhanced visual effects */
.news-ticker-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Close button */
.ticker-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: bold;
}

.ticker-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Hidden state */
.news-ticker-container.hidden {
    display: none;
}