/* =============================================================
   Renovation Shoppable Block — frontend styles (v2.2.3)
   ============================================================= */

/* ==============================================================
   CSS isolation — prevent theme CSS from bleeding into the block.
   Resets typography + link styling + list styling on plugin scopes.
   ============================================================== */

.rsb-renovation-block,
.rsb-product-strip,
.rsb-ai-modal {
    /* Reset inherited typography so theme serif/weight/color doesn't leak in */
    font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif !important;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.4;
    color: #1a1a1a;
    letter-spacing: normal;
    text-align: left;
    text-transform: none;
    font-style: normal;
}

/* Every descendant inherits the isolated typography */
.rsb-renovation-block *,
.rsb-renovation-block *::before,
.rsb-renovation-block *::after,
.rsb-product-strip *,
.rsb-product-strip *::before,
.rsb-product-strip *::after,
.rsb-ai-modal *,
.rsb-ai-modal *::before,
.rsb-ai-modal *::after {
    box-sizing: border-box;
    font-family: inherit !important;
    letter-spacing: inherit;
}

/* Kill theme link styling — but NOT on our CTA buttons (they need their own colors) */
.rsb-renovation-block a:not(.rsb-toast-btn):not(.cta),
.rsb-product-strip a,
.rsb-ai-modal a:not(.cta) {
    color: inherit !important;
    text-decoration: none !important;
    border: none !important;
    box-shadow: none !important;
}

/* Explicit CTA button colors — win against any theme OR isolation rules */
.rsb-toast-btn,
a.rsb-toast-btn {
    color: #1a1a1a !important;
    background: #fff !important;
    text-decoration: none !important;
}
.rsb-toast.is-lighting .rsb-toast-btn,
.rsb-toast.is-lighting a.rsb-toast-btn {
    color: #2a1a0a !important;
    background: #f5c26b !important;
}

.rsb-ai-modal a.cta {
    color: #fff !important;
    background: #000 !important;
    text-decoration: none !important;
}
.rsb-ai-modal a.cta:hover {
    background: #1a1a1a !important;
}

/* Kill theme list styling on our lists */
.rsb-ai-modal ul,
.rsb-product-strip {
    list-style: none !important;
    padding-left: 0 !important;
}

.rsb-ai-modal li {
    padding-left: 0 !important;
    background: none !important;
}

/* Kill theme button defaults */
.rsb-renovation-block button,
.rsb-ai-modal button,
.rsb-product-strip button {
    font-family: inherit !important;
    color: inherit;
    line-height: 1;
    text-transform: none;
    letter-spacing: normal;
}

/* Kill theme heading styling on modal headlines */
.rsb-ai-modal h1,
.rsb-ai-modal h2,
.rsb-ai-modal h3 {
    font-family: inherit !important;
    color: #1a1a1a !important;
    margin: 0 0 12px !important;
    padding: 0 !important;
    text-align: left !important;
    text-transform: none !important;
    letter-spacing: -0.01em !important;
    border: none !important;
}

/* Kill theme paragraph / div styling on modal body text.
   Modal uses <div class="sub"> and <div class="note"> instead of <p> so that
   EG Studio's auto-insert (which counts </p> in the_content) doesn't inject
   components inside our modal card. */
.rsb-ai-modal p,
.rsb-ai-modal .sub,
.rsb-ai-modal .note {
    font-family: inherit !important;
    margin: 0 0 16px !important;
    padding: 0 !important;
    text-align: left !important;
}

/* --- Block container --- */
.rsb-renovation-block {
    position: relative;
    overflow: hidden;
    border-radius: 0;          /* No rounded corners */
    background: #f0f0f0;
    width: 100%;               /* Full article column width — no empty space on sides */
    margin: 0 auto;
}

.rsb-renovation-block img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* --- Toolbar buttons (shared base) --- */
.rsb-toggle {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    color: #1a1a1a;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    touch-action: manipulation;   /* Prevents iOS double-tap zoom on rapid taps */
    -webkit-tap-highlight-color: transparent;
}

.rsb-toggle:hover {
    transform: translateY(-1px);
    background: #fff;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

/* --- Top-right toolbar stack (Light, AI) --- */
.rsb-toolbar {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* --- Light (night) toggle — solid black, white icon, matches AI button --- */
.rsb-toggle-night {
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 50%;
    background: #000;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.32);
}

.rsb-toggle-night:hover {
    background: #1a1a1a;
    color: #fff;
}

.rsb-toggle-night.active {
    background: #000;
    color: #fff;
    border-color: #000;
}

.rsb-toggle-night svg {
    width: 18px;
    height: 18px;
    display: block;
}

/* --- AI round-star button — EXACTLY v1.9.0 (solid black, white star, breathing) --- */
.rsb-toggle-ai {
    border-radius: 50%;
    width: 44px;
    height: 44px;
    padding: 0;
    background: #000;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.32);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.rsb-toggle-ai:hover {
    background: #1a1a1a;
    transform: translateY(-1px);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.38);
}

.rsb-toggle-ai:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.rsb-toggle-ai svg {
    width: 20px;
    height: 20px;
    display: block;
    animation: rsb-ai-breathe 2.4s ease-in-out infinite;
    transform-origin: center;
}

/* Defensive: force white fill on all toolbar icons regardless of theme CSS */
.rsb-toolbar .rsb-toggle-night svg,
.rsb-toolbar .rsb-toggle-night svg path,
.rsb-toolbar .rsb-toggle-ai svg,
.rsb-toolbar .rsb-toggle-ai svg path {
    fill: #ffffff !important;
    stroke: none !important;
    color: #ffffff !important;
}

@keyframes rsb-ai-breathe {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.08); }
}

@media (prefers-reduced-motion: reduce) {
    .rsb-toggle-ai svg { animation: none; }
}

/* --- AI value-stack modal --- */
/* Default HIDDEN — any FOUC (CSS not yet loaded, attribute swap race)
   must not flash the dark overlay. JS sets aria-hidden="false" to open. */
.rsb-ai-modal {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 50;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.65);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    animation: rsb-modal-in 0.24s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 16px;
    box-sizing: border-box;
}

.rsb-ai-modal[aria-hidden="false"] {
    display: flex;
}

.rsb-ai-modal-card {
    background: #0f0f0f !important;   /* Dark card — matches Image #24 spec */
    color: #ffffff !important;
    border-radius: 16px;
    max-width: min(420px, 100%);
    max-height: 100%;
    width: 100%;
    padding: 36px 32px 28px;
    position: relative;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
    box-sizing: border-box;
    overflow-y: auto;
}

@media (max-width: 480px) {
    .rsb-ai-modal { padding: 12px; }
    .rsb-ai-modal-card {
        padding: 28px 22px 22px;
    }
    .rsb-ai-modal h2 {
        font-size: 22px;
        line-height: 1.15;
    }
}

.rsb-ai-modal-close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: none;
    border: none;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.55) !important;
    padding: 6px 10px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.rsb-ai-modal-close:hover {
    color: #ffffff !important;
}

.rsb-ai-modal h2 {
    font-size: 26px;
    line-height: 1.18;
    margin: 0 0 12px;
    font-weight: 700 !important;
    color: #ffffff !important;
    letter-spacing: -0.01em;
}

.rsb-ai-modal .sub {
    color: #ffffff !important;
    font-size: 15px;
    margin: 0 0 6px;
    line-height: 1.45;
    font-weight: 400;
}

.rsb-ai-modal .note {
    color: rgba(255, 255, 255, 0.48) !important;
    font-size: 14px;
    margin: 0 0 24px;
    line-height: 1.45;
    font-weight: 400;
}

.rsb-ai-modal a.cta {
    display: block;
    background: #ffffff !important;
    color: #0f0f0f !important;
    text-decoration: none;
    text-align: center;
    padding: 16px;
    border-radius: 999px;          /* Pill button — matches Image #24 */
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 0.01em;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.rsb-ai-modal a.cta:hover {
    background: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(255, 255, 255, 0.25);
}

@keyframes rsb-modal-in {
    from { opacity: 0; transform: scale(0.97); }
    to   { opacity: 1; transform: scale(1); }
}

/* --- Product strip (sits OUTSIDE .rsb-renovation-block — on body bg) --- */
/* High-specificity selectors + !important on layout to beat theme CSS (e.g. .entry-content a) */
.rsb-product-strip {
    display: flex !important;
    flex-direction: row !important;
    gap: 12px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    padding: 0 !important;
    margin: 12px 0 32px !important;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    /* Wider 120px fade gives a clearer "there's more to the right" affordance.
       48px was too subtle — users didn't realise the strip scrolled. */
    -webkit-mask-image: linear-gradient(to right, black calc(100% - 120px), transparent 100%);
    mask-image: linear-gradient(to right, black calc(100% - 120px), transparent 100%);
    transition: -webkit-mask-image 0.25s ease, mask-image 0.25s ease;
    background: transparent !important;
    list-style: none !important;
}

.rsb-product-strip::-webkit-scrollbar {
    display: none;
}

/* When scrolled to the right edge, drop the fade so the final thumbnail
   reads at full opacity. JS toggles `.at-end` on scroll. */
.rsb-product-strip.at-end {
    -webkit-mask-image: none !important;
    mask-image: none !important;
}

/* "Shop The Look" header above the strip.
   Deliberately minimal — only controls layout (margin + alignment).
   Font-family, size, weight and colour inherit from the theme's native h3
   styling so the header matches the rest of the blog post typography. */
.rsb-block-wrapper .rsb-product-strip-title {
    margin: 20px 0 8px !important;
    text-align: left !important;
}

/* Suppress ESSB / Pinterest hover overlays on product thumbs */
.rsb-product-strip a .essb_links,
.rsb-product-strip a .essb_displayed_pinimage,
.rsb-product-strip a .pin-it-button,
.rsb-product-strip .essb-pinit-button,
.rsb-product-strip img.pin-generated {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.rsb-product-strip a.rsb-product-card,
a.rsb-product-card {
    flex: 0 0 auto !important;
    display: block !important;
    width: 120px !important;
    height: 120px !important;
    background: #ffffff !important;
    border-radius: 4px !important;
    overflow: hidden !important;
    text-decoration: none !important;
    color: inherit !important;
    transition: transform 0.2s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    line-height: 0 !important;
}

.rsb-product-strip a.rsb-product-card:hover {
    transform: translateY(-2px);
}

.rsb-product-strip a.rsb-product-card > img,
.rsb-product-strip .rsb-product-thumb {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    display: block !important;
    margin: 0 !important;
    padding: 6px !important;
    box-sizing: border-box !important;
    border: none !important;
    border-radius: 0 !important;
    max-width: none !important;
}

@media (max-width: 600px) {
    .rsb-product-strip a.rsb-product-card,
    a.rsb-product-card {
        width: 96px !important;
        height: 96px !important;
    }
}

/* --- Contextual toast (vertical stack: text on top, full-width button below, × in top-right corner) --- */
.rsb-toast {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: rgba(26, 26, 26, 0.92);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    color: #fff;
    padding: 16px 20px 14px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    opacity: 0;
    transform: translateY(calc(100% + 24px));
    pointer-events: none;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.32);
    z-index: 12;
}

.rsb-toast.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Lighting variant — warm amber ground */
.rsb-toast.is-lighting {
    background: rgba(40, 30, 20, 0.94);
}

.rsb-toast-text {
    font-size: 15.5px;             /* Unified headline size — readable on both desktop and mobile */
    font-weight: 500;
    line-height: 1.4;
    flex: 0 0 auto;
    min-width: 0;
    padding-right: 32px;           /* Clear the absolute-positioned × in the top-right corner */
}

.rsb-toast-text .rsb-toast-headline {
    display: block;
    color: #fff;
    margin-bottom: 4px;
}

.rsb-toast-text .rsb-toast-sub {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    font-size: 13.5px;             /* Unified sub size */
    font-weight: 400;
    line-height: 1.5;
}

.rsb-toast-btn {
    background: #fff;
    color: #1a1a1a;
    border: none;
    padding: 13px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    width: 100%;                   /* Full-width on both desktop and mobile */
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.rsb-toast-btn:hover {
    background: #f2f2f2;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Lighting variant button — warm amber to match the warm-amber toast background */
.rsb-toast.is-lighting .rsb-toast-btn {
    background: #f5c26b;       /* warm amber, complements rgba(40,30,20,0.94) */
    color: #2a1a0a;            /* deep brown for contrast */
}

.rsb-toast.is-lighting .rsb-toast-btn:hover {
    background: #f8cf85;
}

.rsb-toast-close {
    position: absolute;
    top: 6px;
    right: 8px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.55);
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    padding: 6px 8px;
    font-weight: 300;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.rsb-toast-close:hover {
    color: #fff;
}

@media (max-width: 540px) {
    /* Mobile: sized-up toast (variant D) — headline 19px / sub 16px / btn 17px.
       Bigger tap targets, more legible on 375–414px viewports. */
    .rsb-toast {
        bottom: 20px;
        left: 20px;
        right: 20px;
        padding: 20px 22px 18px;
        gap: 16px;
    }
    .rsb-toast-text {
        padding-right: 40px;
        font-size: 19px;
    }
    .rsb-toast-text .rsb-toast-sub {
        font-size: 16px;
    }
    .rsb-toast-btn {
        padding: 16px 22px;
        font-size: 17px;
    }
    .rsb-toast-close {
        top: 12px;
        right: 14px;
        font-size: 22px;
        padding: 6px 12px;
    }
}

/* --- Night-mode image swap --- */
.rsb-renovation-block.is-night-mode .rsb-night-layer {
    opacity: 1 !important;
}

.rsb-night-layer {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    pointer-events: none !important;
}

/* --- Palette block (separate component, unchanged from prior versions) --- */
.rsb-palette-block {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    width: 100%;
    margin: 0 auto 32px auto;
}

.rsb-palette-block img {
    display: block;
    width: 100%;
    height: auto;
}

/* --- Desktop: full portrait image, no cropping --- */
@media screen and (min-width: 768px) {
    .rsb-renovation-block {
        overflow: hidden !important;
    }
}

/* =============================================================
   Carousel UI — pill tabs + arrow navigation (v2.0)
   ============================================================= */

/* --- Slide container --- */
.rsb-slides {
    position: relative;
    width: 100%;
}

/* First slide sets the height, others overlay */
.rsb-slide {
    width: 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.rsb-slide:first-child {
    position: relative;
    opacity: 0;
}

.rsb-slide:not(:first-child) {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
}

.rsb-slide.active {
    opacity: 1;
    pointer-events: auto;
}

.rsb-slide img {
    width: 100%;
    height: auto;
    display: block;
}

/* --- Icon tabs container (top-right) --- */
.rsb-icon-tabs {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    gap: 4px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 4px;
    border-radius: 28px;
    z-index: 10;
}

/* --- Individual icon tab --- */
.rsb-icon-tab {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    position: relative;
}

.rsb-icon-tab svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: rgba(255, 255, 255, 0.5);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: stroke 0.2s;
}

.rsb-icon-tab:hover:not(.active) svg {
    stroke: #fff;
}

.rsb-icon-tab.active {
    background: #fff;
}

.rsb-icon-tab.active svg {
    stroke: #000;
}

/* --- Divider between carousel and AI tabs --- */
.rsb-icon-divider {
    width: 1px;
    height: 24px;
    background: rgba(255, 255, 255, 0.2);
    margin: 0 4px;
    align-self: center;
}

/* --- AI tab: filled sparkle with breathing animation --- */
.rsb-ai-tab svg {
    fill: rgba(255, 255, 255, 0.5);
    stroke: none;
    animation: rsb-ai-breathe 2.4s ease-in-out infinite;
}

.rsb-ai-tab:hover svg {
    fill: #fff;
}

@keyframes rsb-ai-breathe {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

/* --- Tooltip on hover --- */
.rsb-icon-tab::after {
    content: attr(data-label);
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

.rsb-icon-tab:hover::after {
    opacity: 1;
}

/* --- Arrow navigation --- */
.rsb-nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: rgba(0, 0, 0, 0.4);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background 0.2s;
}

.rsb-nav-arrow:hover {
    background: rgba(0, 0, 0, 0.7);
}

.rsb-nav-arrow svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: #fff;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}

.rsb-nav-prev { left: 12px; }
.rsb-nav-next { right: 12px; }

/* Mobile: smaller controls */
@media (max-width: 600px) {
    .rsb-nav-arrow {
        width: 36px;
        height: 36px;
    }
    .rsb-nav-arrow svg {
        width: 20px;
        height: 20px;
    }
    .rsb-icon-tab {
        width: 36px;
        height: 36px;
    }
    .rsb-icon-tab svg {
        width: 18px;
        height: 18px;
    }
}

/* =============================================================
   Carousel v2.1 — Pill tabs + Pinterest + Star button + Shimmer
   ============================================================= */

/* --- Pill tabs (center-top) --- */
.rsb-pill-tabs {
    position: absolute;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 4px;
    border-radius: 28px;
    z-index: 10;
}

.rsb-pill-tab {
    padding: 10px 16px;
    border: none;
    background: transparent !important;
    border-radius: 24px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85) !important;
    transition: color 0.2s;
    position: relative;
    z-index: 1;
}

.rsb-pill-tab:hover {
    color: #fff !important;
}

.rsb-pill-tab.active {
    color: #000 !important;
}

/* --- Sliding highlight behind active tab --- */
.rsb-pill-highlight {
    position: absolute;
    top: 4px;
    height: calc(100% - 8px);
    background: #fff;
    border-radius: 24px;
    transition: left 0.25s ease, width 0.25s ease;
    z-index: 0;
}

/* --- Star button (top-right) with shimmer --- */
.rsb-renovation-block .rsb-star-btn {
    position: absolute !important;
    top: 16px !important;
    right: 16px !important;
    left: auto !important;
    bottom: auto !important;
    width: 48px;
    height: 48px;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background 0.2s;
    overflow: hidden;
}

.rsb-star-btn:hover {
    background: rgba(0, 0, 0, 0.9);
}

.rsb-star-btn svg {
    width: 22px;
    height: 22px;
    fill: rgba(255, 255, 255, 0.8);
    transition: fill 0.2s;
    position: relative;
    z-index: 2;
}

.rsb-star-btn:hover svg {
    fill: #fff;
}

/* --- Shimmer effect on star button --- */
.rsb-star-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.4) 50%,
        transparent 100%
    );
    pointer-events: none;
    z-index: 1;
}

.rsb-star-btn.shimmer::before {
    animation: rsb-star-shimmer 0.6s ease-out;
}

@keyframes rsb-star-shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .rsb-star-btn::before { display: none; }
}

/* --- Full-screen modal overlay (inside carousel) --- */
.rsb-modal-overlay {
    display: none;
    position: absolute;
    inset: 0;
    background: #000;
    z-index: 50;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.rsb-modal-overlay.visible {
    display: flex;
}

/* X button - same position as star button */
.rsb-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 48px;
    height: 48px;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    cursor: pointer;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.rsb-modal-close:hover {
    background: rgba(255, 255, 255, 0.25);
}

.rsb-modal-close svg {
    width: 20px;
    height: 20px;
    stroke: #fff;
    stroke-width: 2;
    fill: none;
}

.rsb-modal-content {
    text-align: center;
    padding: 40px 32px;
    max-width: 420px;
}

.rsb-modal-content h2 {
    font-size: 28px;
    margin-bottom: 16px;
    color: #fff !important;
    font-weight: 600;
    line-height: 1.25;
}

.rsb-modal-content .rsb-modal-sub {
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 12px;
    font-size: 17px;
    line-height: 1.4;
}

.rsb-modal-content .rsb-modal-note {
    color: rgba(255, 255, 255, 0.45);
    font-size: 15px;
    margin-bottom: 28px;
}

.rsb-modal-content .rsb-modal-cta {
    display: inline-block;
    background: #fff !important;
    color: #000 !important;
    padding: 16px 36px;
    border-radius: 999px;
    text-decoration: none !important;
    font-weight: 600;
    font-size: 17px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.rsb-modal-content .rsb-modal-cta:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.2);
}

/* Mobile adjustments for v2.2 UI */
@media (max-width: 600px) {
    .rsb-pill-tabs {
        top: 12px;
    }
    .rsb-pill-tab {
        padding: 8px 12px;
        font-size: 13px;
    }
    .rsb-renovation-block .rsb-star-btn {
        width: 44px;
        height: 44px;
        top: 12px !important;
        right: 12px !important;
    }
    .rsb-star-btn svg {
        width: 20px;
        height: 20px;
    }
    .rsb-modal-content {
        padding: 32px 24px;
    }
    .rsb-modal-content h2 {
        font-size: 22px;
    }
    .rsb-modal-content .rsb-modal-sub {
        font-size: 15px;
    }
    .rsb-modal-content .rsb-modal-cta {
        padding: 14px 28px;
        font-size: 15px;
    }
}

/* =============================================================
   ESSB Pinterest button alignment (v2.2.0)
   ESSB default is top: 20px; left: 20px — align with our UI.
   ============================================================= */

.rsb-renovation-block .essb_links,
.rsb-renovation-block .essb_displayed_pinimage,
.rsb-slides .essb_links,
.rsb-slides .essb_displayed_pinimage {
    top: 16px !important;
    left: 16px !important;
    right: auto !important;
    z-index: 10 !important;
}

@media (max-width: 600px) {
    .rsb-renovation-block .essb_links,
    .rsb-renovation-block .essb_displayed_pinimage,
    .rsb-slides .essb_links,
    .rsb-slides .essb_displayed_pinimage {
        top: 12px !important;
        left: 12px !important;
    }
}
