/**
 * Kolaras Hulchal - Breaking News Ticker
 *
 * @package Kolaras_Hulchal
 */

/* =========================================================
   BREAKING STRIP
   ========================================================= */

.kh-breaking-strip {
    width: 100%;
    background-color: #FFFFFF;
    border-bottom: 1px solid #E2E8F0;
    padding: 0.5rem 0;
    overflow: hidden;
}

.kh-breaking-strip-inner {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
}


/* =========================================================
   BREAKING NEWS BADGE
   ========================================================= */

.kh-breaking-strip-badge {
    flex: 0 0 auto;
    background-color: #D90429;
    color: #FFFFFF;
    font-size: 0.8125rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    padding: 0.5rem 0.875rem;
    border-radius: 6px;
    white-space: nowrap;
}


/* =========================================================
   TICKER VIEWPORT
   ========================================================= */

.kh-ticker-viewport {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    position: relative;
    white-space: nowrap;
}


/* =========================================================
   TICKER TRACK
   ========================================================= */

.kh-ticker-track {
    display: inline-flex !important;
    align-items: center;
    width: max-content;
    min-width: max-content;
    gap: 2.5rem;
    white-space: nowrap;

    animation-name: kh-ticker-marquee;
    animation-duration: 35s;
    animation-timing-function: linear;
    animation-iteration-count: infinite;

    will-change: transform;
}


/* =========================================================
   INDIVIDUAL NEWS ITEM
   ========================================================= */

.kh-ticker-item {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 0.5rem;
    white-space: nowrap;
}

.kh-ticker-bullet {
    color: #D90429;
    font-size: 1.1rem;
    font-weight: 800;
    flex-shrink: 0;
}

.kh-ticker-link {
    display: inline-block;
    color: #0F172A;
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.kh-ticker-link:hover {
    color: #D90429;
}


/* =========================================================
   MAIN TICKER ANIMATION
   ========================================================= */

@keyframes kh-ticker-marquee {

    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }

}


/* =========================================================
   PAUSE ON HOVER
   ========================================================= */

.kh-ticker-viewport:hover .kh-ticker-track {
    animation-play-state: paused;
}

.kh-ticker-viewport:focus-within .kh-ticker-track {
    animation-play-state: paused;
}


/* =========================================================
   TOP BAR TICKER
   ========================================================= */

.kh-top-headline-wrapper {
    overflow: hidden;
    white-space: nowrap;
    min-width: 0;
}

.kh-top-ticker-track {
    display: inline-flex !important;
    align-items: center;
    width: max-content;
    min-width: max-content;
    gap: 1.5rem;
    white-space: nowrap;

    animation: kh-top-ticker-marquee 30s linear infinite;

    will-change: transform;
}

.kh-top-headline-link {
    flex: 0 0 auto;
    white-space: nowrap;
}


/* =========================================================
   TOP BAR ANIMATION
   ========================================================= */

@keyframes kh-top-ticker-marquee {

    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }

}

.kh-top-headline-wrapper:hover .kh-top-ticker-track {
    animation-play-state: paused;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 767px) {

    .kh-breaking-strip-inner {
        gap: 0.5rem;
    }

    .kh-breaking-strip-badge {
        font-size: 0.7rem;
        padding: 0.45rem 0.6rem;
    }

    .kh-ticker-link {
        font-size: 0.85rem;
    }

    .kh-ticker-track {
        gap: 1.5rem;
        animation-duration: 30s;
    }

}


/* =========================================================
   IMPORTANT:
   DO NOT DISABLE THE TICKER WITH prefers-reduced-motion
   ========================================================= */