/* ---------------------------------------------------------------------------
 * Link preview card
 * Location: /public_html/posts/assets/link-preview.css
 *
 * The article format shown inside a post container. Two things render it:
 *
 *   a pasted link      hydrated in the browser via the SSRF-guarded proxy
 *   a shared article   read from post_link_previews, stored at share time
 *
 * These rules already existed in /timeline/assets/style.css, but that file is
 * not linked by any page — so the markup rendered unstyled wherever it
 * appeared. Moved here, into a stylesheet the post surfaces actually load, so
 * both paths look the way they were designed to.
 * ------------------------------------------------------------------------- */

.post-link-preview {
    display: flex;
    gap: 12px;
    align-items: stretch;
    margin: 10px 0 2px;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    background: var(--surface, #fff);
    transition: border-color .15s, background .15s;
}
.post-link-preview:hover {
    border-color: var(--accent-blue, #3B82F6);
    background: var(--surface-2, #f8fafc);
}

.post-link-preview__img {
    width: 120px;
    min-height: 100%;
    object-fit: cover;
    flex: 0 0 auto;
    background: var(--surface-2, #f1f5f9);
}

.post-link-preview__body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 10px 12px;
    min-width: 0;
}
.post-link-preview__site {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text-muted, #64748b);
}
.post-link-preview__title {
    font-weight: 700;
    font-size: 14px;
    line-height: 1.3;
    color: var(--text-main, #0f172a);
    /* Two lines maximum: a long headline must not push the post apart. */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.post-link-preview__desc {
    font-size: 12.5px;
    line-height: 1.4;
    color: var(--text-muted, #64748b);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 560px) {
    .post-link-preview__img { width: 88px; }
}
