/* ============================================
   News Ticker — Section 508c Compliant
   High contrast (WCAG 1.4.3), keyboard
   accessible (WCAG 2.1.1), pauseable (2.2.2)
   ============================================ */

.news-ticker {
    display: flex;
    align-items: stretch;
    background-color: #111111;
    border-top: 3px solid #ffd700;
    border-bottom: 3px solid #ffd700;
    height: 3.5rem;
    overflow: hidden;
    width: 100%;
}

/* "UPCOMING" label badge */
.ticker-label {
    flex-shrink: 0;
    background-color: #ffd700;
    color: #000000;
    font-weight: 700;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    padding: 0 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
}

/* Clipping region for the scrolling strip */
.ticker-viewport {
    flex: 1;
    overflow: hidden;
}

/* Scrolling list */
.ticker-track {
    display: inline-flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    white-space: nowrap;
    animation: ticker-scroll 30s linear infinite;
    animation-duration: var(--ticker-duration, 30s);
    vertical-align: middle;
}

/* Pause on hover, keyboard focus within ticker, or explicit pause */
.ticker-track:hover,
.news-ticker:focus-within .ticker-track,
.news-ticker.is-paused .ticker-track {
    animation-play-state: paused;
}

/* Individual event items — two-row column layout */
.ticker-track li {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0.1rem;
    padding: 0 2.5rem 0 1.75rem;
    position: relative;
    line-height: 1;
}

/* Top row wrapper: date + title side-by-side */
.ticker-top {
    display: inline-flex;
    align-items: baseline;
    gap: 0.35rem;
    white-space: nowrap;
}

/* Date portion — gold for high contrast */
.ticker-date {
    color: #ffd700;
    font-weight: 700;
    font-size: 0.875rem;
    white-space: nowrap;
}

/* Title portion */
.ticker-title {
    color: #ffffff;
    font-size: 0.875rem;
    white-space: nowrap;
}

/* Notes portion — second row, dimmer and smaller */
.ticker-note {
    color: #cccccc;
    font-size: 0.75rem;
    font-style: italic;
    white-space: nowrap;
}

/* Diamond separator — vertically centred on the full item */
.ticker-track li::after {
    content: "\25C6"; /* ◆ */
    color: #ffd700;
    font-size: 0.45rem;
    position: absolute;
    right: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    line-height: 1;
}
.ticker-track li:last-child::after {
    content: none;
}

/* Seamless loop: two copies of items — animates exactly one copy width */
@keyframes ticker-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* Pause / Resume button */
.ticker-pause-btn {
    flex-shrink: 0;
    background: transparent;
    border: none;
    border-left: 1px solid #333333;
    color: #ffd700;
    font-size: 0.85rem;
    padding: 0 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 2.6rem;
    transition: background-color 0.2s ease;
}

.ticker-pause-btn:hover {
    background-color: rgba(255, 215, 0, 0.18);
}

/* 3 px gold outline — clearly visible on the dark strip */
.ticker-pause-btn:focus {
    outline: 3px solid #ffd700;
    outline-offset: -3px;
}

/* Reduced motion: slow the ticker instead of freezing it */
@media (prefers-reduced-motion: reduce) {
    .ticker-track {
        animation-duration: 120s;
    }
}

/* Clickable ticker items */
.ticker-link {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
    text-decoration: none;
    color: inherit;
}

.ticker-link:hover .ticker-title,
.ticker-link:focus .ticker-title {
    text-decoration: underline;
    color: #ffd700;
}

.ticker-link:focus {
    outline: 3px solid #ffd700;
    outline-offset: 2px;
    border-radius: 2px;
}
