/**
 * News list – zarif, kompakt liste; zaman dilimi bölümleri (In the last 5 minutes, Today, 01 Feb)
 */

/* Page header: h1 + Suggest/Add Source button */
.page-header__title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-md);
    flex-wrap: wrap;
    margin-bottom: var(--spacing-sm);
}
.page-header__title-row .page-header__title {
    margin-bottom: 0;
    flex: 1 1 auto;
    min-width: 0;
}
.news-source-request-trigger {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
    padding: 0.35rem 0.6rem !important;
    font-size: 0.8rem !important;
    font-weight: 500;
    border-radius: var(--radius-sm, 6px);
}
.news-source-request-trigger i {
    font-size: 0.75rem !important;
}
.news-source-request-trigger__label {
    font-size: 0.8rem;
}
@media (max-width: 640px) {
    .page-header__title-row {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Kategori filtreleri: daha küçük butonlar, admin’de tanımlı ikon/renk */
.news-category-filters .games-platform-filters__list {
    gap: var(--spacing-xs);
}
.news-category-filters .games-platform-filter {
    padding: 0.35rem 0.6rem;
    font-size: 0.75rem;
}
.news-category-filters .games-platform-filter__icon {
    font-size: 0.75rem;
}
.news-category-filters .games-platform-filter::before {
    width: 12px;
    height: 12px;
}
/* Özel renkli kategori: ikon ve hover’da renk; aktifte arka plan + beyaz yazı (light’ta da okunur) */
.news-category-filters .news-category-filter[style*="--news-cat-color"] .games-platform-filter__icon i {
    color: var(--news-cat-color);
}
.news-category-filters .news-category-filter[style*="--news-cat-color"]:hover {
    border-color: var(--news-cat-color);
    color: var(--news-cat-color);
}
.news-category-filters .news-category-filter[style*="--news-cat-color"].games-platform-filter--active {
    background: var(--news-cat-color);
    border-color: var(--news-cat-color);
    color: #fff;
}
.news-category-filters .news-category-filter[style*="--news-cat-color"].games-platform-filter--active .games-platform-filter__icon i {
    color: #fff;
}
.news-category-filters .news-category-filter[style*="--news-cat-color"].games-platform-filter--active::before {
    border-color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: inset 0 0 0 2px var(--news-cat-color);
}
.news-category-filters .news-category-filter[style*="--news-cat-color"].games-platform-filter--active:hover {
    background: var(--news-cat-color);
    border-color: var(--news-cat-color);
    color: #fff;
}

/* Zaman bölümü: başlık + liste */
.news-list__time-section {
    margin-bottom: 1.25rem;
}

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

/* Nazik hr: tag pill'lerin üstü ve altı */
.news-tag-pills-hr {
    border: none;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    margin: 0.6rem 0;
    opacity: 0.85;
}
[data-theme="dark"] .news-tag-pills-hr {
    border-top-color: rgba(255, 255, 255, 0.06);
}

/* Tag pills wrapper: clip 2 satır, More View ile 2'şer satır açılır */
.news-tag-pills-wrapper {
    --news-tag-pills-row-height: 1.65rem;
    margin: 0 0 0.25rem 0;
}
.news-tag-pills-clip {
    max-height: calc(2 * var(--news-tag-pills-row-height) + 0.35rem);
    overflow: hidden;
    transition: max-height 0.25s ease;
}
.news-tag-pills-more-view {
    display: inline-block;
    margin: 0.25rem 0 0 0.75rem;
    padding: 0;
    font-size: 0.7rem;
    color: var(--color-primary);
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: underline;
}
.news-tag-pills-more-view:hover {
    color: var(--color-primary-hover, var(--color-primary));
}
.news-tag-pills-more-view.is-hidden {
    display: none;
}

/* Tag pills: "Showing up to 500..." hemen üstünde; ufak #tag stili */
.news-tag-pills {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
    margin: 0;
    padding: 0 0.75rem;
}
.news-tag-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-secondary, rgba(0, 0, 0, 0.04));
    border: 1px solid var(--border-color, rgba(0, 0, 0, 0.08));
    border-radius: 999px;
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.news-tag-pill:hover {
    color: var(--color-primary);
    border-color: var(--color-primary);
    background: transparent;
}
.news-tag-pill--active {
    color: var(--text-inverse, #fff);
    background: var(--color-primary);
    border-color: var(--color-primary);
}
.news-tag-pill--active:hover {
    color: var(--text-inverse, #fff);
    background: var(--color-primary);
    border-color: var(--color-primary);
}

/* Nazik ayırıcı: "Showing up to X latest news" üstü */
.news-list__divider {
    border: 0;
    height: 1px;
    margin: 1rem 0 0.5rem 0;
    background: linear-gradient(to right, transparent, var(--border-color, rgba(0, 0, 0, 0.08)), transparent);
}

/* Sort notu: Popular (son 3 gün) / Latest (en fazla X haber) */
.news-list__sort-note {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin: 0 0 0.75rem 0;
    padding: 0 0.75rem;
    line-height: 1.4;
}

.news-list__time-section-title {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    margin: 0 0 0.5rem 0;
    padding: 0 0.75rem;
    line-height: 1.3;
    display: flex;
    align-items: center;
}
.news-list__time-section-title .fa-clock {
    margin-right: 0.35rem;
    opacity: 0.85;
}

.news-list__time-section-list {
    gap: 0;
    border-radius: var(--radius-md);
    overflow: hidden;
}

/* View more news (load more) */
.news-list__load-more {
    margin-top: 1.5rem;
    text-align: center;
}

.news-list__load-more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-primary);
    background: transparent;
    border: 1px solid var(--color-primary);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.news-list__load-more-btn:hover:not(:disabled) {
    background: var(--color-primary);
    color: var(--text-inverse);
}

.news-list__load-more-btn:disabled {
    opacity: 0.7;
    cursor: wait;
}

.news-list__load-more-btn .news-list__load-more-loading i {
    margin-right: 0.25rem;
}

#newsListWrapper .games-list.list-view,
#newsListWrapper .news-list__time-section-list.games-list.list-view {
    gap: 0;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.news-list__skeleton-block {
    margin-top: 0.5rem;
    gap: 0;
    border-radius: var(--radius-md);
    overflow: hidden;
}

/* Satır: ince çizgi, hover’da sol vurgu + arka plan */
.news-list-item {
    min-height: 0;
    padding: 0;
    border-radius: 0;
    border: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    background: transparent;
    transition: background 0.2s ease, border-color 0.2s ease;
}

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

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

.news-list-item .list-item__thumbnail {
    display: none;
}

.news-list-item .list-item__content {
    min-height: 0;
    flex: 1;
}

/* Band: sol = saat (link dışı, yukarıdan aşağı), sağ = main (üstte başlık+source, altta badges) */
.news-list-item {
    display: flex;
    flex-direction: row;
    align-items: stretch;
}

/* Sol: saat – link dışında, bandın tam yüksekliğinde, metin dikey ortada */
.news-list-item__time {
    flex-shrink: 0;
    width: 3rem;
    padding: 0.5rem 0.5rem 0.5rem 0.75rem;
    font-size: 0.6875rem;
    color: var(--text-tertiary);
    text-align: right;
    font-variant-numeric: tabular-nums;
    background: rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

/* Sağ: main = üstte link (başlık+source), altta badges */
.news-list-item__main {
    flex: 1 1 0%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.news-list-item__content {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
    overflow: hidden;
    padding: 0.5rem 0.75rem 0.35rem 0.75rem;
}

.news-list-item__title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.4;
    min-width: 0;
    overflow-wrap: break-word;
    word-break: normal;
    transition: color 0.2s ease;
}

/* Sadece başlık tıklanabilir; source/meta link değil */
.news-list-item__title .news-list-item__link {
    display: inline;
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

.news-list-item__title .news-list-item__link:hover {
    color: var(--color-primary);
}

/* Badges – #tag, oyun, firma (link yok, main içinde altta) */
.news-list-item__badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 6px;
    padding: 0.2rem 0.75rem 0.5rem 0.75rem;
    min-height: 0;
}
.news-list-item__badge {
    display: inline-block;
    padding: 0.18rem 0.45rem;
    font-size: 0.65rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    border: 1px solid transparent;
    text-decoration: none;
    cursor: pointer;
}
.news-list-item__badge--games {
    background: rgba(99, 102, 241, 0.15);
    color: #6366f1;
    border-color: rgba(99, 102, 241, 0.4);
}
.news-list-item__badge--games:hover {
    background: #6366f1;
    color: #fff;
    border-color: #6366f1;
}
.news-list-item__badge--companies {
    background: rgba(245, 158, 11, 0.15);
    color: #d97706;
    border-color: rgba(245, 158, 11, 0.4);
}
.news-list-item__badge--companies:hover {
    background: #d97706;
    color: #fff;
    border-color: #d97706;
}

.news-list-item__badge--tag {
    background: rgba(0, 0, 0, 0.06);
    color: var(--text-secondary);
    border-color: rgba(0, 0, 0, 0.1);
}
.news-list-item__badge--tag:hover {
    background: rgba(0, 0, 0, 0.1);
    color: var(--text-primary);
}

.news-list-item__badge--tag-no-link {
    cursor: default;
}

.news-list-item__meta {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    min-width: 0;
}

.news-list-item__source {
    font-size: 0.75rem;
    color: var(--text-secondary);
    opacity: 0.9;
    font-weight: 400;
    flex-shrink: 0;
}

.news-list-item__arrow {
    flex-shrink: 0;
    width: 1.125rem;
    height: 1.125rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: var(--text-tertiary);
    font-size: 0.5625rem;
    opacity: 0.5;
    transition: opacity 0.2s ease, color 0.2s ease;
}

/* Dark mode */
[data-theme="dark"] .news-list-item {
    border-bottom-color: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .news-list-item__time {
    background: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .news-list-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

[data-theme="dark"] .news-list-item__arrow {
    color: var(--text-tertiary);
}

[data-theme="dark"] .news-list-item__badge--games {
    background: rgba(99, 102, 241, 0.2);
    color: #818cf8;
}
[data-theme="dark"] .news-list-item__badge--games:hover {
    background: #6366f1;
    color: #fff;
}
[data-theme="dark"] .news-list-item__badge--companies {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}
[data-theme="dark"] .news-list-item__badge--companies:hover {
    background: #d97706;
    color: #fff;
}
[data-theme="dark"] .news-list-item__badge--tag {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    border-color: rgba(255, 255, 255, 0.12);
}
[data-theme="dark"] .news-list-item__badge--tag:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
}

/* Mobil: başlık 2 satır, badges wrap */
@media (max-width: 768px) {
    .news-list-item__time {
        width: 2.75rem;
        padding-left: 0.4rem;
        font-size: 0.625rem;
    }
    .news-list-item__content {
        padding-left: 0.5rem;
    }
    .news-list-item__badges {
        padding-left: 0.5rem;
    }
    .news-list-item__badge {
        max-width: 140px;
        font-size: 0.6875rem;
        padding: 0.2rem 0.45rem;
    }
}

/* News Source Request Modal (Suggest / Add Source) */
.news-source-request-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2200;
}
.news-source-request-modal.active {
    display: flex;
}
.news-source-request-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
}
.news-source-request-modal__content {
    position: relative;
    width: min(520px, 92vw);
    max-height: 90vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 18px;
    padding: 28px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.25);
    z-index: 1;
}
[data-theme="dark"] .news-source-request-modal__content {
    background: #1f2937;
    color: #f3f4f6;
}
.news-source-request-modal__close {
    position: absolute;
    top: 18px;
    right: 18px;
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #9ca3af;
    cursor: pointer;
}
.news-source-request-modal__header {
    margin-bottom: var(--spacing-md);
}
.news-source-request-modal__title {
    margin: 0;
    font-size: 1.2rem;
}
.news-source-request-modal__description {
    margin: 6px 0 4px;
    color: #4b5563;
    font-size: 0.95rem;
    line-height: 1.5;
}
[data-theme="dark"] .news-source-request-modal__description {
    color: #d1d5db;
}
.news-source-request-modal__tabs {
    display: flex;
    gap: 4px;
    margin-bottom: var(--spacing-md);
}
.news-source-request-modal__tab {
    padding: 8px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f9fafb;
    color: #6b7280;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.news-source-request-modal__tab:hover {
    background: #f3f4f6;
    color: #111827;
}
.news-source-request-modal__tab--active {
    background: var(--color-primary, #6366f1);
    border-color: var(--color-primary, #6366f1);
    color: #fff;
}
[data-theme="dark"] .news-source-request-modal__tab {
    border-color: #374151;
    background: #374151;
    color: #d1d5db;
}
[data-theme="dark"] .news-source-request-modal__tab--active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}
.news-source-request-form__panel {
    display: block;
}
.news-source-request-form__panel--hidden {
    display: none;
}
.news-source-request-form__hint {
    margin: 0 0 12px 0;
    font-size: 0.9rem;
    color: #6b7280;
}
.news-source-request-form__note {
    margin: 0 0 12px 0;
    font-size: 0.85rem;
    padding: 10px 12px;
    border-radius: 8px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}
.news-source-request-form__note--warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}
[data-theme="dark"] .news-source-request-form__note--warning {
    background: rgba(245, 158, 11, 0.15);
    color: #fcd34d;
    border-color: #d97706;
}
.news-source-request-form__group {
    margin-bottom: var(--spacing-md);
}
.news-source-request-form__group label {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 0.9rem;
}
.news-source-request-form__group .required {
    color: #dc2626;
}
.news-source-request-form__input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.95rem;
}
.news-source-request-form__actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: var(--spacing-md);
    padding-top: var(--spacing-md);
    border-top: 1px solid #e5e7eb;
}
[data-theme="dark"] .news-source-request-form__actions {
    border-top-color: #374151;
}

