

.zzz-popular-posts {
    margin-bottom: var(--space-xl);
}

.zzz-popular-posts__header {
    margin-bottom: var(--space-md);
}

.zzz-popular-posts__title {
    font-family: var(--font-heading);
    font-size: var(--font-size-lg);
    font-weight: 700;
    line-height: var(--line-height-heading);
    color: var(--color-text);
    margin: 0 0 var(--space-sm);
    padding-bottom: var(--space-xs);
    border-bottom: 2px solid var(--color-accent);
}


.zzz-popular-posts__tabs {
    display: flex;
    gap: var(--space-xs);
    flex-wrap: wrap;
}

.zzz-popular-posts__tab {
    padding: 2px var(--space-sm);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-bg);
    color: var(--color-text-muted);
    font-size: 13px;
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s, border-color 0.15s;
    line-height: 1.6;
}

.zzz-popular-posts__tab:hover {
    border-color: var(--color-accent);
    color: var(--color-text);
}

.zzz-popular-posts__tab--active {
    background: var(--color-accent);
    color: #fff;
    border-color: var(--color-accent);
}


.zzz-popular-posts__fallback-notice {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    margin: 0 0 var(--space-sm);
    font-style: italic;
}

.zzz-popular-posts__empty {
    color: var(--color-text-muted);
    text-align: center;
    padding: var(--space-lg) 0;
    font-size: var(--font-size-sm);
}


.zzz-popular-posts__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.zzz-popular-posts__item--hero {
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--color-surface);
}

.zzz-popular-posts__item--hero a {
    display: block;
    text-decoration: none;
    color: var(--color-text);
}

.zzz-popular-posts__hero-img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.zzz-popular-posts__hero-body {
    padding: var(--space-sm) var(--space-md);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.zzz-popular-posts__hero-body .zzz-popular-posts__rank {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    background-color: #FFD700;
    color: #fff;
    box-shadow: 0 1px 3px rgba(255, 215, 0, 0.4);
}

.zzz-popular-posts__hero-label {
    flex: 1;
    min-width: 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.zzz-popular-posts__item--hero a:hover {
    opacity: 0.9;
}

.zzz-popular-posts__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-sm);
    list-style: none;
    margin: 0;
    padding: 0;
}

.zzz-popular-posts__item--grid {
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--color-surface);
}

.zzz-popular-posts__item--grid a {
    display: block;
    text-decoration: none;
    color: var(--color-text);
}

.zzz-popular-posts__grid-img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.zzz-popular-posts__grid-body {
    padding: var(--space-xs) var(--space-sm);
    display: flex;
    align-items: flex-start;
    gap: 6px;
}

.zzz-popular-posts__grid-body .zzz-popular-posts__rank {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    background-color: var(--color-surface-hover);
    color: var(--color-text-muted);
    margin-top: 1px;
}

.zzz-popular-posts__item--grid:nth-child(1) .zzz-popular-posts__rank {
    background-color: #B0B0B0;
    color: #fff;
}

.zzz-popular-posts__item--grid:nth-child(2) .zzz-popular-posts__rank {
    background-color: #CD7F32;
    color: #fff;
}

.zzz-popular-posts__grid-label {
    flex: 1;
    min-width: 0;
    font-size: 12px;
    line-height: 1.35;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.zzz-popular-posts__item--grid a:hover {
    opacity: 0.9;
}


.zzz-popular-posts__panel {
    background: var(--card-bg, #fff);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.zzz-popular-posts__cards {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0;
    padding: 0;
}

.zzz-popular-posts__card {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: box-shadow 0.15s, transform 0.15s;
    position: relative;
}

.zzz-popular-posts__card a {
    display: block;
    text-decoration: none;
    color: var(--color-text);
}

.zzz-popular-posts__card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transform: translateY(-1px);
}

.zzz-popular-posts__card-img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
}

.zzz-popular-posts__card-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(4px);
}

.zzz-popular-posts__card:nth-child(1) .zzz-popular-posts__card-badge {
    background: #FFD700;
    box-shadow: 0 1px 3px rgba(255,215,0,0.5);
}

.zzz-popular-posts__card:nth-child(2) .zzz-popular-posts__card-badge {
    background: #B0B0B0;
}

.zzz-popular-posts__card:nth-child(3) .zzz-popular-posts__card-badge {
    background: #CD7F32;
}

.zzz-popular-posts__card-body {
    padding: 8px 10px;
}

.zzz-popular-posts__card-title {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--color-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}


.zzz-sidebar .zzz-popular-posts {
    padding-top: 0;
}


.zzz-top-articles__popular .zzz-popular-posts__list {
    max-width: var(--content-narrow);
    margin: 0 auto;
}


@media (max-width: 768px) {
    .zzz-popular-posts__grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-xs);
    }

    .zzz-popular-posts__grid-label {
        font-size: 11px;
    }
}
