#spotlight-subscribe-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0; pointer-events: none;
    transition: opacity 0.3s ease-in-out;
}
#spotlight-subscribe-overlay.active {
    opacity: 1; pointer-events: auto;
}
.spotlight-subscribe-box {
    background: white;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 0 20px rgba(0,0,0,0.4);
    position: relative;
}
.close-spotlight {
    position: absolute;
    top: 10px; right: 10px;
    background: none;
    border: none;
    font-size: 20px;
}

.spotlight-subscribe-scroll-container {
    position: relative;
    margin: 40px auto;
    width: 100%;
}

.spotlight-subscribe-scroll-space {
    height: 100vh; /* Creates scrollable space */
}

.spotlight-subscribe-wrapper {
    position: relative;
    margin: 40px auto;
    padding: 40px 0;
    max-width: 95%;
    width: 900px;
    z-index: 1;
}

.spotlight-subscribe-container {
    position: sticky;
    top: 20px;
    z-index: 2;
    margin: 0 auto;
    background: white;
    padding: 25px 20px;
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(0,0,0,0.2);
    transform: scale(1);
    transition: transform 0.3s ease-in-out, top 0.2s ease-out;
}

.spotlight-subscribe-content {
    text-align: center;
}

.spotlight-subscribe-content h3 {
    margin-bottom: 20px;
    font-size: 24px;
    color: #333;
}

.spotlight-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease-in-out;
    z-index: 998;
}

.spotlight-subscribe-wrapper.in-view .spotlight-overlay,
.spotlight-subscribe-wrapper:has([data-ff-el="root"].ff-68319b10b61ee160f25775e2:hover) .spotlight-overlay {
    opacity: 1;
}

.spotlight-subscribe-wrapper.in-view .spotlight-subscribe-container {
    transform: scale(1.02);
}

.spotlight-subscribe-wrapper.in-view .ff-68319b10b61ee160f25775e2__container,
.spotlight-subscribe-wrapper:has([data-ff-el="root"].ff-68319b10b61ee160f25775e2:hover) .ff-68319b10b61ee160f25775e2__container {
    transform: scale(1.02);
    box-shadow: 0 0 50px rgba(255,255,255,0.4);
}

/* Responsive Design */
@media (max-width: 768px) {
    .spotlight-subscribe-wrapper {
        width: 95%;
        margin: 30px auto;
        padding: 20px 0;
    }

    .spotlight-subscribe-scroll-container {
        margin: 30px auto;
    }
    
    .spotlight-subscribe-container {
        padding: 20px 15px;
        top: 20px;
    }
}

[data-ff-el="root"].ff-68319b10b61ee160f25775e2 {
    position: sticky;
    top: 120px; /* Increased for desktop */
    z-index: 999;
    margin-bottom: 40px;
}

[data-ff-el="root"].ff-68319b10b61ee160f25775e2 .ff-68319b10b61ee160f25775e2__container {
    margin: 0 auto;
    background: #ffffff;
    border-radius: 15px;
    box-shadow: 0 0 30px rgba(0,0,0,0.2);
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

[data-ff-el="root"].ff-68319b10b61ee160f25775e2 .ff-68319b10b61ee160f25775e2__wrapper {
    display: flex;
    align-items: stretch;
    background: #ffffff;
    border-radius: 15px;
}

[data-ff-el="root"].ff-68319b10b61ee160f25775e2 .ff-68319b10b61ee160f25775e2__left {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border-radius: 15px 0 0 15px;
    padding: 20px;
}

[data-ff-el="root"].ff-68319b10b61ee160f25775e2 .ff-68319b10b61ee160f25775e2__image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
}

[data-ff-el="root"].ff-68319b10b61ee160f25775e2 .ff-68319b10b61ee160f25775e2__image img {
    max-width: 100%;
    height: auto;
    border-radius: 15px;
    object-fit: contain;
}

[data-ff-el="root"].ff-68319b10b61ee160f25775e2 .ff-68319b10b61ee160f25775e2__right {
    flex: 1;
    padding: 30px;
    background: #ffffff;
    border-radius: 0 15px 15px 0;
}

[data-ff-el="root"].ff-68319b10b61ee160f25775e2 .ff-68319b10b61ee160f25775e2__title {
    color: #2C1A1A;
    margin: 0 0 20px;
    font-size: 23px;
    line-height: 1.2;
    font-weight: 700;
}

[data-ff-el="root"].ff-68319b10b61ee160f25775e2 .ff-68319b10b61ee160f25775e2__subtitle {
    margin: 0 0 25px;
    font-size: 16px;
    line-height: 1.5;
    color: #482D2D;
}

[data-ff-el="root"].ff-68319b10b61ee160f25775e2 .ff-68319b10b61ee160f25775e2__control {
    width: 100%;
    color: #333;
    border: 1px solid #000000;
    height: 51.5px;
    padding: 12px 20px;
    font-size: 16px;
    background: transparent;
    border-radius: 15px;
    margin-bottom: 15px;
}

[data-ff-el="root"].ff-68319b10b61ee160f25775e2 .ff-68319b10b61ee160f25775e2__button {
    color: #ffffff;
    width: 100%;
    border: none;
    padding: 12px 20px;
    font-size: 16px;
    background: var(--global-palette-btn-bg);
    font-weight: 600;
    border-radius: 15px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

[data-ff-el="root"].ff-68319b10b61ee160f25775e2 .ff-68319b10b61ee160f25775e2__button:hover {
    background: var(--global-palette-btn-bg-hover);
}

.spotlight-scroll-space {
    height: 5vh; /* Desktop scroll space - much shorter now */
}

@media (max-width: 768px) {
    .spotlight-scroll-space {
        height: 30vh; /* Mobile scroll space - stays longer */
    }

    [data-ff-el="root"].ff-68319b10b61ee160f25775e2 {
        top: 20px;
    }

    [data-ff-el="root"].ff-68319b10b61ee160f25775e2 .ff-68319b10b61ee160f25775e2__container {
        top: 20px;
    }
    
    [data-ff-el="root"].ff-68319b10b61ee160f25775e2 .ff-68319b10b61ee160f25775e2__wrapper {
        flex-direction: column;
    }
    
    [data-ff-el="root"].ff-68319b10b61ee160f25775e2 .ff-68319b10b61ee160f25775e2__left {
        border-radius: 15px 15px 0 0;
        padding: 15px;
    }
    
    [data-ff-el="root"].ff-68319b10b61ee160f25775e2 .ff-68319b10b61ee160f25775e2__right {
        border-radius: 15px 15px 15px 15px;
        padding: 20px 15px;
    }
    
    [data-ff-el="root"].ff-68319b10b61ee160f25775e2 .ff-68319b10b61ee160f25775e2__title {
        font-size: 20px;
    }
}

/* App Promotion Styles */
.spotlight-app-promo {
    display: none; /* Hide by default on desktop */
    margin: 0 0 2em 0;
    width: 100%;
}

/* Specific styling for when app promo is before title */
body.single-post article > .spotlight-app-promo:first-child {
    margin-bottom: 1.5em;
}

.app-promo-container {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    padding: 12px 20px;
    gap: 20px;
    border: 1px solid #eee;
}

.app-promo-icon {
    flex: 0 0 40px;
}

.app-promo-icon img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: block;
}

.app-promo-content {
    flex: 1;
    min-width: 0;
}

.app-promo-content h4 {
    margin: 0 0 2px 0;
    font-size: 18px;
    color: #2C1A1A;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-promo-content p {
    margin: 0;
    font-size: 16px;
    color: #482D2D;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-promo-cta {
    flex: 0 0 auto;
}

.app-store-button {
    display: inline-block;
    background: var(--global-palette-btn-bg);
    color: #fff;
    padding: 8px 20px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    transition: background-color 0.3s ease;
    white-space: nowrap;
}

.app-store-button:hover {
    background: var(--global-palette-btn-bg-hover);
    color: #fff;
    text-decoration: none;
}

@media (max-width: 600px) {
    .spotlight-app-promo {
        display: block; /* Show only on mobile */
    }

    .app-promo-container {
        padding: 12px 15px;
        gap: 15px;
    }

    .app-promo-content h4 {
        font-size: 16px;
    }

    .app-promo-content p {
        font-size: 14px;
    }

    .app-store-button {
        padding: 6px 16px;
        font-size: 14px;
    }
}

.spotlight-close-button {
    position: absolute;
    top: -12px;
    right: -12px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.4);
    color: rgba(255, 255, 255, 0.8);
    border: none;
    font-size: 18px;
    line-height: 0;
    padding: 0 0 3px 0;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    backdrop-filter: blur(2px);
}

.spotlight-close-button:hover {
    background: rgba(0, 0, 0, 0.6);
    color: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}
