/**
 * BabyCru Article PR Banner Frontend Styles
 * Supports 6:5 base rectangle banners (336x280 / 300x250 / 672x560 / 600x500)
 * Centered on both PC (1440px) and SP (390px/393px) without breaking column width.
 */

.bc-article-pr {
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 32px auto;
    padding: 0;
    box-sizing: border-box;
    text-align: center;
    clear: both;
}

.bc-article-pr--middle {
    margin-top: 34px;
    margin-bottom: 36px;
}

.bc-article-pr--end {
    margin-top: 40px;
    margin-bottom: 32px;
}

.bc-article-pr__inner {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    /* 336px creative plus the surrounding frame; shrink within the article column. */
    max-width: 354px;
    margin: 0 auto;
    padding: 8px;
    border: 1px solid rgba(247, 221, 229, .9);
    border-radius: .85rem;
    background: #fff7f9;
    overflow: visible;
    box-sizing: border-box;
}

.bc-article-pr .bc-article-pr__header {
    position: absolute;
    z-index: 1;
    top: 0;
    right: 0;
    left: auto;
    transform: none;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: max-content;
    margin: 0;
    line-height: 1.2;
    pointer-events: none;
}

/* Beat Blocksy's later flow margin reset, without adding to the preceding margin. */
.bc-entry-content > .bc-article-pr {
    margin-top: 30px;
}

/* Match the community PR pill at the outer frame's top-right corner. */
.bc-article-pr__label,
.bc-article-pr__badge {
    display: inline-block;
    margin: 0;
    padding: 0 5px;
    font-size: 9px;
    font-weight: 700;
    line-height: 11px;
    letter-spacing: normal;
    white-space: nowrap;
    color: #e5749a;
    background: #fff;
    border: 1px solid rgba(229, 116, 154, .35);
    border-radius: 999px;
    box-shadow: none;
}

.bc-article-pr__link {
    display: block;
    width: 100%;
    max-width: 336px;
    margin: 0 auto;
    text-decoration: none;
    border-radius: 0;
    overflow: visible;
    transition: opacity 0.2s ease, transform 0.2s ease;
    line-height: 0;
}

.bc-article-pr__link:hover,
.bc-article-pr__link:focus-visible {
    opacity: 0.92;
}

/* Scope above the article-wide image rounding without changing other article images. */
.bc-article-pr .bc-article-pr__image,
.bc-article-pr .bc-article-pr__img {
    display: block;
    width: 100%;
    max-width: 336px;
    height: auto;
    aspect-ratio: 6 / 5;
    object-fit: contain;
    margin: 0 auto;
    border: 0;
    border-radius: 0;
    box-sizing: border-box;
    background-color: transparent;
}

@media (max-width: 480px) {
    .bc-article-pr {
        margin: 26px auto;
    }

    .bc-article-pr--middle {
        margin-top: 28px;
        margin-bottom: 30px;
    }

    .bc-article-pr--end {
        margin-top: 32px;
        margin-bottom: 26px;
    }

    .bc-article-pr__link,
    .bc-article-pr__image,
    .bc-article-pr__img {
        max-width: min(336px, 100%);
    }
}
