/* ============================================
   Breaking News Ticker - شريط الأخبار العاجلة
   RTL Support - يدعم الاتجاه من اليسار لليمين
   ============================================ */

.news-ticker-container {
    background: #fff;
    border-top: 1px solid #e8e0d4;
    border-bottom: 2px solid var(--primary-color);
    overflow: hidden;
    position: relative;
}

.news-ticker-bar {
    display: flex;
    align-items: center;
    height: 42px;
}

/* Breaking Label - Fixed Position */
.news-ticker-label {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(-135deg, var(--primary-color), var(--primary-dark));
    color: #fff;
    padding: 0 22px;
    height: 100%;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    position: relative;
    z-index: 10;
    flex-shrink: 0;
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.15);
}

.news-ticker-label::after {
    content: '';
    position: absolute;
    left: -20px;
    top: 0;
    border-width: 21px 20px 21px 0;
    border-style: solid;
    border-color: transparent var(--primary-dark) transparent transparent;
}

.news-ticker-label i {
    animation: tickerPulse 1.5s ease-in-out infinite;
}

@keyframes tickerPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.15);
        opacity: 0.8;
    }
}

.ticker-pulse-dot {
    width: 8px;
    height: 8px;
    background: #ff0000;
    border-radius: 50%;
    animation: pulseDot 1s ease-in-out infinite;
    box-shadow: 0 0 8px rgba(255, 0, 0, 0.6);
}

@keyframes pulseDot {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.6;
        transform: scale(0.85);
    }
}

/* Ticker Content Area */
.news-ticker-content {
    flex: 1;
    overflow: hidden;
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    background: #fff;
}

/* Fade edges */
.news-ticker-content::before,
.news-ticker-content::after {
    content: '';
    position: absolute;
    top: 0;
    width: 40px;
    height: 100%;
    z-index: 5;
    pointer-events: none;
}

.news-ticker-content::before {
    right: 0;
    background: linear-gradient(to left, #fff, transparent);
}

.news-ticker-content::after {
    left: 0;
    background: linear-gradient(to right, #fff, transparent);
}

/* Ticker News List - Moving Part (RTL: from left to right) */
.news-ticker-list {
    display: flex;
    gap: 50px;
    white-space: nowrap;
    padding-right: 100%;
    animation: scrollNewsRTL 20s linear infinite;
}

@keyframes scrollNewsRTL {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(100%);
    }
}

/* Individual News Item */
.news-ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #333;
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s ease;
    flex-shrink: 0;
}

.news-ticker-item:hover {
    color: var(--primary-color);
}

.news-ticker-item::before {
    content: '◆';
    color: var(--primary-color);
    font-size: 0.5rem;
}

.news-ticker-item span {
    font-weight: 500;
}

/* Pause on Hover */
.news-ticker-container:hover .news-ticker-list {
    animation-play-state: paused;
}

/* Controls - Fixed Position */
.news-ticker-controls {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 0 15px;
    height: 100%;
    background: #f8f5f0;
    border-right: 1px solid #e8e0d4;
    flex-shrink: 0;
}

.ticker-btn {
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #ddd;
    color: #888;
    font-size: 0.65rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 3px;
}

.ticker-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.ticker-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
    .news-ticker-bar {
        height: 38px;
    }

    .news-ticker-label {
        padding: 0 15px;
        font-size: 0.75rem;
    }

    .news-ticker-label span:last-child {
        display: none;
    }

    .news-ticker-label::after {
        left: -15px;
        border-width: 19px 15px 19px 0;
    }

    .news-ticker-item {
        font-size: 0.8rem;
    }

    .news-ticker-controls {
        display: none;
    }
}

@media (max-width: 480px) {
    .news-ticker-label::after {
        display: none;
    }

    .news-ticker-label {
        padding: 0 12px;
    }
}