/* Smart Ticker Pro — Front-end Ticker Styles */

#stp-ticker-wrap {
    /* Positioning — fixed, 20px above bottom by default */
    position: fixed;
    bottom: calc(var(--stp-offset, 20px));
    left: 0;
    right: 0;
    width: 100%;

    /* Sizing */
    height: var(--stp-height, 44px);
    min-height: 32px;

    /* Appearance */
    background: var(--stp-bg, #1a1a2e);
    color: var(--stp-color, #f0f0f0);
    font-family: var(--stp-font-family, inherit);
    font-size: var(--stp-font-size, 14px);
    border-radius: var(--stp-radius, 6px);
    box-shadow: var(--stp-shadow, 0 4px 24px rgba(0,0,0,.45));

    /* Stack above everything */
    z-index: 2147483647;

    /* Layout */
    display: flex;
    align-items: stretch;

    /* Prevent the ticker itself from selecting text when dragging */
    user-select: none;

    /* Smooth show/hide */
    transition: opacity .3s, transform .3s;

    /* Contain overflow from the scrolling track */
    overflow: hidden;
}

/* Narrow left/right margins for breathing room on desktops */
@media (min-width: 768px) {
    #stp-ticker-wrap {
        left: 16px;
        right: 16px;
        width: auto;
    }
}

/* Label */
#stp-ticker-label {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    background: var(--stp-label-bg, #e63946);
    color: var(--stp-label-color, #ffffff);
    font-weight: 700;
    font-size: .85em;
    letter-spacing: .6px;
    white-space: nowrap;
}

/* Viewport — clips the scrolling track */
#stp-ticker-viewport {
    flex: 1;
    overflow: hidden;
    display: flex;
    align-items: center;
    position: relative;
}

/* Track — the element that scrolls */
#stp-ticker-track {
    display: flex;
    align-items: center;
    white-space: nowrap;
    will-change: transform;
    animation: stp-scroll var(--stp-speed, 40s) linear infinite;
}

#stp-ticker-wrap:hover #stp-ticker-track,
#stp-ticker-wrap.stp-paused #stp-ticker-track {
    animation-play-state: paused;
}

@keyframes stp-scroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Individual item */
.stp-item {
    display: inline-flex;
    align-items: center;
    padding: 0 6px;
}
.stp-item a {
    color: var(--stp-color, #f0f0f0);
    text-decoration: none;
    transition: opacity .15s;
}
.stp-item a:hover {
    opacity: .75;
    text-decoration: underline;
}
.stp-sep {
    margin: 0 12px;
    opacity: .5;
    font-size: .8em;
}

/* Controls area */
#stp-ticker-controls {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 0 8px;
    border-left: 1px solid rgba(255,255,255,.12);
}

#stp-pause-btn,
#stp-close-btn {
    background: transparent;
    border: none;
    color: var(--stp-color, #f0f0f0);
    opacity: .65;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity .15s, background .15s;
    line-height: 1;
}
#stp-pause-btn:hover,
#stp-close-btn:hover {
    opacity: 1;
    background: rgba(255,255,255,.12);
}

/* Paused state — show play icon */
#stp-ticker-wrap.stp-paused #stp-pause-btn svg rect {
    display: none;
}
#stp-ticker-wrap.stp-paused #stp-pause-btn::before {
    content: '▶';
    font-size: 11px;
    line-height: 1;
}

/* Hidden state */
#stp-ticker-wrap.stp-hidden {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

/* Mobile tweaks */
@media (max-width: 480px) {
    #stp-ticker-label { padding: 0 10px; font-size: .78em; }
    #stp-ticker-wrap  { font-size: 12px; }
}
