/*
 * News Ticker Styles for Prescription Chamber Child Theme
 */

:root {
    --primary: #2a7de1;
    --secondary: #4caf50;
    --text-light: #f0f0f0;
    --text-dark: #333;
    --bg-light: #f5f5f5;
    --bg-white: #ffffff;
}

.news-ticker-wrapper {
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    position: relative;
    margin-bottom: 20px;
}

.news-ticker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
}

.news-ticker-left {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.live-indicator, .source-logo {
    display: flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: bold;
    white-space: nowrap;
    flex-shrink: 0;
    animation: glow 2s infinite alternate;
}

@keyframes glow {
    from { box-shadow: 0 0 5px rgba(255, 255, 255, 0.5); }
    to { box-shadow: 0 0 15px rgba(255, 255, 255, 0.8); }
}

.live-indicator .pulse {
    width: 10px;
    height: 10px;
    background-color: #ff4444;
    border-radius: 50%;
    margin-right: 8px;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { 
        opacity: 1; 
        transform: scale(1);
    }
    50% { 
        opacity: 0.5; 
        transform: scale(1.2);
    }
    100% { 
        opacity: 1; 
        transform: scale(1);
    }
}

.news-source-logos {
    display: flex;
    align-items: center;
    gap: 10px;
}

.source-logo {
    cursor: pointer;
    transition: all 0.3s ease;
}

.source-logo:hover {
    opacity: 1;
    transform: translateY(-2px) scale(1.05);
}

.news-ticker-datetime {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-size: 0.85rem;
    color: #e0e0e0;
}

.news-ticker-date {
    font-weight: 500;
}

.news-ticker-time {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: #fff;
}

.news-ticker-container {
    position: relative;
    overflow: hidden;
    height: 30px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

.news-ticker-content {
    position: absolute;
    white-space: nowrap;
    display: flex;
    align-items: center;
    height: 100%;
    animation: ticker-scroll 80s linear infinite;
}

@keyframes ticker-scroll {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

.news-ticker-item {
    display: inline-flex;
    align-items: center;
    margin-right: 30px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.news-ticker-item:hover {
    transform: translateY(-2px);
}

.news-source-label {
    padding: 3px 8px;
    border-radius: 3px;
    font-weight: 700;
    font-size: 0.75rem;
    margin-right: 10px;
    background-color: rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.news-source-label:hover {
    transform: scale(1.05);
}

.bbc-label {
    background-color: rgba(187, 25, 25, 0.8);
}

.cnn-label {
    background-color: rgba(204, 0, 0, 0.8);
}

.who-label {
    background-color: rgba(0, 147, 213, 0.8);
}

.nbc-label {
    background-color: rgba(228, 0, 43, 0.8);
}

.reuters-label {
    background-color: rgba(255, 102, 0, 0.8);
}

.news-ticker-text {
    color: var(--text-light);
    white-space: nowrap;
}

.breaking-tag {
    color: #ffcc00;
    font-weight: 700;
    margin-right: 5px;
    font-size: 0.8rem;
    animation: blink 2s infinite;
    flex-shrink: 0;
}

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

.news-ticker-separator {
    color: rgba(255, 255, 255, 0.5);
    margin: 0 10px;
    flex-shrink: 0;
}

.news-ticker-update-indicator {
    position: absolute;
    top: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 10px;
    border-radius: 0 0 0 4px;
    font-size: 0.75rem;
    color: #ffcc00;
    opacity: 0;
    transition: opacity 0.5s;
    z-index: 10;
}

.news-ticker-update-indicator.show {
    opacity: 1;
    animation: slideInRight 0.5s ease;
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.news-ticker-last-update {
    text-align: center;
    margin-top: 10px;
    font-size: 0.85rem;
    color: #888;
}

/* Responsive Design */
@media (max-width: 768px) {
    .news-ticker-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .news-ticker-left {
        width: 100%;
        justify-content: space-between;
    }
    
    .news-ticker-datetime {
        align-items: flex-start;
        width: 100%;
    }
    
    .news-ticker-content {
        animation: ticker-scroll 50s linear infinite;
    }
    
    .news-ticker-item {
        margin-right: 20px;
        font-size: 0.9rem;
    }
    
    .news-ticker-text {
        max-width: 200px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .news-ticker-separator {
        margin: 0 8px;
    }
    
    .news-source-logos {
        gap: 8px;
    }
    
    .source-logo, .live-indicator {
        font-size: 0.8rem;
        padding: 5px 10px;
    }
}

@media (max-width: 576px) {
    .news-ticker-content {
        animation: ticker-scroll 35s linear infinite;
    }
    
    .news-ticker-item {
        margin-right: 15px;
        font-size: 0.85rem;
    }
    
    .news-ticker-text {
        max-width: 150px;
    }
    
    .news-source-label {
        font-size: 0.7rem;
        padding: 2px 6px;
        margin-right: 8px;
    }
    
    .breaking-tag {
        font-size: 0.75rem;
        margin-right: 3px;
    }
    
    .news-ticker-separator {
        margin: 0 6px;
    }
    
    .source-logo, .live-indicator {
        font-size: 0.75rem;
        padding: 4px 8px;
    }
}

@media (max-width: 400px) {
    .news-ticker-text {
        max-width: 120px;
    }
    
    .news-ticker-content {
        animation: ticker-scroll 25s linear infinite;
    }
    
    .news-source-logos {
        gap: 5px;
    }
    
    .source-logo, .live-indicator {
        font-size: 0.7rem;
        padding: 3px 6px;
    }
}