/**
 * News Ticker Styles - JobCast
 * Breaking News, Headlines, Updates, and Alerts
 * 
 * Design Theme: Corporate Blue (#1e3a8a) with Gold Accents (#fbbf24)
 */

/* ========================================
   NEWS TICKER WRAPPER
   ======================================== */
.news-ticker-wrapper {
    position: relative;
    width: 100%;
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    border-bottom: 2px solid rgba(251, 191, 36, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 100;
    overflow: hidden;
    min-height: 40px;
    display: flex;
    align-items: center;
}

/* ========================================
   NEWS TICKER CONTAINER
   ======================================== */
.news-ticker-container {
    width: 100%;
    overflow: hidden;
    position: relative;
    mask-image: linear-gradient(
        to right,
        transparent 0%,
        black 5%,
        black 95%,
        transparent 100%
    );
    -webkit-mask-image: linear-gradient(
        to right,
        transparent 0%,
        black 5%,
        black 95%,
        transparent 100%
    );
}

/* ========================================
   NEWS TICKER CONTENT
   ======================================== */
.news-ticker-content {
    display: inline-flex;
    align-items: center;
    gap: 2rem;
    white-space: nowrap;
    animation: scroll-ticker linear infinite;
    animation-duration: var(--animation-duration, 60s);
    animation-play-state: running;
    will-change: transform;
}

/* Reduced motion support */
.news-ticker-content.reduced-motion {
    animation: none;
    justify-content: center;
    flex-wrap: wrap;
    white-space: normal;
}

/* ========================================
   SCROLL ANIMATION
   ======================================== */
@keyframes scroll-ticker {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* ========================================
   TICKER ITEM
   ======================================== */
.ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    padding: 0.5rem 0;
}

.ticker-item i {
    font-size: 0.9rem;
    color: #fbbf24;
    flex-shrink: 0;
}

/* Priority-based styling */
.ticker-item.ticker-priority-critical {
    font-weight: 700;
}

.ticker-item.ticker-priority-critical i {
    color: #ef4444;
    animation: pulse 2s ease-in-out infinite;
}

.ticker-item.ticker-priority-important {
    font-weight: 600;
}

.ticker-item.ticker-priority-important i {
    color: #f59e0b;
}

.ticker-item.ticker-priority-informational {
    font-weight: 500;
}

/* Pulse animation for critical items */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

/* ========================================
   TICKER TEXT
   ======================================== */
.ticker-text-wrapper,
.ticker-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #ffffff;
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease;
}

.ticker-link:hover,
.ticker-link:focus {
    color: #fbbf24;
    transform: translateY(-1px);
    text-decoration: none;
    outline: 2px solid rgba(251, 191, 36, 0.5);
    outline-offset: 2px;
    border-radius: 4px;
}

.ticker-text {
    font-size: 0.9rem;
    line-height: 1.4;
    color: inherit;
}

/* ========================================
   ANIMATED DOTS SEPARATOR
   ======================================== */
.ticker-separator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0 1rem;
    height: 100%;
}

.animated-dots {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.animated-dots .dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: #fbbf24;
    display: inline-block;
    animation: dot-bounce 1.4s ease-in-out infinite;
}

.animated-dots .dot:nth-child(1) {
    animation-delay: 0s;
}

.animated-dots .dot:nth-child(2) {
    animation-delay: 0.2s;
}

.animated-dots .dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes dot-bounce {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1.2);
        opacity: 1;
    }
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 768px) {
    .news-ticker-wrapper {
        min-height: 36px;
    }
    
    .news-ticker-content {
        gap: 1.5rem;
        animation-duration: var(--animation-duration, 40s);
    }
    
    .ticker-text {
        font-size: 0.85rem;
    }
    
    .ticker-item i {
        font-size: 0.8rem;
    }
    
    .ticker-separator {
        padding: 0 0.75rem;
    }
    
    .animated-dots .dot {
        width: 3px;
        height: 3px;
    }
}

@media (max-width: 480px) {
    .news-ticker-wrapper {
        min-height: 32px;
    }
    
    .news-ticker-content {
        gap: 1rem;
        animation-duration: var(--animation-duration, 30s);
    }
    
    .ticker-text {
        font-size: 0.8rem;
    }
    
    .ticker-separator {
        padding: 0 0.5rem;
    }
}

/* ========================================
   ACCESSIBILITY
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    .news-ticker-content {
        animation: none;
    }
    
    .animated-dots .dot {
        animation: none;
        opacity: 0.7;
    }
    
    .ticker-item.ticker-priority-critical i {
        animation: none;
    }
}

/* Focus styles for keyboard navigation */
.ticker-link:focus-visible {
    outline: 3px solid #fbbf24;
    outline-offset: 2px;
    border-radius: 4px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .news-ticker-wrapper {
        border-bottom-width: 3px;
    }
    
    .ticker-text {
        font-weight: 600;
    }
}







