/**
 * Frontend styles for Professional Breaking News Ticker
 */

.bnt-ticker-wrapper {
    display: flex;
    align-items: center;
    width: 100%;
    height: 48px;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    overflow: hidden;
    position: relative;
    box-sizing: border-box;
    z-index: 9999;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 1;
}

.bnt-ticker-wrapper * {
    box-sizing: border-box;
}

/* Slide up and fade out when closed */
.bnt-ticker-wrapper.bnt-hidden {
    opacity: 0;
    height: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    pointer-events: none;
}

/* Directions (RTL / LTR) */
.bnt-dir-rtl {
    direction: rtl;
    text-align: right;
}

.bnt-dir-ltr {
    direction: ltr;
    text-align: left;
}

/* Label Container */
.bnt-label-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    height: 100%;
    font-weight: 800;
    font-size: 14px;
    letter-spacing: 0.5px;
    z-index: 10;
    white-space: nowrap;
    position: relative;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
}

.bnt-dir-rtl .bnt-label-container {
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
}

/* Elegant CSS triangle pointer */
.bnt-label-container::after {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border-style: solid;
    border-width: 6px;
    pointer-events: none;
}

.bnt-dir-ltr .bnt-label-container::after {
    border-color: transparent transparent transparent currentColor; /* JS overrides or defaults to label text color */
}

/* Pulsing Badge Icon */
.bnt-badge-pulse {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin: 0 8px;
    animation: bntPulse 1.5s infinite ease-in-out;
}

@keyframes bntPulse {
    0% { transform: scale(0.8); opacity: 0.5; }
    50% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(0.8); opacity: 0.5; }
}

/* Marquee Track Content */
.bnt-content-container {
    flex: 1;
    overflow: hidden;
    height: 100%;
    display: flex;
    align-items: center;
    position: relative;
}

.bnt-marquee-track {
    display: flex;
    width: max-content;
    height: 100%;
    align-items: center;
    will-change: transform;
}

/* Animating Marquee */
.bnt-dir-ltr .bnt-marquee-track {
    animation: bntScrollLTR linear infinite;
}

.bnt-dir-rtl .bnt-marquee-track {
    animation: bntScrollRTL linear infinite;
}

/* Pause on hover feature */
.bnt-pause-yes:hover .bnt-marquee-track,
.bnt-ticker-wrapper.bnt-paused .bnt-marquee-track {
    animation-play-state: paused !important;
}

/* Static state when content fits without scrolling */
.bnt-ticker-wrapper.bnt-no-scroll .bnt-marquee-track {
    animation: none !important;
    transform: none !important;
    width: 100% !important;
}

.bnt-ticker-wrapper.bnt-no-scroll .bnt-marquee-content {
    width: 100% !important;
    justify-content: flex-start !important;
}

.bnt-ticker-wrapper.bnt-no-scroll .bnt-marquee-content:last-child {
    display: none !important;
}

.bnt-ticker-wrapper.bnt-no-scroll .bnt-pause-play {
    display: none !important;
}

/* Content block styling */
.bnt-marquee-content {
    display: flex;
    align-items: center;
    white-space: nowrap;
    padding: 0 10px;
}

/* Individual News Items */
.bnt-news-item {
    display: inline-flex;
    align-items: center;
    padding: 0 15px;
    font-size: 14px;
    font-weight: 600;
}

.bnt-news-item a {
    text-decoration: none;
    transition: color 0.2s ease;
    outline: none;
}

.bnt-news-item a:hover {
    text-decoration: underline;
}

.bnt-separator {
    margin: 0 20px;
    opacity: 0.3;
    font-size: 10px;
    user-select: none;
}

/* Interactive Controls Container */
.bnt-controls-container {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 10px;
    z-index: 10;
    background: inherit;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.bnt-dir-rtl .bnt-controls-container {
    border-right: none;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.bnt-control-btn {
    background: none;
    border: none;
    padding: 6px;
    margin: 0 2px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.bnt-control-btn svg {
    display: block;
    pointer-events: none;
}

/* Keyframes animations */
@keyframes bntScrollLTR {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

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

/* Responsive adjustment */
@media (max-width: 768px) {
    .bnt-ticker-wrapper {
        height: 44px;
    }
    .bnt-label-container {
        padding: 0 12px;
        font-size: 12px;
    }
    .bnt-news-item {
        font-size: 12px;
        padding: 0 8px;
    }
    .bnt-separator {
        margin: 0 12px;
    }
    .bnt-control-btn {
        padding: 4px;
    }
}

