/**
 * Also Read - Related Posts Styles
 * Lightweight, responsive CSS with no external dependencies
 */

/* Container */
.arrp-container {
    background: #f9f9f9;
    border-left: 4px solid #0073aa;
    padding: 20px;
    margin: 30px 0;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Title */
.arrp-title {
    margin: 0 0 15px 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
}

/* Posts container */
.arrp-posts {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Individual post item */
.arrp-post-item {
    display: flex;
    align-items: center;
    gap: 15px;
    background: #ffffff;
    padding: 12px;
    border-radius: 4px;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    border: 1px solid #e5e5e5;
}

.arrp-post-item:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* Thumbnail */
.arrp-thumbnail {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 4px;
    overflow: hidden;
    display: block;
}

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

/* Placeholder for missing thumbnail */
.arrp-no-image {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: block;
}

/* Content area */
.arrp-content {
    flex: 1;
    min-width: 0; /* Prevent text overflow issues */
}

/* Post title */
.arrp-post-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.5;
}

.arrp-post-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s ease;
}

.arrp-post-title a:hover,
.arrp-post-title a:focus {
    color: #0073aa;
    text-decoration: underline;
}

/* Responsive Design */

/* Tablets and below */
@media screen and (max-width: 768px) {
    .arrp-container {
        padding: 15px;
        margin: 20px 0;
    }
    
    .arrp-title {
        font-size: 1.15rem;
        margin-bottom: 12px;
    }
    
    .arrp-thumbnail {
        width: 70px;
        height: 70px;
    }
    
    .arrp-post-title {
        font-size: 0.95rem;
    }
}

/* Mobile devices */
@media screen and (max-width: 480px) {
    .arrp-container {
        padding: 12px;
        margin: 15px 0;
    }
    
    .arrp-title {
        font-size: 1.1rem;
        margin-bottom: 10px;
    }
    
    .arrp-post-item {
        padding: 10px;
        gap: 12px;
    }
    
    .arrp-thumbnail {
        width: 60px;
        height: 60px;
    }
    
    .arrp-post-title {
        font-size: 0.9rem;
        line-height: 1.4;
    }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    .arrp-container {
        background: #1e1e1e;
        border-left-color: #4a9eff;
    }
    
    .arrp-title {
        color: #ffffff;
    }
    
    .arrp-post-item {
        background: #2a2a2a;
        border-color: #3a3a3a;
    }
    
    .arrp-post-title a {
        color: #e5e5e5;
    }
    
    .arrp-post-title a:hover,
    .arrp-post-title a:focus {
        color: #4a9eff;
    }
}

/* Print styles */
@media print {
    .arrp-container {
        box-shadow: none;
        border: 1px solid #ddd;
        break-inside: avoid;
    }
    
    .arrp-post-item:hover {
        transform: none;
        box-shadow: none;
    }
}

/* Accessibility improvements */
.arrp-thumbnail:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

.arrp-post-title a:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* Performance optimization - will-change for animations */
.arrp-post-item {
    will-change: transform, box-shadow;
}

/* Prevent layout shift */
.arrp-thumbnail img {
    aspect-ratio: 1 / 1;
}
