/**
 * Watchlist styles
 */

/* Grid Layout */
.sae-watchlist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin: 20px 0;
}

/* List Layout */
.sae-watchlist-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 20px 0;
}

.sae-watchlist-list .sae-watchlist-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
}

/* Watchlist Item */
.sae-watchlist-item {
    background: #fff;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    padding: 24px;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.sae-watchlist-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.12);
    border-color: #d0d0d0;
}

/* Sentiment-based borders */
.sae-watchlist-item.sentiment-buy {
    border-color: #4CAF50;
}

.sae-watchlist-item.sentiment-sell {
    border-color: #f44336;
}

.sae-watchlist-item.sentiment-hold {
    border-color: #FF9800;
}

.sae-watchlist-item.sentiment-reduce {
    border-color: #ff5722;
}

.sae-watchlist-item.sentiment-add {
    border-color: #2196F3;
}

/* Stale items */
.sae-watchlist-item.is-stale {
    opacity: 0.7;
    border-style: dashed;
}

/* Ticker Header */
.ticker-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 15px;
}

.ticker-title {
    flex-grow: 1;
}

.ticker-symbol {
    margin: 0 0 4px 0;
    font-size: 28px;
    font-weight: 800;
    color: #1a1a1a;
    letter-spacing: -0.5px;
}

.ticker-symbol a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.ticker-symbol a:hover {
    color: #0073aa;
}

.company-name {
    display: block;
    font-size: 13px;
    color: #666;
    font-weight: 500;
}

/* New Indicator */
.new-indicator {
    background: linear-gradient(135deg, #ff6b6b, #ff5252);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 8px rgba(255, 82, 82, 0.3);
}

.new-indicator.pulse {
    animation: pulse 2s infinite;
}

.new-count {
    font-size: 13px;
}

.new-text {
    font-size: 10px;
    letter-spacing: 0.5px;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Sentiment Box */
.ticker-sentiment-box {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sentiment-label {
    font-size: 13px;
    color: #666;
    font-weight: 500;
}

.sentiment-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    color: white;
    letter-spacing: 0.5px;
}

.sentiment-badge.sentiment-buy {
    background: #4CAF50;
}

.sentiment-badge.sentiment-sell {
    background: #f44336;
}

.sentiment-badge.sentiment-hold {
    background: #FF9800;
}

.sentiment-badge.sentiment-reduce {
    background: #ff5722;
}

.sentiment-badge.sentiment-add {
    background: #2196F3;
}

/* Stats */
.ticker-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.stat-item {
    text-align: center;
    padding: 16px 8px;
    border-radius: 8px;
    background: #f8f9fa;
    transition: all 0.2s ease;
    text-decoration: none;
    display: block;
}

.stat-clickable {
    cursor: pointer;
}

.stat-clickable:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

.stat-count {
    display: block;
    font-size: 28px;
    font-weight: 800;
    color: #1a1a1a;
    line-height: 1;
    margin-bottom: 4px;
}

.stat-label {
    display: block;
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.stat-deep-dives {
    background: #e3f2fd;
}

.stat-deep-dives:hover {
    background: #bbdefb;
}

.stat-deep-dives .stat-count {
    color: #1976d2;
}

.stat-mentions {
    background: #f3e5f5;
}

.stat-mentions:hover {
    background: #e1bee7;
}

.stat-mentions .stat-count {
    color: #7b1fa2;
}

.stat-zero .stat-count {
    color: #999;
}

.stat-zero {
    opacity: 0.7;
    cursor: default;
    background: #f5f5f5 !important;
}

.stat-zero:hover {
    transform: none !important;
    background: #f5f5f5 !important;
}

.stat-zero.no-posts {
    background: #fafafa !important;
    border: 1px dashed #ddd;
}

/* Date */
.ticker-date {
    font-size: 13px;
    color: #666;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ticker-date.stale {
    color: #f44336;
    font-weight: 600;
}

.date-label {
    font-weight: 600;
}

/* Sentiment Distribution Bar */
.ticker-sentiment-bar {
    margin-top: 15px;
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
}

.sentiment-segment {
    height: 100%;
    transition: width 0.3s ease;
}

.sentiment-segment.sentiment-buy {
    background: #4CAF50;
}

.sentiment-segment.sentiment-sell {
    background: #f44336;
}

.sentiment-segment.sentiment-hold {
    background: #FF9800;
}

.sentiment-segment.sentiment-reduce {
    background: #ff5722;
}

.sentiment-segment.sentiment-add {
    background: #2196F3;
}

/* Notices */
.sae-notice {
    background: #f0f0f0;
    padding: 20px;
    text-align: center;
    border-radius: 8px;
    color: #666;
}

/* Responsive */
@media (max-width: 768px) {
    .sae-watchlist-grid {
        grid-template-columns: 1fr;
    }
    
    .ticker-stats {
        flex-wrap: wrap;
    }
    
    .stat-item {
        min-width: 80px;
    }
}

/* Market Data */
.ticker-market-data {
    background: linear-gradient(to right, #f8f9fa, #fff);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid #e9ecef;
}

.ticker-market-data .price {
    font-size: 24px;
    font-weight: 800;
    color: #1a1a1a;
    letter-spacing: -0.5px;
}

.ticker-market-data .change-positive {
    color: #16a34a;
    font-weight: 700;
    font-size: 16px;
}

.ticker-market-data .change-negative {
    color: #dc2626;
    font-weight: 700;
    font-size: 16px;
}

/* News Indicator */
.ticker-latest-news {
    margin-top: 10px;
}

.news-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #f0f0f0;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
}

.news-indicator:hover {
    background: #e0e0e0;
    color: #333;
}

.news-indicator .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Compact Layout */
.sae-watchlist-compact .sae-watchlist-item {
    padding: 12px 15px;
}

.sae-watchlist-compact .ticker-symbol {
    font-size: 18px;
}

.sae-watchlist-compact .ticker-stats {
    padding: 8px 0;
}

.sae-watchlist-compact .stat-count {
    font-size: 18px;
}

.sae-watchlist-compact .ticker-sentiment-bar {
    height: 4px;
}

.sae-watchlist-compact .ticker-market-data {
    font-size: 14px;
}

.sae-watchlist-compact .news-indicator {
    font-size: 11px;
    padding: 2px 8px;
}