/* Cosmic Grandfathers only. Preserve the site's Poppins/Inter and gold buttons. */
#smh-cosmic-replays {
    box-sizing: border-box;
    width: 100% !important;
    max-width: 1320px !important;
    margin: 0 auto !important;
    padding: 56px 40px !important;
}
#smh-cosmic-replays .smh-cosmic-content {
    width: 100%;
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 !important;
    box-sizing: border-box;
    color: #000;
    font-family: "Inter", sans-serif;
    font-size: 16px;
    line-height: 1.75;
}
#smh-cosmic-replays :is(h2, h3, h4):not(.Elite_video_player *) {
    font-family: "Poppins", sans-serif !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
    text-transform: none !important;
    text-align: center !important;
    color: #000 !important;
    margin: 0 0 20px !important;
}
#smh-cosmic-replays h2:first-of-type { font-size: 36px !important; }
#smh-cosmic-replays h3 { font-size: 24px !important; }
#smh-cosmic-replays h4 { font-size: 22px !important; }
#smh-cosmic-replays :is(p, li):not(.Elite_video_player *) {
    font-family: "Inter", sans-serif !important;
    font-size: 16px !important;
    color: #000 !important;
    line-height: 1.75 !important;
}
#smh-cosmic-replays .smh-cosmic-content > :is(section, div) > p,
#smh-cosmic-replays .smh-cosmic-content > section > div > p {
    max-width: 900px;
    margin: 0 auto 20px;
}
#smh-cosmic-replays .smh-cosmic-content ul:not(.Elite_video_player *) {
    max-width: 860px;
    margin: 0 auto 28px;
    text-align: left;
}
#smh-cosmic-replays .smh-cosmic-content li:not(.Elite_video_player *) { margin-bottom: 8px; }
#smh-cosmic-replays .smh-cosmic-content img:not(.Elite_video_player *) {
    max-width: 100%;
    height: auto;
}
#smh-cosmic-replays .smh-cosmic-content a[style*="background"] {
    min-height: 48px;
    min-width: 168px;
    max-width: 100%;
    box-sizing: border-box;
    font-family: "Inter", sans-serif;
    text-align: center;
    vertical-align: middle;
    margin: 8px auto 0;
}
#smh-cosmic-replays .smh-cosmic-content a:focus-visible {
    outline: 2px solid #052b4a;
    outline-offset: 4px;
}
/* Index cards: restore image paragraphs suppressed by the old positional rules,
   keep the six existing destinations, and align each row's replay buttons. */
body.page-id-32908736 #smh-cosmic-replays .smh-cosmic-authorized > section > article {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}
body.page-id-32908736 #smh-cosmic-replays .smh-cosmic-authorized > section > article > p:has(> img),
body.page-id-32908736 #smh-cosmic-replays .smh-cosmic-authorized > section > article > div:first-of-type > p:has(> img) {
    width: auto !important;
    height: auto !important;
    flex: 0 0 auto !important;
    overflow: visible !important;
    margin: 0 0 20px !important;
}
body.page-id-32908736 #smh-cosmic-replays .smh-cosmic-authorized > section > article > :is(img, p:has(> img)) {
    width: 100% !important;
    height: 260px !important;
    margin: 0 0 24px !important;
    background: #fff;
    border-radius: 8px;
    object-fit: contain;
}
body.page-id-32908736 #smh-cosmic-replays .smh-cosmic-authorized > section > article > p > img {
    width: 100% !important;
    height: 100% !important;
    max-height: 260px;
    object-fit: contain;
}
body.page-id-32908736 #smh-cosmic-replays .smh-cosmic-authorized > section > article > div:first-of-type {
    justify-content: center;
    align-items: center;
    min-height: 72px;
}
body.page-id-32908736 #smh-cosmic-replays .smh-cosmic-authorized > section > article > div:first-of-type > p:has(> img) {
    width: 64px !important;
    margin: 0 !important;
}
body.page-id-32908736 #smh-cosmic-replays .smh-cosmic-authorized > section > article h4 { margin: 0 !important; }
body.page-id-32908736 #smh-cosmic-replays .smh-cosmic-authorized > section > article > p:not(:has(> img)) { text-align: left; }
body.page-id-32908736 #smh-cosmic-replays .smh-cosmic-authorized > section > article > ul { width: 100%; box-sizing: border-box; }
body.page-id-32908736 #smh-cosmic-replays .smh-cosmic-authorized > section > article > div:last-child {
    margin-top: auto !important;
    padding-top: 16px;
    text-align: center;
}
/* The purchase state uses the same presentation whether signed in or signed out. */
#smh-cosmic-replays .smh-cosmic-purchase > section {
    display: block !important;
    max-width: 920px;
    margin: 0 auto;
    text-align: center;
}
#smh-cosmic-replays .smh-cosmic-purchase > section > h2:nth-of-type(2) {
    font-family: "Inter", sans-serif !important;
    font-size: 18px !important;
    font-weight: 500 !important;
    line-height: 1.7 !important;
    padding: 24px !important;
    margin: 28px auto 24px !important;
    background: #f7f5f2 !important;
    border: 1px solid #e7dfd2 !important;
    border-radius: 12px;
}
#smh-cosmic-replays .smh-cosmic-purchase > section > p { text-align: center; }
#smh-cosmic-replays .smh-cosmic-purchase img { border-radius: 12px; }
/* Individual day introduction and player remain in their original order. */
body:not(.page-id-32908736) #smh-cosmic-replays .smh-cosmic-authorized img:not(.Elite_video_player *) {
    max-height: 340px;
    object-fit: contain;
    margin: 12px auto 24px;
}
body:not(.page-id-32908736) #smh-cosmic-replays .smh-cosmic-authorized p:not(.Elite_video_player *) { text-align: left; }
#smh-cosmic-replays .Elite_video_player { max-width: 100%; margin: 32px auto; }
/* Legacy day-page reviews were six unwrapped columns, wider than a phone. */
body:not(.page-id-32908736) #smh-cosmic-replays .smh-cosmic-authorized div[style*="#e5e9ec"] {
    padding: 28px !important;
    margin: 36px 0 !important;
    background: transparent !important;
}
body:not(.page-id-32908736) #smh-cosmic-replays .smh-cosmic-authorized div[style*="#e5e9ec"] > div[style*="display:flex"] {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}
body:not(.page-id-32908736) #smh-cosmic-replays .smh-cosmic-authorized div[style*="#e5e9ec"] > div[style*="display:flex"] > div {
    min-width: 0;
    padding: 24px !important;
    border: 1px solid #e7dfd2;
    border-radius: 12px;
    background: #f7f5f2;
    text-align: left;
}
body:not(.page-id-32908736) #smh-cosmic-replays .smh-cosmic-authorized div[style*="#e5e9ec"] > div[style*="display:flex"] img,
body:not(.page-id-32908736) #smh-cosmic-replays .smh-cosmic-authorized div[style*="#e5e9ec"] > div:first-of-type img {
    width: 156px;
    max-width: 100%;
    margin: 12px 0 16px;
}
body:not(.page-id-32908736) #smh-cosmic-replays .smh-cosmic-authorized div[style*="margin:20px 0"]:has(a[href*="-replay/"]):not(:has(.Elite_video_player)) {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 12px;
}
body:not(.page-id-32908736) #smh-cosmic-replays .smh-cosmic-authorized div[style*="margin:20px 0"]:has(a[href*="-replay/"]) > p {
    margin: 0;
}
body:not(.page-id-32908736) #smh-cosmic-replays .smh-cosmic-authorized iframe:not(.Elite_video_player iframe) {
    width: 100%;
    max-width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    border: 0;
    border-radius: 12px;
    margin: 0;
}
/* Public landing page: retain its Elementor design, tidy content and CTA spacing. */
body.page-id-32878080 [data-elementor-id="32878080"] > .e-con { padding-left: 40px; padding-right: 40px; }
body.page-id-32878080 [data-elementor-id="32878080"] .elementor-widget-button { align-self: center; text-align: center; }
body.page-id-32878080 [data-elementor-id="32878080"] .elementor-button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; }
body.page-id-32878080 [data-elementor-id="32878080"] .elementor-element-b51f3bf { padding-top: 32px; padding-bottom: 48px; }
body.page-id-32878080 [data-elementor-id="32878080"] .elementor-element-acb973c .elementor-widget-heading { margin-top: 0; margin-bottom: 0; }
body.page-id-32878080 [data-elementor-id="32878080"] .elementor-element-acb973c .elementor-widget-text-editor { margin-top: 0; margin-bottom: 0; }
body.page-id-32878080 [data-elementor-id="32878080"] .elementor-element-acb973c .elementor-widget-icon-list { margin-top: 0; margin-bottom: 0; }
@media (max-width: 1024px) {
    #smh-cosmic-replays { padding: 40px 28px !important; }
    body.page-id-32908736 #smh-cosmic-replays .smh-cosmic-authorized > section { gap: 24px; }
    body.page-id-32878080 [data-elementor-id="32878080"] > .e-con { padding-left: 28px; padding-right: 28px; }
    body.page-id-32878080 [data-elementor-id="32878080"] .elementor-element-b3776c6 .elementor-swiper-button-prev { left: -20px !important; }
    body.page-id-32878080 [data-elementor-id="32878080"] .elementor-element-b3776c6 .elementor-swiper-button-next { right: -20px !important; }
}
@media (max-width: 767px) {
    #smh-cosmic-replays { padding: 36px 20px !important; }
    #smh-cosmic-replays h2:first-of-type { font-size: 28px !important; }
    #smh-cosmic-replays h3 { font-size: 20px !important; }
    #smh-cosmic-replays h4 { font-size: 20px !important; }
    #smh-cosmic-replays .smh-cosmic-purchase > section > h2:nth-of-type(2) { padding: 20px !important; font-size: 16px !important; }
    #smh-cosmic-replays .smh-cosmic-content a[style*="background"] { min-width: 180px; }
    body:not(.page-id-32908736) #smh-cosmic-replays .smh-cosmic-authorized div[style*="#e5e9ec"] { padding: 0 !important; }
    body:not(.page-id-32908736) #smh-cosmic-replays .smh-cosmic-authorized div[style*="#e5e9ec"] > div[style*="display:flex"] { grid-template-columns: 1fr; }
    body.page-id-32878080 [data-elementor-id="32878080"] > .e-con { padding-left: 20px; padding-right: 20px; }
    body.page-id-32878080 [data-elementor-id="32878080"] .elementor-element-b51f3bf { padding-top: 24px; padding-bottom: 36px; }
}

/* Day 1–6 testimonial embeds: spacing belongs on the wrapper, not its absolute iframe. */
body:not(.page-id-32908736) #smh-cosmic-replays .smh-cosmic-authorized div[style*="56.25%"]:has(> iframe) {
    box-sizing: border-box;
    position: relative;
    width: 100%;
    max-width: 960px;
    height: auto;
    padding: 0 !important;
    aspect-ratio: 16 / 9;
    margin: 24px auto 36px !important;
    overflow: hidden;
    border-radius: 12px;
    background: #000;
    box-shadow: 0 8px 24px rgb(5 43 74 / 10%);
}
body:not(.page-id-32908736) #smh-cosmic-replays .smh-cosmic-authorized div[style*="56.25%"] > iframe {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none;
    margin: 0 !important;
    padding: 0 !important;
    border: 0;
    border-radius: inherit;
    display: block;
}
/* This existing testimonial is portrait footage; retain its complete frame and controls. */
body:not(.page-id-32908736) #smh-cosmic-replays .smh-cosmic-authorized div[style*="56.25%"]:has(> iframe:is([src*="/1053665073"], [data-src*="/1053665073"])) {
    max-width: 360px;
    aspect-ratio: 9 / 16;
}
/* Each existing previous/next pair stays together, including the wpautop paragraph variants. */
body:not(.page-id-32908736) #smh-cosmic-replays .smh-cosmic-authorized :is(div, p):has(> a[href*="/the-cosmic-grandfathers-january-2025"][href*="replay/"]) {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 16px;
    width: 100%;
    max-width: 960px;
    margin: 24px auto 40px !important;
    padding: 0 !important;
    text-align: center !important;
}
body:not(.page-id-32908736) #smh-cosmic-replays .smh-cosmic-authorized :is(div, p):has(> a[href*="/the-cosmic-grandfathers-january-2025"][href*="replay/"]) > br {
    display: none;
}
body:not(.page-id-32908736) #smh-cosmic-replays .smh-cosmic-authorized a[href*="/the-cosmic-grandfathers-january-2025"][href*="replay/"] {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    min-width: 180px;
    margin: 0 !important;
    line-height: 1.4;
}
body:not(.page-id-32908736) #smh-cosmic-replays .smh-cosmic-authorized p:empty:not(.Elite_video_player *) {
    display: none;
}
body:not(.page-id-32908736) #smh-cosmic-replays .smh-cosmic-authorized p:has(> img):not(.Elite_video_player *) {
    text-align: center !important;
}
body:not(.page-id-32908736) #smh-cosmic-replays .smh-cosmic-authorized div:has(> img[alt="preview"]) {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin: 16px auto 32px;
}
body:not(.page-id-32908736) #smh-cosmic-replays .smh-cosmic-authorized div:has(> img[alt="preview"]) > br {
    display: none;
}
body:not(.page-id-32908736) #smh-cosmic-replays .smh-cosmic-authorized img[alt="preview"] {
    width: 28px;
    height: 28px;
    object-fit: contain;
    margin: 0;
}
@media (max-width: 767px) {
    body:not(.page-id-32908736) #smh-cosmic-replays .smh-cosmic-authorized div[style*="56.25%"]:has(> iframe) {
        margin-top: 20px !important;
        margin-bottom: 28px !important;
    }
    body:not(.page-id-32908736) #smh-cosmic-replays .smh-cosmic-authorized a[href*="/the-cosmic-grandfathers-january-2025"][href*="replay/"] {
        width: 100%;
        max-width: 264px;
    }
}


/* Days 2–6 only: account for each legacy review and navigation markup variant. */
@scope (body:is(.page-id-32910151, .page-id-32910159, .page-id-32910170, .page-id-32910179, .page-id-32910189)) {
    /* Days 2/4 use articles; Days 3/6 use divs; Day 5 wraps its Read more button. */
    #smh-cosmic-replays :is(section, div):has(> article > p[id^="myBtn"]),
    #smh-cosmic-replays div:has(> div > p[id^="myBtn"]),
    #smh-cosmic-replays div:has(> div > div > button[id^="myBtn"]) {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px;
        width: 100%;
        max-width: 960px;
        margin: 24px auto 48px !important;
        padding: 0 !important;
        box-sizing: border-box;
    }
    #smh-cosmic-replays section:has(> article > p[id^="myBtn"]) > :not(article) {
        grid-column: 1 / -1;
        text-align: center !important;
        margin: 0 !important;
    }
    #smh-cosmic-replays :is(article, div):has(> p[id^="myBtn"]),
    #smh-cosmic-replays div:has(> div > button[id^="myBtn"]) {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        min-width: 0;
        padding: 24px !important;
        margin: 0 !important;
        border: 1px solid #e7dfd2;
        border-radius: 12px;
        background: #f7f5f2;
        text-align: left !important;
        box-sizing: border-box;
    }
    #smh-cosmic-replays :is(article, div):has(> p[id^="myBtn"]) > p,
    #smh-cosmic-replays div:has(> div > button[id^="myBtn"]) > p {
        width: 100%;
        margin: 0 0 12px !important;
        text-align: left !important;
        line-height: 1.7 !important;
    }
    #smh-cosmic-replays .smh-cosmic-authorized :is(article, div):has(> p[id^="myBtn"]) > p:nth-of-type(2):not(.Elite_video_player *),
    #smh-cosmic-replays .smh-cosmic-authorized div:has(> div > button[id^="myBtn"]) > p:nth-of-type(2):not(.Elite_video_player *) {
        font-size: 14px !important;
    }
    #smh-cosmic-replays :is(article, div):has(> p[id^="myBtn"]) img:not(.emoji),
    #smh-cosmic-replays div:has(> div > button[id^="myBtn"]) img:not(.emoji) {
        display: block;
        width: 156px !important;
        max-width: 100%;
        max-height: 32px !important;
        height: 32px !important;
        object-fit: contain;
        object-position: left center;
        margin: 0 0 12px !important;
    }
    #smh-cosmic-replays .smh-cosmic-authorized :is(p, button)[id^="myBtn"][onclick]:not(.Elite_video_player *) {
        display: inline-block !important;
        width: auto !important;
        max-width: 100%;
        min-height: 48px;
        height: 48px;
        padding: 10px 20px !important;
        margin: auto 0 0 !important;
        border: 0;
        border-radius: 30px;
        background: linear-gradient(90deg, #c29346 0%, #ffe9bb 20%, #d1a559 50%, #ffe9bb 80%, #d1a559 100%);
        font-family: "Inter", sans-serif !important;
        font-size: 14px !important;
        font-weight: 600;
        line-height: 28px !important;
        text-align: center !important;
        color: #000 !important;
        box-sizing: border-box;
        cursor: pointer;
    }
    #smh-cosmic-replays div:has(> div > button[id^="myBtn"]) > div:has(> button[id^="myBtn"]) {
        margin-top: auto;
        padding-top: 0;
    }
    /* Compact, centered summary stars and rating; leave card stars left-aligned. */
    #smh-cosmic-replays :is(section, div):has(> h4):has(> article [id^="myBtn"], > div > div > p[id^="myBtn"], > div > div > div > button[id^="myBtn"]) > p,
    #smh-cosmic-replays :is(section, div):has(> h4):has(> article [id^="myBtn"], > div > div > p[id^="myBtn"], > div > div > div > button[id^="myBtn"]) > div:first-of-type:has(> img) > p,
    #smh-cosmic-replays div:has(> h4):has(+ div > div > p[id^="myBtn"]) > p {
        text-align: center !important;
        margin: 8px auto 12px !important;
    }
    #smh-cosmic-replays :is(section, div):has(> h4):has(> article [id^="myBtn"], > div > div > p[id^="myBtn"], > div > div > div > button[id^="myBtn"]) > p > img,
    #smh-cosmic-replays :is(section, div):has(> h4):has(> article [id^="myBtn"], > div > div > p[id^="myBtn"], > div > div > div > button[id^="myBtn"]) > div:first-of-type > img:not([alt="preview"]),
    #smh-cosmic-replays div:has(> h4):has(+ div > div > p[id^="myBtn"]) > div > img {
        display: block;
        width: 156px !important;
        height: auto !important;
        max-height: 36px !important;
        object-fit: contain;
        margin: 0 auto 8px !important;
    }
    /* The explicit line-height balances the existing inline-important 10px padding. */
    #smh-cosmic-replays .smh-cosmic-authorized a[href*="/the-cosmic-grandfathers-january-2025"][href*="replay/"] {
        height: 48px !important;
        min-height: 48px;
        line-height: 28px !important;
        box-sizing: border-box;
        vertical-align: middle;
        margin: 0 !important;
        white-space: nowrap;
    }
    /* Day 5 puts one link in each div: group the outer pair, not each full-width child. */
    #smh-cosmic-replays div:has(> div > a[href*="/the-cosmic-grandfathers-january-2025"][href*="replay/"]) {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 16px;
        width: 100%;
        max-width: 960px;
        padding: 0 !important;
        margin: 24px auto 40px !important;
    }
    #smh-cosmic-replays .smh-cosmic-authorized div:has(> div > a[href*="/the-cosmic-grandfathers-january-2025"][href*="replay/"]) > div[style] {
        width: auto !important;
        min-width: 0;
        max-width: 100%;
        flex: 0 1 auto;
        margin: 0 !important;
        padding: 0 !important;
    }
    /* Remove Day 3's extra nested gutters so all five video sections center equally. */
    #smh-cosmic-replays div[style="padding:20px;"]:has(> div > iframe) {
        padding: 0 !important;
        width: 100%;
    }
    #smh-cosmic-replays .smh-cosmic-authorized div[style*="56.25%"]:has(> iframe) {
        margin-left: auto !important;
        margin-right: auto !important;
    }
    /* Day 6's review markup reused its blue day badge instead of the existing star artwork. */
    #smh-cosmic-replays div:has(> p[id^="myBtn"]) img:is([src$="/automation-image-58.png"], [data-src$="/automation-image-58.png"]) {
        content: url("https://www.starmagichealing.org/wp-content/uploads/2026/08/automation-image-25.png");
    }
    @media (max-width: 767px) {
        #smh-cosmic-replays :is(section, div):has(> article > p[id^="myBtn"]),
        #smh-cosmic-replays div:has(> div > p[id^="myBtn"]),
        #smh-cosmic-replays div:has(> div > div > button[id^="myBtn"]) {
            grid-template-columns: minmax(0, 1fr);
            gap: 20px;
            margin-bottom: 32px !important;
        }
        #smh-cosmic-replays :is(article, div):has(> p[id^="myBtn"]),
        #smh-cosmic-replays div:has(> div > button[id^="myBtn"]) {
            padding: 20px !important;
        }
        #smh-cosmic-replays .smh-cosmic-authorized div:has(> div > a[href*="/the-cosmic-grandfathers-january-2025"][href*="replay/"]) > div[style] {
            width: 264px !important;
        }
    }
}
