/* ============================================
   REDDIT ARCHIVE EXPLORER - REPOST CARD
   Compact card of the original post, embedded
   where a post's body preview would go.
   Used by index.php, subreddit.php, user.php.
   ============================================ */

.repost-card {
    margin-top: 12px;
    border: 1px solid #edeff1;
    border-left: 3px solid #0079d3;
    border-radius: 8px;
    background: #fbfcfd;
    overflow: hidden;
    transition: border-color 0.2s, background 0.2s;
}

.repost-card:hover {
    background: #f6f7f8;
    border-left-color: #ff4500;
}

/* --- "Crossposted from r/x" strip --- */

.repost-card-origin {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 14px;
    font-size: 0.75rem;
    color: #7c7c7c;
    background: #f6f7f8;
    border-bottom: 1px solid #edeff1;
}

.repost-card-origin i {
    color: #0079d3;
}

.repost-card-origin a {
    color: #0079d3;
    font-weight: 600;
    text-decoration: none;
}

.repost-card-origin a:hover {
    text-decoration: underline;
}

.repost-origin-unknown {
    font-style: italic;
}

/* --- Body of the card --- */

.repost-card-inner {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 12px 14px;
    text-decoration: none;
    color: inherit;
}

a.repost-card-inner:hover .repost-card-title {
    color: #0079d3;
    text-decoration: underline;
}

.repost-card-main {
    flex: 1;
    min-width: 0;   /* lets long titles wrap instead of stretching the card */
}

.repost-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1a1a1b;
    line-height: 1.35;
    margin-bottom: 6px;
}

.repost-card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    font-size: 0.78rem;
    color: #7c7c7c;
    margin-bottom: 8px;
}

.repost-card-meta a {
    color: #0079d3;
    text-decoration: none;
}

.repost-card-meta a:hover {
    text-decoration: underline;
}

.repost-author-deleted {
    color: #ff4500;
}

.repost-card-tag {
    background: #e9f0f5;
    color: #0079d3;
    padding: 1px 8px;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 500;
}

.repost-card-text {
    font-size: 0.85rem;
    line-height: 1.45;
    color: #5a5a5a;
}

/* --- Thumbnail --- */
/* .post-image-preview is reused so the page's image toggle blurs it too;
   these rules only shrink it to thumbnail size. */

.repost-card .repost-card-thumb {
    flex: 0 0 110px;
    width: 110px;
    margin-top: 0;
    border-radius: 6px;
}

.repost-card .repost-card-thumb img {
    width: 110px;
    height: 110px;
    max-height: 110px;
    object-fit: cover;
    border-radius: 6px;
}

.repost-card .repost-card-thumb .image-overlay {
    border-radius: 6px;
}

.repost-card .repost-card-thumb .image-overlay span {
    padding: 4px 10px;
    font-size: 0.7rem;
    text-align: center;
}

/* --- Original not archived --- */

.repost-card-missing {
    border-left-color: #c4c4c4;
    background: #fafafa;
}

.repost-card-missing:hover {
    border-left-color: #c4c4c4;
}

.repost-card-unavailable {
    color: #7c7c7c;
    font-style: italic;
    font-weight: 500;
}

/* --- Responsive --- */

@media (max-width: 768px) {
    .repost-card-inner {
        flex-direction: column;
    }

    .repost-card .repost-card-thumb,
    .repost-card .repost-card-thumb img {
        width: 100%;
        flex-basis: auto;
    }

    .repost-card .repost-card-thumb img {
        height: auto;
        max-height: 200px;
        object-fit: contain;
    }
}
