/**
 * DigiNews Plus - Posts List Widget Stylesheet
 * Graphic Style & Text-Only Style with Interactive Tab Switching
 */

/* Widget Wrapper */
.dn-posts-list-wrap,
.dn-tabbed-posts-widget {
    width: 100%;
}

/* Tabbed Navigation Header */
.dn-tabbed-header {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.dn-tab-nav {
    display: flex;
    background: #f1f3f5;
    padding: 3px;
    border-radius: 8px;
    gap: 4px;
}

.dn-tab-btn {
    flex: 1;
    border: none;
    background: transparent;
    padding: 7px 10px;
    font-size: 12px;
    font-weight: 700;
    color: #495057;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.dn-tab-btn:hover {
    color: #111;
}

.dn-tab-btn.is-active {
    background: #ffffff;
    color: var(--digital-newspaper-global-preset-color-1, #E50914);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Posts Items Container */
.dn-posts-list-items {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* =========================================
   1. GRAPHIC STYLE
   ========================================= */
.dn-item-graphic {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 8px;
    background: #fafbfc;
    border-radius: 8px;
    border: 1px solid #edf0f5;
    transition: all 0.25s ease;
}

.dn-item-graphic:hover {
    background: #ffffff;
    border-color: #dee2e6;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

.dn-item-media {
    position: relative;
    width: 85px;
    height: 68px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background: #212529;
}

.dn-item-thumb-link {
    display: block;
    width: 100%;
    height: 100%;
}

.dn-item-thumb-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.dn-item-graphic:hover .dn-item-thumb-link img {
    transform: scale(1.08);
}

.dn-item-empty-thumb {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 18px;
}

.dn-item-rank {
    position: absolute;
    top: 3px;
    left: 3px;
    background: rgba(0, 0, 0, 0.7);
    color: #ffffff;
    font-size: 10px;
    font-weight: 800;
    padding: 1px 5px;
    border-radius: 3px;
    z-index: 2;
}

.dn-item-rank.dn-rank-1 {
    background: var(--digital-newspaper-global-preset-color-1, #E50914);
}
.dn-item-rank.dn-rank-2 {
    background: #ff5722;
}
.dn-item-rank.dn-rank-3 {
    background: #ff9800;
}

.dn-item-content {
    flex-grow: 1;
    min-width: 0;
}

.dn-item-cat {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--digital-newspaper-global-preset-color-1, #E50914);
    display: inline-block;
    margin-bottom: 2px;
}

.dn-item-title {
    font-size: 13px;
    line-height: 1.35;
    font-weight: 700;
    margin: 0 0 5px 0;
}

.dn-item-title a {
    color: #212529;
    text-decoration: none;
    transition: color 0.2s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.dn-item-title a:hover {
    color: var(--digital-newspaper-global-preset-color-1, #E50914);
}

.dn-item-meta {
    font-size: 11px;
    color: #888888;
    display: flex;
    gap: 10px;
}

/* =========================================
   2. TEXT-ONLY STYLE
   ========================================= */
.dn-item-text {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 10px 12px;
    background: #fafbfc;
    border-radius: 8px;
    border-left: 3px solid #dee2e6;
    border-top: 1px solid #edf0f5;
    border-right: 1px solid #edf0f5;
    border-bottom: 1px solid #edf0f5;
    transition: all 0.25s ease;
}

.dn-item-text:hover {
    background: #ffffff;
    border-left-color: var(--digital-newspaper-global-preset-color-1, #E50914);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transform: translateX(3px);
}

.dn-text-rank {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    background: #e9ecef;
    color: #495057;
    font-size: 12px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-family: monospace;
}

.dn-text-rank.dn-rank-1 {
    background: var(--digital-newspaper-global-preset-color-1, #E50914);
    color: #ffffff;
}

.dn-text-content {
    flex-grow: 1;
    min-width: 0;
}

.dn-text-cat {
    font-size: 10px;
    font-weight: 800;
    color: var(--digital-newspaper-global-preset-color-1, #E50914);
    text-transform: uppercase;
    display: block;
    margin-bottom: 2px;
}

.dn-text-title {
    font-size: 13px;
    line-height: 1.4;
    font-weight: 600;
    margin: 0 0 4px 0;
}

.dn-text-title a {
    color: #212529;
    text-decoration: none;
    transition: color 0.2s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.dn-text-title a:hover {
    color: var(--digital-newspaper-global-preset-color-1, #E50914);
}

.dn-text-meta {
    font-size: 11px;
    color: #888888;
}

.dn-no-posts {
    font-size: 13px;
    color: #777;
    margin: 0;
    padding: 10px;
}
