/**
 * PB Member Lock Badge — Styles
 * Subtle unlocked-lock overlay for exclusive posts in grids.
 * v1.1 — Pure CSS approach targeting Kadence's .tag-exclusive class.
 */

/* ===================================================================
   1. Kadence Post Grids (CSS-only — no JS needed)
   Kadence adds "tag-{slug}" classes to each article in its post grids.
   We target the image overlay wrapper inside exclusive-tagged articles.
   =================================================================== */

/* Ensure the image container is a positioning context */
.kt-blocks-post-grid-item.tag-exclusive .kt-image-overlay-wrap {
    position: relative;
}

/* The lock badge — rendered as a ::after pseudo-element */
.kt-blocks-post-grid-item.tag-exclusive .kt-image-overlay-wrap::after {
    content: '';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    background: rgba(0, 0, 0, 0.45);
    border-radius: 50%;
    z-index: 5;
    pointer-events: auto;
    cursor: default;

    /* Unlocked lock SVG as background image */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='11' width='18' height='11' rx='2' ry='2'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 9.9-1'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 14px 14px;

    transition: opacity 0.2s ease;
}

/* ===================================================================
   2. JS-injected badges (fallback for archive pages, search, etc.)
   The JS appends a <span class="pb-mlb-badge"> with an inline SVG.
   =================================================================== */

.pb-mlb-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    background: rgba(0, 0, 0, 0.45);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    cursor: default;
    z-index: 5;
    transition: opacity 0.2s ease;
}

.pb-mlb-badge svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: #ffffff;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Ensure the parent image wrapper is positioned for the JS overlay */
.pb-mlb-has-badge {
    position: relative !important;
}
