/* Live News Stats Dashboard Styles */
.lns-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Loading State */
.lns-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    color: #64748b;
}

.lns-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e2e8f0;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: lns-spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes lns-spin {
    to { transform: rotate(360deg); }
}

/* Cards Grid */
.lns-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* Card Styles */
.lns-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease, transform 0.2s ease;
}

.lns-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.lns-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.lns-card-title {
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.lns-card-badge {
    font-size: 12px;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 12px;
    text-transform: uppercase;
}

.lns-badge-live {
    background: #dcfce7;
    color: #166534;
}

.lns-badge-alert {
    background: #fee2e2;
    color: #991b1b;
}

.lns-badge-time {
    background: #f3f4f6;
    color: #6b7280;
}

.lns-card-value {
    font-size: 48px;
    font-weight: 700;
    color: #3b82f6;
    line-height: 1;
    margin: 12px 0;
}

.lns-card-description {
    font-size: 13px;
    color: #6b7280;
    margin: 0;
}

/* Sentiment Card Special Styling */
.lns-card.sentiment-positive .lns-card-value {
    color: #10b981;
}

.lns-card.sentiment-negative .lns-card-value {
    color: #ef4444;
}

/* Expandable Sections */
.lns-section {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
}

.lns-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.lns-section-title {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

/* Tickers List */
.lns-tickers-list {
    display: grid;
    gap: 10px;
    max-height: 400px;
    overflow-y: auto;
}

.lns-ticker-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #f9fafb;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.lns-ticker-item:hover {
    background: #f3f4f6;
}

.lns-ticker-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lns-ticker-rank {
    font-size: 12px;
    color: #9ca3af;
    font-weight: 600;
    min-width: 24px;
}

.lns-ticker-symbol {
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
}

.lns-ticker-relevance {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

.lns-relevance-high {
    background: #dcfce7;
    color: #166534;
}

.lns-relevance-medium {
    background: #fef3c7;
    color: #92400e;
}

.lns-ticker-right {
    text-align: right;
}

.lns-ticker-mentions {
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
}

.lns-ticker-label {
    font-size: 11px;
    color: #9ca3af;
}

/* Sources List */
.lns-sources-list {
    display: grid;
    gap: 12px;
    max-height: 400px;
    overflow-y: auto;
}

.lns-source-item {
    padding: 12px;
    background: #f9fafb;
    border-radius: 8px;
}

.lns-source-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.lns-source-name {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
}

.lns-source-count {
    font-size: 14px;
    font-weight: 700;
    color: #3b82f6;
}

.lns-source-bar {
    width: 100%;
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
}

.lns-source-bar-fill {
    height: 100%;
    background: linear-gradient(to right, #3b82f6, #8b5cf6);
    transition: width 0.3s ease;
}

/* Sentiment Details Grid */
.lns-sentiment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
}

.lns-sentiment-item {
    text-align: center;
    padding: 16px;
    background: #f9fafb;
    border-radius: 8px;
}

.lns-sentiment-label {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 8px;
}

.lns-sentiment-value {
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
}

.lns-sentiment-value.positive {
    color: #10b981;
}

.lns-sentiment-value.negative {
    color: #ef4444;
}

/* Refresh Button */
.lns-refresh-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #3b82f6;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    margin: 20px auto;
    display: block;
}

.lns-refresh-btn:hover {
    background: #2563eb;
}

.lns-refresh-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

/* Error State */
.lns-error {
    text-align: center;
    padding: 40px 20px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 12px;
    color: #991b1b;
}

/* Responsive Design */
@media (max-width: 768px) {
    .lns-cards-grid {
        grid-template-columns: 1fr;
    }
    
    .lns-card-value {
        font-size: 36px;
    }
    
    .lns-sentiment-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Scrollbar Styling */
.lns-tickers-list::-webkit-scrollbar,
.lns-sources-list::-webkit-scrollbar {
    width: 8px;
}

.lns-tickers-list::-webkit-scrollbar-track,
.lns-sources-list::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 4px;
}

.lns-tickers-list::-webkit-scrollbar-thumb,
.lns-sources-list::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

.lns-tickers-list::-webkit-scrollbar-thumb:hover,
.lns-sources-list::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}
