/**
 * WordPress Embed Custom Styles
 * 
 * Target: Standard WordPress oEmbed iframe template.
 * Goal: Create a premium "Card" look with the featured image at the top.
 */

/* Reset body margins within the iframe to prevent layout overflow */
body {
    margin: 0 !important;
    padding: 0 !important;
}

/* Main card container */
.wp-embed {
    padding: 0 !important;
    border: 1px solid #e0e0e0;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    background: #fff;
    overflow: hidden;
    box-sizing: border-box;
    height: auto !important;
    /* Ensure the container grows with the image */
}

/* Force the featured image to the top and ensure full visibility */
.wp-embed-featured-image {
    order: -1;
    margin: 0 0 15px 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    height: auto !important;
}

.wp-embed-featured-image a {
    display: block !important;
}

.wp-embed-featured-image img {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-width: 100% !important;
    display: block !important;
}

/* Metadata Styling (Author, Date, Category) */
.wp-embed-meta-custom {
    padding: 0 20px 10px;
    font-size: 13px;
    color: #888;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: -5px;
    margin-bottom: 5px;
}

.wp-embed-author {
    font-weight: 600;
    color: #444;
}

.wp-embed-category {
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
    background: #f4f4f4;
    padding: 2px 8px;
    border-radius: 4px;
    color: #666;
}

/* Horizontal padding for all text elements */
.wp-embed-heading,
.wp-embed-excerpt,
.wp-embed-footer,
.wp-embed-meta-custom {
    padding-left: 20px;
    padding-right: 20px;
}

/* Title Styling */
.wp-embed-heading {
    margin: 0 0 10px;
    font-size: 22px;
    line-height: 1.3;
}

.wp-embed-heading a {
    text-decoration: none;
    color: #333;
}

.wp-embed-heading a:hover {
    text-decoration: underline;
}

/* Description / Excerpt Styling */
.wp-embed-excerpt {
    line-height: 1.5;
    color: #555;
    margin-bottom: 15px;
}

.wp-embed-excerpt p {
    margin: 0 !important;
}

/* Metadata Styling (Author, Date, Category) */
.wp-embed-meta-custom {
    padding: 0 20px 20px;
    font-size: 13px;
    color: #888;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.wp-embed-author {
    font-weight: 600;
    color: #444;
}

.wp-embed-category {
    text-transform: uppercase;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.8px;
    background: #f0f0f0;
    padding: 3px 8px;
    border-radius: 3px;
    color: #555;
}

/* Hide the default WordPress embed footer (Site Title, Logo, Share) */
.wp-embed-footer {
    display: none;
}