/* =============================================================================
   NewsSync PRO — Ticker Layout
   [newssync layout="ticker"]
   ============================================================================= */

/* ── Wrapper ──────────────────────────────────────────────────────────────── */
.nsp-ticker {
    display: flex;
    align-items: center;
    width: 100%;
    height: 44px;
    background: #0f172a;
    border-radius: 6px;
    overflow: hidden;
    font-size: 13px;
    margin: 0 0 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    user-select: none;
}

/* ── Label badge ─────────────────────────────────────────────────────────── */
.nsp-ticker__label {
    flex-shrink: 0;
    height: 100%;
    padding: 0 16px;
    display: flex;
    align-items: center;
    background: var(--nsp-ticker-accent, #e11d48);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    white-space: nowrap;
    position: relative;
    z-index: 1;
}

/* Arrow notch on right side of label */
.nsp-ticker__label::after {
    content: '';
    position: absolute;
    right: -11px;
    top: 0;
    width: 0;
    height: 0;
    border-top: 22px solid transparent;
    border-bottom: 22px solid transparent;
    border-left: 11px solid var(--nsp-ticker-accent, #e11d48);
}

/* ── Track wrapper ───────────────────────────────────────────────────────── */
.nsp-ticker__track-wrap {
    flex: 1;
    overflow: hidden;
    height: 100%;
    position: relative;
}

/* Left edge fade — blends label into track */
.nsp-ticker__track-wrap::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 28px;
    height: 100%;
    background: linear-gradient(to right, #0f172a 0%, transparent 100%);
    z-index: 1;
    pointer-events: none;
}

/* ── Track (animated) ────────────────────────────────────────────────────── */
.nsp-ticker__track {
    display: flex;
    align-items: center;
    height: 100%;
    white-space: nowrap;
    animation: nsp-ticker-scroll var(--nsp-ticker-duration, 30s) linear infinite;
    will-change: transform;
}

/* Pause on hover (also handled by JS for JS-disabled fallback) */
.nsp-ticker:hover .nsp-ticker__track {
    animation-play-state: paused;
}

/* ── Inner (one copy of items) ───────────────────────────────────────────── */
.nsp-ticker__inner {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    padding-left: 24px;
}

/* ── Individual headline link ────────────────────────────────────────────── */
.nsp-ticker__item {
    display: inline-block;
    color: #cbd5e1;
    text-decoration: none !important;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    transition: color 0.15s;
    cursor: pointer;
}
.nsp-ticker__item:hover {
    color: var(--nsp-ticker-accent, #e11d48) !important;
    text-decoration: none !important;
}

/* ── Separator between items ─────────────────────────────────────────────── */
.nsp-ticker__sep {
    display: inline-block;
    color: var(--nsp-ticker-accent, #e11d48);
    margin: 0 16px;
    font-size: 8px;
    opacity: 0.6;
    flex-shrink: 0;
    vertical-align: middle;
}

/* ── Keyframe (translate from 0 → -width of one inner, set by JS) ────────── */
@keyframes nsp-ticker-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(var(--nsp-ticker-translate, -50%)); }
}
