/*
 * mpr-seo-content — shared CSS for MPR SEO product/CMS descriptions (mpr-seo-row blocks).
 * Loaded by MyPrestaRocks\Front\SeoContent\SeoContentAssets on product + CMS pages.
 * Theme-aware: consumes the ThemeDetector custom properties (--mpr-*) with safe fallbacks,
 * so the same markup adapts to any storefront theme and degrades gracefully if the
 * theme-vars stylesheet is absent. No hardcoded brand palette, no inline styles.
 */

/* ---------- short description (image floats beside two paragraphs) ---------- */
.mpr-seo-short-img {
    float: right;
    width: 160px;
    max-width: 38%;
    height: auto;
    margin: 0 0 0.75rem 1.25rem;
    border-radius: var(--mpr-radius, 8px);
}

.mpr-seo-short-txt {
    overflow: hidden; /* contain the float */
}

.mpr-seo-short-txt p {
    margin: 0 0 0.875rem;
    color: var(--mpr-text-secondary, #4a4a5a);
}

.mpr-seo-short-txt p:last-child {
    margin-bottom: 0;
}

@media (max-width: 575.98px) {
    .mpr-seo-short-img {
        float: none;
        display: block;
        width: 100%;
        max-width: 100%;
        margin: 0 0 1rem;
    }
}

/* ---------- long description (alternating text / image rows) ---------- */
.mpr-seo-block {
    display: grid;
    gap: 0;
}

.mpr-seo-block .mpr-seo-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    align-items: center;
    padding: 1.5rem 0;
    margin: 0;
    border: 0;
    background: transparent;
}

@media (min-width: 900px) {
    .mpr-seo-block .mpr-seo-row {
        grid-template-columns: minmax(0, 1.3fr) minmax(14rem, 0.7fr);
    }

    .mpr-seo-block .mpr-seo-row--rev {
        grid-template-columns: minmax(14rem, 0.7fr) minmax(0, 1.3fr);
    }

    .mpr-seo-block .mpr-seo-row--rev .mpr-seo-row__txt {
        order: 2;
    }

    .mpr-seo-block .mpr-seo-row--rev .mpr-seo-row__img {
        order: 1;
    }

    /* text-only rows shouldn't leave a dangling empty column */
    .mpr-seo-block .mpr-seo-row:not(:has(.mpr-seo-row__img)) {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .mpr-seo-block .mpr-seo-row {
        padding: 0.75rem 0;
        gap: 1rem;
    }
}

.mpr-seo-row__txt h2 {
    margin: 0 0 0.625rem;
    color: var(--mpr-text, #1a1a2e);
    font-family: var(--mpr-font-family, inherit);
    font-size: 1.25rem;
    line-height: 1.3;
}

.mpr-seo-row__txt p {
    margin: 0 0 0.875rem;
    color: var(--mpr-text-secondary, #4a4a5a);
}

.mpr-seo-row__txt p:last-child {
    margin-bottom: 0;
}

.mpr-seo-row__txt a {
    color: var(--mpr-primary, #2b6cb0);
    text-decoration: underline;
}

.mpr-seo-row__txt ul,
.mpr-seo-row__txt ol {
    display: grid;
    gap: 0.375rem;
    margin: 0 0 0.875rem;
    padding-left: 1.25rem;
    color: var(--mpr-text, #1a1a2e);
}

.mpr-seo-row__txt ul { list-style: disc outside; }
.mpr-seo-row__txt ol { list-style: decimal outside; }

.mpr-seo-row__txt li::marker {
    color: var(--mpr-primary, #2b6cb0);
}

/* High specificity (.mpr-seo-block prefix) to override a stale flex layout in the
   theme custom.css (.mpr-seo-row__img { flex:0 0 35%; max-width:35% }) that
   shrink-wrapped images to ~156px inside the grid column. */
.mpr-seo-block .mpr-seo-row__img {
    display: block;
    flex: none;
    width: 100%;
    max-width: 100%;
    margin: 0;
}

.mpr-seo-block .mpr-seo-row__img img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: var(--mpr-radius, 8px);
    border: 1px solid var(--mpr-border, rgba(0, 0, 0, 0.08));
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
