/**
 * Another Read - Frontend Display Styles
 * Styles for the related content appended to single posts
 */

.ar-related-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.ar-related-section h3 {
    margin-bottom: 24px;
    font-size: 24px;
    font-weight: 700;
}

/* Grid Layout for Books */
.ar-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 24px;
}

.ar-related-item {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.ar-related-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.ar-related-thumbnail {
    background: #f9f9f9;
    aspect-ratio: 2/3;
    overflow: hidden;
}

.ar-related-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ar-related-thumbnail .ar-thumbnail-placeholder {
    width: 100%;
    height: 100%;
    background: #e0e0e0;
}

.ar-related-item .ar-related-details {
    padding: 16px;
}

.ar-related-item h4 {
    margin: 0 0 8px;
    font-size: 16px;
    line-height: 1.4;
}

.ar-related-item h4 a {
    text-decoration: none;
    color: inherit;
}

.ar-related-details h4 a:hover {
    color: #0073aa;
}

/* Book Contributors */
.ar-book-contributors {
    margin: 8px 0 12px 0;
    font-size: 14px;
    color: #666;
    font-style: italic;
}

.ar-book-contributors a {
    color: #666;
    text-decoration: none;
    transition: color 0.2s;
}

.ar-book-contributors a:hover {
    color: #0073aa;
    text-decoration: underline;
}

/* BookBuy Integration */
.ar-bookbuy-section {
    margin-top: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    border-left: 4px solid #0073aa;
}

.ar-bookbuy-section h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 20px;
    font-weight: 600;
}

/* List Layout for Contributors */
.ar-related-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ar-related-item-list {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px;
    background: #f9f9f9;
    border-radius: 8px;
}

.ar-related-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.ar-related-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ar-related-item-list h4 {
    margin: 0;
    font-size: 18px;
}

.ar-meta-item {
    font-size: 13px;
    color: #666;
    margin-top: 4px;
}

@media (max-width: 600px) {
    .ar-related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}