/* Link / blog previews.
   The old .extracted_url rules lived in stylesheet/style.css, which is no longer loaded, so the
   composer preview rendered the fetched image at its natural size. Both the composer preview and the
   posted card now crop the image into a fixed 1.91:1 frame (the og:image ratio) instead of stretching.
   Colours are translucent so the cards read in light and night mode without a mode switch. */

/* ---- Composer (publisher-box #results) ---- */
#results .extracted_url {
    position: relative;
    margin: 10px 12px;
    padding: 0;
    border: 1px solid rgba(127, 127, 127, .25);
    border-radius: 12px;
    overflow: hidden;
    max-width: 100%;
}
#results .extracted_url .extracted_thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 1.91 / 1;
    max-height: 220px;
    margin: 0;
    overflow: hidden;
    background: rgba(127, 127, 127, .12);
}
#results .extracted_url .extracted_thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
}
#results .extracted_url .extracted_content {
    padding: 8px 12px 10px;
}
#results .extracted_url .extracted_content > br { display: none; }
#results .extracted_url .form-control.url-input {
    width: 100%;
    border: 0;
    box-shadow: none;
    background: transparent;
    padding: 2px 0;
    height: auto;
}
#results .extracted_url input.form-control.url-input {
    font-weight: 600;
    font-size: 15px;
}
#results .extracted_url textarea.form-control.url-input {
    min-height: 40px;
    font-size: 13px;
    opacity: .75;
    resize: none;
}
#results .remove-fetched-url {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    width: 28px;
    height: 28px;
    line-height: 28px;
    text-align: center;
    border-radius: 50%;
    background: rgba(0, 0, 0, .55);
    color: #fff;
    font-size: 14px;
    text-shadow: none;
    cursor: pointer;
}
#results .thumb_select {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    padding: 2px 8px;
    border-radius: 12px;
    background: rgba(0, 0, 0, .55);
    color: #fff;
    font-size: 12px;
}
#results .thumb_select .thumb_sel { display: inline-block; width: auto; }
#results .thumb_select .thumb_sel span { cursor: pointer; margin-right: 6px; }

/* ---- Posted card (story/includes/fetched_url.phtml + blog.phtml) ---- */
div.post-fetched-url {
    border-radius: 12px;
    overflow: hidden;
}
div.post-fetched-url .post-fetched-url-con {
    position: relative;
    width: 100%;
    height: auto;
    aspect-ratio: 1.91 / 1;
    max-height: 300px;
    overflow: hidden;
    background: rgba(127, 127, 127, .12);
}
div.post-fetched-url .post-fetched-url-con img {
    display: block;
    float: none;
    width: 100%;
    height: 100%;
    max-width: 100%;
    object-fit: cover;
}

/* Site host label above the title (composer + feed). */
.extracted_url .fl-link-host,
.post-fetched-url .fl-link-host {
    font-size: 12px;
    line-height: 1.3;
    text-transform: uppercase;
    letter-spacing: .03em;
    opacity: .6;
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
div.post-fetched-url .fetched-url-text {
    margin: 0;
    padding: 10px 12px 12px;
}
div.post-fetched-url .fetched-url-text h4 {
    margin: 0 0 4px;
    line-height: 1.3;
}
div.post-fetched-url .fetched-url-text .description {
    font-size: 13px;
    opacity: .75;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
/* Placeholder art is designed for the frame; never letterbox it. */
.extracted_thumb.is-placeholder img,
.post-fetched-url-con.is-placeholder img {
    object-fit: cover;
}
