/* Daily News Plugin — Frontend Styles */

.dn-wrapper { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }

/* ── Language Tabs ─────────────────────────── */
.dn-lang-tabs {
    display: flex; flex-wrap: wrap; gap: 8px;
    margin-bottom: 16px; border-bottom: 2px solid #e5e7eb; padding-bottom: 8px;
}
.dn-tab {
    padding: 6px 18px; border-radius: 20px; border: 1.5px solid #d1d5db;
    background: #fff; cursor: pointer; font-size: 14px; font-weight: 500;
    color: #374151; transition: all .2s;
}
.dn-tab:hover, .dn-tab.active {
    background: #1d4ed8; color: #fff; border-color: #1d4ed8;
}

/* ── Controls ──────────────────────────────── */
.dn-controls {
    display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px;
}
.dn-search-input, .dn-cat-filter {
    padding: 8px 12px; border: 1px solid #d1d5db; border-radius: 6px;
    font-size: 14px; outline: none;
}
.dn-search-input { flex: 1; min-width: 200px; }
.dn-search-input:focus, .dn-cat-filter:focus { border-color: #1d4ed8; box-shadow: 0 0 0 3px rgba(29,78,216,.1); }

/* ── Grid Layout ───────────────────────────── */
.dn-articles-wrap.dn-layout-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* ── List Layout ───────────────────────────── */
.dn-articles-wrap.dn-layout-list { display: flex; flex-direction: column; gap: 16px; }
.dn-articles-wrap.dn-layout-list .dn-article-image {
    width: 140px; min-width: 140px; height: 100px; border-radius: 6px 0 0 6px;
}
.dn-articles-wrap.dn-layout-list .dn-article-link { display: flex; flex-direction: row; }
.dn-articles-wrap.dn-layout-list .dn-article-body { padding: 12px 16px; }

/* ── Article Card ──────────────────────────── */
.dn-article {
    background: #fff; border-radius: 10px; overflow: hidden;
    border: 1px solid #e5e7eb;
    transition: transform .2s, box-shadow .2s;
}
.dn-article:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,.1); }
.dn-article-link { text-decoration: none; color: inherit; display: flex; flex-direction: column; height: 100%; }

.dn-article-image {
    height: 180px; background-size: cover; background-position: center;
    background-color: #f3f4f6;
}

.dn-article-body { padding: 14px 16px; flex: 1; display: flex; flex-direction: column; }

.dn-article-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }

/* Language badges */
.dn-lang-badge {
    font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 10px;
    text-transform: uppercase; letter-spacing: .04em;
}
.dn-lang-badge-en { background: #dbeafe; color: #1e40af; }
.dn-lang-badge-ta { background: #fce7f3; color: #9d174d; }
.dn-lang-badge-kn { background: #d1fae5; color: #065f46; }
.dn-lang-badge-te { background: #fef3c7; color: #92400e; }
.dn-lang-badge-hi { background: #ede9fe; color: #5b21b6; }

.dn-source { font-size: 12px; color: #6b7280; }
.dn-category {
    font-size: 11px; color: #6b7280; background: #f3f4f6;
    padding: 2px 7px; border-radius: 8px; text-transform: capitalize;
}

.dn-article-title {
    font-size: 15px; font-weight: 600; color: #111827;
    margin: 0 0 8px; line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.dn-article:hover .dn-article-title { color: #1d4ed8; }

.dn-article-desc {
    font-size: 13px; color: #6b7280; margin: 0 0 10px; line-height: 1.5; flex: 1;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.dn-time { font-size: 12px; color: #9ca3af; margin-top: auto; }

/* ── Load More ─────────────────────────────── */
.dn-load-more-wrap { text-align: center; margin-top: 28px; }
.dn-load-more {
    padding: 10px 32px; background: #1d4ed8; color: #fff;
    border: none; border-radius: 6px; font-size: 15px; cursor: pointer;
    transition: background .2s;
}
.dn-load-more:hover { background: #1e40af; }
.dn-load-more:disabled { background: #9ca3af; cursor: not-allowed; }

.dn-empty { text-align: center; color: #6b7280; padding: 40px 0; font-size: 15px; }

/* ── Responsive ────────────────────────────── */
@media (max-width: 640px) {
    .dn-articles-wrap.dn-layout-grid { grid-template-columns: 1fr; }
    .dn-articles-wrap.dn-layout-list .dn-article-image { width: 100px; min-width: 100px; }
}
