/* Premium latest-news ticker: theme-neutral, with the active theme supplying the accent. */
/* These themes keep an SEO-only home title in the DOM. Remove its visual reserve
   so the ticker can sit directly below the navigation, without changing pages. */
html[data-theme="portal"] body.body-index-page main,
html[data-theme="editorial"] body.body-index-page main,
html[data-theme="cards_pro"] body.body-index-page main {
    padding-top: 12px;
}

html[data-theme="portal"] body.body-index-page .title-index,
html[data-theme="editorial"] body.body-index-page .title-index,
html[data-theme="cards_pro"] body.body-index-page .title-index {
    height: 0;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 0;
}

.newsticker-premium {
    --ticker-accent: var(--vr-theme-color, #3867f4);
    --ticker-ink: var(--vr-text-main, #172033);
    --ticker-muted: var(--vr-text-muted, #697386);
    --ticker-line: var(--vr-border-color, rgba(23, 32, 51, .14));
    --ticker-panel: var(--vr-body-bg, #fff);
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    min-height: 76px;
    height: auto;
    padding: 9px 10px;
    gap: 14px;
    overflow: hidden;
    border: 1px solid var(--ticker-line);
    border-color: color-mix(in srgb, var(--ticker-line), transparent 18%);
    border-radius: 22px;
    color: var(--ticker-ink);
    background: var(--ticker-panel);
    background: linear-gradient(105deg, var(--ticker-panel), color-mix(in srgb, var(--ticker-accent), var(--ticker-panel) 94%));
    box-shadow: 0 14px 34px rgba(30, 50, 100, .08);
    box-shadow: 0 14px 34px color-mix(in srgb, var(--ticker-accent), transparent 87%);
}

.newsticker-premium::after {
    position: absolute;
    inset: 0;
    pointer-events: none;
    content: "";
    opacity: .55;
    background: linear-gradient(90deg, transparent 0, color-mix(in srgb, var(--ticker-accent), transparent 92%) 48%, transparent 100%);
}

.newsticker-premium > * {
    position: relative;
    z-index: 1;
}

.newsticker-premium .ticker-brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 48px;
    padding: 0 15px;
    border-radius: 14px;
    color: #fff;
    background: var(--ticker-accent);
    background: linear-gradient(135deg, var(--ticker-accent), color-mix(in srgb, var(--ticker-accent), #111 25%));
    box-shadow: 0 9px 20px rgba(30, 50, 100, .18);
    box-shadow: 0 9px 20px color-mix(in srgb, var(--ticker-accent), transparent 70%);
    white-space: nowrap;
}

.newsticker-premium .ticker-live-dot {
    width: 8px;
    height: 8px;
    border: 2px solid rgba(255,255,255,.7);
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(255,255,255,.18);
    animation: ticker-pulse 1.8s ease-out infinite;
}

.newsticker-premium .ticker-brand-label {
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .075em;
    text-transform: uppercase;
}

.newsticker-premium .ticker-brand-live {
    padding: 3px 6px;
    border: 1px solid rgba(255,255,255,.3);
    border-radius: 6px;
    font-size: .58rem;
    font-weight: 900;
    letter-spacing: .1em;
}

.newsticker-premium .ticker-viewport {
    min-width: 0;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent);
}

.newsticker-premium .news-list {
    display: flex;
    align-items: center;
    width: max-content;
    transform: translate3d(0, 0, 0);
    will-change: transform;
}

.newsticker-premium .news-item {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    width: clamp(260px, 34vw, 520px);
    min-height: 48px;
    padding: 0 22px;
    border-right: 1px solid var(--ticker-line);
    border-right-color: color-mix(in srgb, var(--ticker-line), transparent 18%);
}

.newsticker-premium .news-link {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
    color: var(--ticker-ink);
    font-size: clamp(.86rem, 1.15vw, 1rem);
    font-weight: 700;
    line-height: 1.3;
}

.newsticker-premium .news-link-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 27px;
    width: 27px;
    height: 27px;
    border-radius: 50%;
    color: var(--ticker-accent);
    background: color-mix(in srgb, var(--ticker-accent), transparent 88%);
    font-size: 1rem;
    transition: transform .25s ease, color .25s ease, background .25s ease;
}

.newsticker-premium .news-link-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.newsticker-premium .news-link:hover,
.newsticker-premium .news-link:focus-visible {
    color: var(--ticker-accent);
}

.newsticker-premium .news-link:hover .news-link-arrow,
.newsticker-premium .news-link:focus-visible .news-link-arrow {
    transform: translate(2px, -2px);
    color: #fff;
    background: var(--ticker-accent);
}

.newsticker-premium .news-link:focus-visible {
    outline: 2px solid var(--ticker-accent);
    outline-offset: 5px;
    border-radius: 4px;
}

.newsticker-premium .ticker-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    padding-left: 4px;
}

.newsticker-premium .ticker-pause-hint {
    margin-right: 5px;
    color: var(--ticker-muted);
    font-size: .67rem;
    font-weight: 600;
    white-space: nowrap;
}

.newsticker-premium .ticker-control {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid color-mix(in srgb, var(--ticker-line), transparent 4%);
    border-radius: 10px;
    color: var(--ticker-muted);
    background: var(--ticker-panel);
    background: color-mix(in srgb, var(--ticker-panel), var(--ticker-accent) 4%);
    transition: color .2s ease, border-color .2s ease, background .2s ease, transform .2s ease;
}

.newsticker-premium .ticker-control:hover,
.newsticker-premium .ticker-control:focus-visible {
    transform: translateY(-1px);
    border-color: var(--ticker-accent);
    color: var(--ticker-accent);
    background: color-mix(in srgb, var(--ticker-accent), var(--ticker-panel) 90%);
}

.newsticker-premium.is-paused .ticker-live-dot {
    animation-play-state: paused;
}

.newsticker-premium.is-paused .ticker-pause-hint {
    color: var(--ticker-accent);
}

.newsticker-premium.is-static .ticker-actions {
    display: none;
}

@keyframes ticker-pulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(255,255,255,.15); }
    50% { box-shadow: 0 0 0 6px rgba(255,255,255,0); }
}

@media (max-width: 991.98px) {
    .newsticker-premium {
        grid-template-columns: auto minmax(0, 1fr) auto;
        gap: 8px;
    }

    .newsticker-premium .ticker-pause-hint {
        display: none;
    }

    .newsticker-premium .news-item {
        width: min(54vw, 430px);
        padding: 0 15px;
    }
}

@media (max-width: 575.98px) {
    .newsticker-premium {
        min-height: 68px;
        padding: 7px;
        border-radius: 17px;
    }

    .newsticker-premium .ticker-brand {
        min-height: 48px;
        padding: 0 10px;
    }

    .newsticker-premium .ticker-brand-label {
        max-width: 62px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .newsticker-premium .ticker-brand-live {
        display: none;
    }

    .newsticker-premium .news-item {
        width: 72vw;
        padding: 0 10px;
    }

    .newsticker-premium .ticker-actions {
        gap: 3px;
    }

    .newsticker-premium .ticker-control {
        width: 29px;
        height: 29px;
        border-radius: 8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .newsticker-premium .ticker-live-dot,
    .newsticker-premium .news-link-arrow,
    .newsticker-premium .ticker-control {
        animation: none;
        transition: none;
    }
}
