/* ============================================
   News Ticker Module - Realtime News Feed
   Professional Dark Theme - Pure Black #000000
   ============================================ */

.news-ticker-module {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #000000;
    overflow: hidden;
    font-family: 'Inter', sans-serif;
}

/* Header */
.news-ticker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: #000000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.news-ticker-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.news-ticker-title i {
    color: #F39C12;
    font-size: 16px;
}

.news-ticker-title h2 {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    margin: 0;
    letter-spacing: 0.3px;
}

.news-ticker-live-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 4px;
}

.news-ticker-live-badge .live-dot {
    width: 6px;
    height: 6px;
    background: #22c55e;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

.news-ticker-live-badge span {
    color: #22c55e;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.news-ticker-controls {
    display: flex;
    gap: 8px;
}

.news-ticker-controls button {
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 4px;
    color: #888;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s;
}

.news-ticker-controls button:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

/* Filters Bar */
.news-ticker-filters {
    display: flex;
    gap: 6px;
    padding: 10px 20px;
    background: #000000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    flex-wrap: wrap;
}

.filter-btn {
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 4px;
    color: #666;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #888;
}

.filter-btn.active {
    background: rgba(243, 156, 18, 0.1);
    border-color: rgba(243, 156, 18, 0.3);
    color: #F39C12;
}

/* News List Container */
.news-ticker-list {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.news-ticker-list::-webkit-scrollbar {
    width: 6px;
}

.news-ticker-list::-webkit-scrollbar-track {
    background: transparent;
}

.news-ticker-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

/* News Item - Base Style */
.news-item {
    display: grid;
    grid-template-columns: 50px 140px 1fr;
    gap: 12px;
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    transition: background 0.15s;
    cursor: pointer;
    align-items: flex-start;
}

.news-item:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* Important/Highlighted Item - Red Border */
.news-item.important {
    border: 2px solid #ef4444;
    margin: 10px 16px;
    border-radius: 6px;
    background: rgba(239, 68, 68, 0.03);
    padding: 14px 18px;
}

.news-item.important:hover {
    background: rgba(239, 68, 68, 0.06);
}

/* Time Column */
.news-time {
    color: #555;
    font-size: 12px;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 500;
}

/* Category Column */
.news-category {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.news-category-flag {
    font-size: 14px;
    line-height: 1;
}

.news-category-badge {
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.news-category-badge.us {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.news-category-badge.canada {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.news-category-badge.eu {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

.news-category-badge.uk {
    background: rgba(139, 92, 246, 0.15);
    color: #a78bfa;
}

.news-category-badge.japan {
    background: rgba(236, 72, 153, 0.15);
    color: #f472b6;
}

.news-category-badge.central-bank {
    background: rgba(243, 156, 18, 0.15);
    color: #F39C12;
}

.news-category-badge.other {
    background: rgba(107, 114, 128, 0.15);
    color: #9ca3af;
}

/* Content Column */
.news-content {
    flex: 1;
    min-width: 0;
}

.news-headline {
    color: #d1d5db;
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 0;
}

.news-headline .indicator {
    color: #e5e5e5;
    font-weight: 500;
}

.news-headline .value {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    margin: 0 4px;
}

.news-headline .value.positive {
    color: #22c55e;
}

.news-headline .value.negative {
    color: #ef4444;
}

.news-headline .value.neutral {
    color: #f97316;
}

.news-headline .vs-exp {
    color: #666;
    margin: 0 6px;
}

.news-headline .expected {
    color: #888;
    font-family: 'JetBrains Mono', monospace;
}

.news-headline .previous {
    color: #555;
    font-size: 11px;
    font-family: 'JetBrains Mono', monospace;
    margin-left: 8px;
}

/* Reaction Box - Yellow/Orange Highlight */
.news-reaction {
    margin-top: 10px;
    padding: 10px 14px;
    background: rgba(243, 156, 18, 0.08);
    border-left: 3px solid #F39C12;
    border-radius: 0 4px 4px 0;
}

.news-reaction-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.news-reaction-icon {
    width: 8px;
    height: 8px;
    background: #F39C12;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.news-reaction-label {
    color: #888;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.news-reaction-time {
    color: #F39C12;
    font-size: 10px;
    font-family: 'JetBrains Mono', monospace;
}

.news-reaction-text {
    color: #F39C12;
    font-size: 12px;
    line-height: 1.5;
    font-weight: 500;
}

/* Icon Badge for important news */
.news-importance-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: #3b82f6;
    border-radius: 4px;
    margin-right: 10px;
}

.news-importance-badge i {
    color: #fff;
    font-size: 10px;
}

/* Additional News Details */
.news-details {
    display: flex;
    gap: 16px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
}

.news-detail-item {
    display: flex;
    gap: 6px;
    font-size: 11px;
}

.news-detail-label {
    color: #555;
}

.news-detail-value {
    color: #888;
    font-family: 'JetBrains Mono', monospace;
}

/* Footer */
.news-ticker-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background: #000000;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    font-size: 11px;
    color: #555;
}

.news-ticker-footer .live-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
}

.news-ticker-footer .live-dot {
    width: 6px;
    height: 6px;
    background: #22c55e;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

.news-ticker-footer .last-update {
    color: #666;
}

/* Time Separator */
.news-time-separator {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.01);
}

.news-time-separator .separator-line {
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.06);
}

.news-time-separator .separator-time {
    color: #555;
    font-size: 10px;
    font-family: 'JetBrains Mono', monospace;
    text-transform: uppercase;
}

/* Animation */
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.95); }
}

/* New Item Animation */
.news-item.new {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 1200px) {
    .news-item {
        grid-template-columns: 45px 120px 1fr;
        gap: 10px;
    }
}

@media (max-width: 900px) {
    .news-item {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    
    .news-time {
        display: inline;
        margin-right: 8px;
    }
    
    .news-category {
        display: inline-flex;
    }
    
    .news-ticker-filters {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 12px;
    }
}
