/**
 * Author Display Fixes
 * 
 * Fixes avatar sizes and author name proportions across the site
 *
 * @package OutputLag
 * @since 1.0.0
 */

/* ==========================================================================
   Post Cards - Author Display Fix
   ========================================================================== */

/* Standard post card author display */
.post-card .post-author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.post-card .post-author img {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px;
    min-height: 32px;
    border-radius: 50%;
    border: 2px solid var(--glass-border);
    object-fit: cover;
}

.post-card .author-name {
    font-size: 0.875rem !important;
    font-weight: 500;
    line-height: 1.2;
}

.post-card .author-name a {
    color: var(--color-text-secondary);
    text-decoration: none;
}

/* Featured content author display */
.featured-content .post-author img,
.featured-side-item .post-author img,
.hero-content .post-author img {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px;
    min-height: 36px;
}

.featured-content .author-name,
.featured-side-item .author-name,
.hero-content .author-name {
    font-size: 0.9375rem !important;
}

/* Main featured (hero) author display */
.featured-author img,
.hero-author img {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px;
    min-height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.featured-author .author-name,
.hero-author .author-name {
    font-size: 1rem !important;
    font-weight: 600;
}

/* Single post header author display */
.post-header .post-author img {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px;
    min-height: 48px;
}

.post-header .author-name {
    font-size: 1rem !important;
}

/* ==========================================================================
   Widget Author Display Fix
   ========================================================================== */

/* Trending widget */
.trending-item .post-author img {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px;
    min-height: 28px;
}

.trending-item .author-name {
    font-size: 0.8125rem !important;
}

/* Author profile widget */
.widget-author-avatar img {
    width: 80px !important;
    height: 80px !important;
}

.widget-author-info h3 {
    font-size: 1.125rem !important;
}

/* ==========================================================================
   Latest News Section Fix
   ========================================================================== */

.latest-news .post-card .post-author img {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px;
    min-height: 32px;
}

.latest-news .post-card .author-name {
    font-size: 0.875rem !important;
}

/* ==========================================================================
   General Author Display Rules
   ========================================================================== */

/* Ensure author info container doesn't grow too large */
.author-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0; /* Enable text truncation */
}

/* Author name should not wrap on small cards */
.post-card .author-name,
.trending-item .author-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

/* Fix author meta spacing */
.post-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.post-meta .post-author {
    flex-shrink: 0;
}

/* Ensure consistent vertical alignment */
.post-author {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */

@media (max-width: 768px) {
    /* Slightly smaller avatars on mobile */
    .post-card .post-author img {
        width: 28px !important;
        height: 28px !important;
        min-width: 28px;
        min-height: 28px;
    }
    
    .post-card .author-name {
        font-size: 0.8125rem !important;
    }
    
    /* Truncate author names more aggressively on mobile */
    .post-card .author-name {
        max-width: 100px;
    }
}

/* ==========================================================================
   Dark Mode Specific Fixes
   ========================================================================== */

.dark-mode .post-author img {
    border-color: rgba(255, 255, 255, 0.1);
}

.dark-mode .author-name a {
    color: rgba(255, 255, 255, 0.8);
}

.dark-mode .author-name a:hover {
    color: var(--color-primary-blue);
}