/**
 * PMN Related Posts Styles
 *
 * Modern card-based layout for related posts
 * Uses CSS variables for customizable theming
 *
 * @package PMN_Article
 * @since 2.1.7
 */

/* Container - CSS Variables are set inline via PHP */
.pmna-related-posts {
    --rp-title-color: #22c55e;
    --rp-category-color: #22c55e;
    --rp-hover-color: #22c55e;
    --rp-time-color: #9ca3af;
    --rp-accent-rgb: 34, 197, 94;

    background: #fff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Header */
.pmna-related-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.pmna-related-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--rp-title-color);
    line-height: 1.3;
}

.pmna-related-view-all {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--rp-title-color);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 20px;
    background: rgba(var(--rp-accent-rgb), 0.1);
    transition: all 0.2s ease;
}

.pmna-related-view-all:hover {
    background: rgba(var(--rp-accent-rgb), 0.2);
    color: var(--rp-title-color);
    filter: brightness(0.9);
}

.pmna-related-view-all svg {
    width: 14px;
    height: 14px;
}

/* List */
.pmna-related-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Item */
.pmna-related-item {
    display: flex;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    padding: 10px;
    margin: -10px;
    border-radius: 12px;
    transition: background 0.2s ease;
}

.pmna-related-item:hover {
    background: #f8f9fa;
}

/* Image */
.pmna-related-image-wrapper {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 10px;
    overflow: hidden;
    background: #f5f5f5;
}

.pmna-related-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.pmna-related-item:hover .pmna-related-image {
    transform: scale(1.08);
}

.pmna-related-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    color: #bbb;
}

/* Content */
.pmna-related-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    gap: 6px;
}

/* Meta (Category + Time) */
.pmna-related-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

.pmna-related-category {
    color: var(--rp-category-color);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.pmna-related-time {
    color: var(--rp-time-color);
    font-weight: 400;
}

/* Post Title */
.pmna-related-post-title {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
    color: #1f2937;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.pmna-related-item:hover .pmna-related-post-title {
    color: var(--rp-hover-color);
}

/* Responsive */
@media (max-width: 480px) {
    .pmna-related-posts {
        padding: 16px;
        border-radius: 12px;
    }

    .pmna-related-header {
        margin-bottom: 12px;
        padding-bottom: 10px;
    }

    .pmna-related-title {
        font-size: 16px;
    }

    .pmna-related-view-all {
        font-size: 12px;
        padding: 5px 10px;
    }

    .pmna-related-image-wrapper {
        width: 70px;
        height: 70px;
    }

    .pmna-related-post-title {
        font-size: 13px;
    }

    .pmna-related-meta {
        font-size: 11px;
    }
}
