/**
 * article-embeds.css — embed-related styles for SmartMowBot article pages
 *
 * ⚠️ ERP contract: post_optimizer's `apply_plan_to_page_shell` injects "external video
 * card" blocks using the selectors below, and shared_assets.py flags the site as
 * "has_missing" if this file is absent. Keep the class names byte-identical.
 *
 * Tokens: #16A34A turf · #15803D deep green · #1F2937 ground · #E2E5DE line
 *         #F5F7F4 wash · #6B7280 muted · Archivo (table headers) + Inter (body)
 */

/* ========== External video card (YouTube/Vimeo watch card) — ERP injected ========== */

.external-video-card {
    margin: 1.75rem 0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(31, 41, 55, 0.16);
    background: #111827;
}

.external-video-card-link {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    width: 100%;
    color: #fff;
    text-decoration: none;
    overflow: hidden;
}

.external-video-card-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.external-video-card-link:hover .external-video-card-image {
    transform: scale(1.03);
}

.external-video-card-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 68px;
    height: 48px;
    background: rgba(15, 23, 42, 0.78);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.25s ease, transform 0.25s ease;
}

/* Hover fills with the brand turf rather than the platform red — the card sits inside
   SmartMowBot article copy, and a saturated red is the only non-palette hue on the page. */
.external-video-card-link:hover .external-video-card-play {
    background: #16A34A;
    transform: translate(-50%, -50%) scale(1.05);
}

.external-video-card-play::before {
    content: '';
    display: block;
    width: 0;
    height: 0;
    border-left: 14px solid #fff;
    border-top: 9px solid transparent;
    border-bottom: 9px solid transparent;
    margin-left: 3px;
}

.external-video-card-caption {
    padding: 0.85rem 1rem;
    background: #F5F7F4;
    color: #1F2937;
    font-size: 0.92rem;
    border-top: 1px solid #E2E5DE;
}

/* ========== Inline iframes (fallback for non-ERP-injected embeds) ========== */

.article-content iframe[src*="youtube"],
.article-content iframe[src*="youtu.be"],
.article-content iframe[src*="vimeo"] {
    aspect-ratio: 16 / 9;
    width: 100%;
    max-width: 100%;
    height: auto;
    border: 0;
    border-radius: 10px;
    margin: 1.5rem 0;
    display: block;
}

/* Twitter / X embed */
.article-content .twitter-tweet {
    margin: 1.75rem auto !important;
}

/* Code */
.article-content code {
    background: rgba(22, 163, 74, 0.10);
    color: #15803D;
    padding: 0.15em 0.4em;
    border-radius: 4px;
    font-size: 0.92em;
    font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}

.article-content pre {
    background: #1F2937;
    color: #E5E7EB;
    padding: 1.15rem 1.35rem;
    border-radius: 10px;
    overflow-x: auto;
    margin: 1.5rem 0;
    line-height: 1.5;
}

.article-content pre code {
    background: transparent;
    color: inherit;
    padding: 0;
    font-size: 0.9em;
}

/* Blockquote callout */
.article-content blockquote {
    border-left: 4px solid #16A34A;
    background: #F5F7F4;
    padding: 0.9rem 1.25rem;
    margin: 1.5rem 0;
    color: #4B5563;
    font-style: italic;
    border-radius: 0 8px 8px 0;
}

/* Responsive table */
.article-content .table-wrap,
.article-content figure.wp-block-table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1.5rem 0;
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
}

.article-content th,
.article-content td {
    padding: 0.65rem 0.85rem;
    border-bottom: 1px solid #E2E5DE;
    text-align: left;
}

.article-content th {
    background: #F5F7F4;
    font-family: 'Archivo', 'Inter', system-ui, sans-serif;
    font-weight: 700;
    color: #1F2937;
}
