/* ══════════════════════════════════════════════════════
   VERTEX CBT — News Ticker Styles
   Fixed: body padding, hidden class conflict, layout
══════════════════════════════════════════════════════ */

/* Body padding to prevent content being hidden behind fixed ticker */
body {
    padding-bottom: 52px !important;
}

/* When ticker is hidden, remove the body padding */
body:has(.news-ticker-container.ticker-hidden) {
    padding-bottom: 0 !important;
}

/* Ticker container — fixed to bottom of screen */
.news-ticker-container {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #c62828;
    color: #ffffff;
    z-index: 10000;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

/* Wrapper: label + scrolling content + close button */
.ticker-wrapper {
    display: flex;
    align-items: center;
    height: 50px;
}

/* "NOTICE" label on the left */
.ticker-label {
    background: #b71c1c;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    font-weight: bold;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    flex-shrink: 0;
    border-right: 3px solid rgba(255, 255, 255, 0.4);
    white-space: nowrap;
}

/* Pulsing icon inside label */
.ticker-label-icon {
    margin-right: 8px;
    font-size: 18px;
    animation: vtx-ticker-pulse 2s ease-in-out infinite;
}

@keyframes vtx-ticker-pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.6; }
}

/* The area that masks the scrolling text */
.ticker-content {
    flex: 1;
    overflow: hidden;
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

/* The scrolling text element */
.ticker-text {
    display: inline-block;
    white-space: nowrap;
    animation: vtx-ticker-scroll 80s linear infinite;
    font-size: 15px;
    line-height: 1.4;
    will-change: transform;
}

/* Pause on hover so users can read */
.ticker-content:hover .ticker-text {
    animation-play-state: paused;
}

/* Speed variants */
.ticker-text.speed-slow   { animation-duration: 80s; }
.ticker-text.speed-normal { animation-duration: 45s; }
.ticker-text.speed-fast   { animation-duration: 22s; }

/* Scroll animation — moves from right to left */
@keyframes vtx-ticker-scroll {
    0%   { transform: translateX(100vw); }
    100% { transform: translateX(-100%); }
}

/* Separator "|" between items */
.ticker-separator {
    display: inline-block;
    margin: 0 28px;
    color: #ffeb3b;
    font-weight: bold;
    opacity: 0.85;
}

/* Close button */
.ticker-close {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    padding: 0 16px;
    height: 100%;
    transition: background 0.2s;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
}

.ticker-close:hover {
    background: rgba(0, 0, 0, 0.2);
    opacity: 1;
}

/* Hidden state — uses a unique class name to avoid conflict with main.css .hidden */
.news-ticker-container.ticker-hidden {
    display: none !important;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    body {
        padding-bottom: 46px !important;
    }

    body:has(.news-ticker-container.ticker-hidden) {
        padding-bottom: 0 !important;
    }

    .ticker-wrapper {
        height: 46px;
    }

    .ticker-label {
        padding: 0 12px;
        font-size: 11px;
    }

    .ticker-label-icon {
        font-size: 14px;
        margin-right: 5px;
    }

    .ticker-text {
        font-size: 13px;
    }

    .ticker-close {
        padding: 0 12px;
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .ticker-label {
        padding: 0 8px;
        font-size: 10px;
    }

    .ticker-separator {
        margin: 0 16px;
    }

    .ticker-text {
        font-size: 12px;
    }
}
