/* News Elements (moved from styles.css) */
.news-headlines {
    margin: 24px 0;
}

.news-item {
    background-color: var(--button-bg);
    border-radius: var(--button-radius);
    margin-bottom: 15px;
    padding: 9px 9px 9px 67px;
    max-width: 1200px;
    cursor: pointer;
    position: relative;
}

.news-item:hover {
    background-color: var(--button-bg);
}

.news-item:last-child {
    margin-bottom: 0;
}

.news-source {
    font-weight: 675;
    margin-right: 10px;
    font-size: 11.5pt;
}

.news-time {
    font-size: 12.5pt;
    margin-left: 5px;
    font-weight: 500;
    transition: color 0.3s ease, font-weight 0.3s ease;
}

.news-time.news-new-time {
    color: var(--tesla-blue);
    font-weight: 600;
}

/* Transition class for when an item is being marked as seen */
.news-time.news-seen-transition {
    transition: color 1.5s ease, font-weight 1.5s ease;
}

.news-title {
    color: var(--button-text);
    margin-top: 0px;
    padding-bottom: 5px;
    margin-right: 55px;
    font-size: 17pt;
    font-weight: 500;
}

.news-favicon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 5px;
    opacity: 0.8;
}

.share-icon {
    position: absolute;
    right: 3px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
}

body.dark-mode .share-icon img {
    filter: brightness(0) invert(0.8) grayscale(1);
}

/* News Source Grid (moved from styles.css) */
.news-source-grid {
    grid-template-columns: repeat(auto-fill, 310px);
    gap: 0px 10px;
    width: auto;
}

.news-toggle-item {
    padding: 9px 15px 9px 45px;
    margin-top: 7px;
    border-radius: 9px;
    width: auto;
    font-size: 15pt;
    position: relative;
}

.news-source-favicon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border-radius: 4px;
    opacity: 0.8;
}

/* Mobile adjustments for news-related elements */
@media only screen and (max-width: 900px) {
    .news-item {
        padding: 8px 8px 8px 50px;
    }

    .news-source {
        font-size: 11pt;
    }

    .news-time {
        font-size: 11pt;
    }

    .news-favicon {
        width: 28px;
        height: 28px;
        left: 11px;
    }

    .news-title {
        font-size: 12pt;
        margin-right: 40px;
    }

    .share-icon {
        transform: scale(75%) translateY(-65%);
        right: -3px;
    }

    /* News sources grid */
    .news-source-grid {
        grid-template-columns: repeat(auto-fill, 170px);
    }

    .news-toggle-item {
        font-size: 9pt;
        padding: 6px 8px;
        margin-top: 5px;
    }

    .news-source-favicon {
        display: none;
    }
}
