/**
 * Stock News styles
 */

/* News Container */
.sae-stock-news {
    margin: 20px 0;
}

/* List Format */
.sae-news-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sae-news-list .sae-news-item {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
}

.sae-news-list .sae-news-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.sae-news-list .sae-news-image {
    flex-shrink: 0;
    width: 120px;
    height: 90px;
    overflow: hidden;
    border-radius: 6px;
}

.sae-news-list .sae-news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sae-news-list .sae-news-content {
    flex-grow: 1;
}

.sae-news-list .sae-news-title {
    margin: 0 0 10px 0;
    font-size: 18px;
    line-height: 1.4;
}

.sae-news-list .sae-news-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s ease;
}

.sae-news-list .sae-news-title a:hover {
    color: #0073aa;
}

.sae-news-list .sae-news-description {
    margin: 0 0 12px 0;
    color: #666;
    line-height: 1.6;
}

.sae-news-list .sae-news-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #999;
}

.sae-news-list .sae-news-source {
    font-weight: 600;
    color: #666;
}

.sae-news-list .sae-news-separator {
    color: #ccc;
}

.sae-news-list .sae-news-category {
    background: #e0e0e0;
    padding: 2px 8px;
    border-radius: 3px;
    margin-left: 8px;
    font-size: 12px;
    color: #666;
}

/* Cards Format */
.sae-news-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.sae-news-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

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

.sae-news-card-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
}

.sae-news-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.sae-news-card:hover .sae-news-card-image img {
    transform: scale(1.05);
}

.sae-news-card-content {
    padding: 20px;
}

.sae-news-card-title {
    margin: 0 0 12px 0;
    font-size: 18px;
    line-height: 1.4;
}

.sae-news-card-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s ease;
}

.sae-news-card-title a:hover {
    color: #0073aa;
}

.sae-news-card-description {
    margin: 0 0 15px 0;
    color: #666;
    line-height: 1.6;
    font-size: 14px;
}

.sae-news-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
    font-size: 13px;
    color: #999;
}

.sae-news-cards .sae-news-source {
    font-weight: 600;
    color: #666;
}

/* Compact Format */
.sae-news-compact {
    list-style: none;
    margin: 0;
    padding: 0;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.sae-news-compact-item {
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s ease;
}

.sae-news-compact-item:last-child {
    border-bottom: none;
}

.sae-news-compact-item:hover {
    background: #f9f9f9;
}

.sae-news-compact-item a {
    color: #333;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    display: block;
    margin-bottom: 5px;
}

.sae-news-compact-item a:hover {
    color: #0073aa;
}

.sae-news-compact-meta {
    display: block;
    font-size: 12px;
    color: #999;
}

/* Attribution */
.sae-news-attribution {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
    text-align: center;
    color: #999;
    font-size: 12px;
}

/* Error States */
.sae-news-error,
.sae-news-empty,
.sae-news-disabled {
    background: #f0f0f0;
    padding: 20px;
    text-align: center;
    border-radius: 8px;
    color: #666;
}

.sae-news-error {
    background: #fee;
    color: #c33;
}

/* Responsive */
@media (max-width: 768px) {
    .sae-news-list .sae-news-item {
        flex-direction: column;
        gap: 15px;
    }
    
    .sae-news-list .sae-news-image {
        width: 100%;
        height: 200px;
    }
    
    .sae-news-cards {
        grid-template-columns: 1fr;
    }
    
    .sae-news-list .sae-news-meta {
        flex-wrap: wrap;
    }
    
    .sae-news-list .sae-news-category {
        margin-left: 0;
        margin-top: 5px;
    }
}

/* Integration with ticker analysis page */
.sae-info-box .sae-news-item {
    background: #fff;
    border: none;
    padding: 15px;
    border-bottom: 1px solid #eee;
    margin-bottom: 15px;
}

.sae-info-box .sae-news-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.sae-info-box .sae-news-item h4 {
    margin: 0 0 8px 0;
}

.sae-info-box .sae-news-item a {
    text-decoration: none;
    color: #0073aa;
}

.sae-info-box .sae-news-item a:hover {
    text-decoration: underline;
}