/* BuddyPress Fans: functional frontend styles. */

/* Paid activity: prevent the purchase panel from being clipped. */
#buddypress .wls-bp-locked-wrap,
#buddypress .wls-bp-locked-content,
#buddypress .wls-bp-locked-cover {
    min-height: 150px !important;
}

#buddypress .wls-bp-locked-wrap {
    overflow: hidden !important;
}

#buddypress .wls-bp-locked-cover {
    padding: 18px !important;
    box-sizing: border-box !important;
}

#buddypress .wls-bp-buy-box {
    width: 100% !important;
    max-width: 360px !important;
    box-sizing: border-box !important;
}

#buddypress .wls-bp-buy-btn {
    min-height: 42px !important;
    line-height: 1.2 !important;
    box-sizing: border-box !important;
}

/* Activity content must stay inside its card. */
#buddypress .activity-content,
#buddypress .activity-inner,
#buddypress .activity-meta,
#buddypress .activity-comments {
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Single media and media slider. Natural media proportions are preserved. */
.wls-bp-activity-media-single,
.wls-bp-slider {
    width: 100% !important;
    max-width: 480px !important;
    height: auto !important;
    margin-top: 12px;
    overflow: hidden;
    border-radius: 12px;
    background: transparent !important;
    box-sizing: border-box !important;
    aspect-ratio: auto !important;
}

.wls-bp-slider {
    position: relative;
}

.wls-bp-slider-stage {
    position: relative;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: hidden;
    background: transparent !important;
    aspect-ratio: auto !important;
}

.wls-bp-slide {
    display: none;
    width: 100% !important;
    height: auto !important;
    background: transparent !important;
}

.wls-bp-slide.is-active {
    display: block;
}

.wls-bp-slide a {
    display: block;
    width: 100%;
    height: 100%;
}

.wls-bp-activity-media-single img,
.wls-bp-activity-media-single video,
.wls-bp-slide img,
.wls-bp-slide video {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
    background: transparent !important;
}

.wls-bp-activity-media-single audio,
.wls-bp-slide audio {
    display: block;
    width: calc(100% - 20px);
    margin: 80px 10px;
}

.wls-bp-slider-screen-btn {
    position: absolute;
    top: 50%;
    z-index: 20;
    width: 46px;
    height: 64px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    cursor: pointer;
    font-size: 34px;
    line-height: 64px;
}

.wls-bp-slider-screen-btn:hover {
    background: rgba(0, 0, 0, 0.72);
}

.wls-bp-slider-screen-prev { left: 10px; }
.wls-bp-slider-screen-next { right: 10px; }

.wls-bp-slider-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 8px 10px;
    border-top: 1px solid #2a2a2a;
    background: #151515;
}

.wls-bp-slider-bottom-btn {
    width: 46px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: #e00000;
    color: #fff;
    cursor: pointer;
    font-size: 18px;
    line-height: 36px;
}

.wls-bp-slider-bottom-btn:hover { background: #ff0000; }

.wls-bp-slider-counter {
    min-width: 46px;
    color: #ccc;
    font-size: 13px;
    text-align: center;
}

.wls-bp-slider-fullscreen-btn {
    width: 38px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: #252525;
    color: #fff;
    cursor: pointer;
    font-size: 18px;
    line-height: 34px;
}

.wls-bp-slider-fullscreen-btn:hover { background: #333; }

.wls-bp-slider-fullscreen-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 46px 72px 64px;
    box-sizing: border-box;
    background: #505557;
}

.wls-bp-slider-fullscreen-close {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 1000000;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 0;
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    cursor: pointer;
    font-size: 30px;
    line-height: 42px;
}

.wls-bp-slider-fullscreen-close:hover { background: rgba(0, 0, 0, 0.6); }

.wls-bp-slider-fullscreen-active {
    width: 100% !important;
    max-width: 1180px !important;
    max-height: calc(100vh - 120px);
    margin: 0 auto;
    border-radius: 0;
    background: transparent;
}

.wls-bp-slider-fullscreen-active .wls-bp-slider-stage {
    width: 100% !important;
    height: calc(100vh - 150px) !important;
    background: transparent !important;
    aspect-ratio: auto !important;
}

.wls-bp-slider-fullscreen-active .wls-bp-slide,
.wls-bp-slider-fullscreen-active .wls-bp-slide a {
    width: 100% !important;
    height: 100% !important;
}

.wls-bp-slider-fullscreen-active .wls-bp-slide img,
.wls-bp-slider-fullscreen-active .wls-bp-slide video {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    background: transparent !important;
}

.wls-bp-slider-fullscreen-active .wls-bp-slider-controls {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1000000;
    border-top: 1px solid #ddd;
    background: #fff;
}

.wls-bp-slider-fullscreen-active .wls-bp-slider-counter { color: #222; }

.wls-bp-slider-fullscreen-active .wls-bp-slider-bottom-btn,
.wls-bp-slider-fullscreen-active .wls-bp-slider-fullscreen-btn {
    background: transparent;
    color: #333;
}

.wls-bp-slider-fullscreen-active .wls-bp-slider-bottom-btn:hover,
.wls-bp-slider-fullscreen-active .wls-bp-slider-fullscreen-btn:hover {
    background: #eee;
}

.wls-bp-fullscreen-lock { overflow: hidden !important; }

@media (max-width: 768px) {
    .wls-bp-slider,
    .wls-bp-activity-media-single {
        max-width: 100% !important;
        border-radius: 10px;
    }

    .wls-bp-slider-screen-btn {
        width: 38px;
        height: 54px;
        font-size: 28px;
        line-height: 54px;
    }

    .wls-bp-slider-bottom-btn {
        width: 42px;
        height: 34px;
        line-height: 34px;
    }

    .wls-bp-slider-fullscreen-overlay {
        padding: 42px 12px 58px;
    }

    .wls-bp-slider-fullscreen-active .wls-bp-slider-stage {
        height: calc(100vh - 120px) !important;
    }
}
