/**
 * Related Listings Widget Styles
 */

.cp10-related-listings-wrapper {
    position: relative;
}

.cp10-related-listings-title {
    margin-bottom: 20px;
}

.cp10-related-listings-content {
    position: relative;
}

/* Force owl-carousel to control item widths - override Bootstrap columns */
.cp10-related-carousel.owl-carousel .owl-stage {
    display: flex !important;
}

.cp10-related-carousel.owl-carousel .owl-item {
    float: none !important;
    flex-shrink: 0 !important;
}

/* Reset any width constraints on carousel items */
.cp10-related-carousel.owl-carousel .owl-item > div,
.cp10-related-carousel.owl-carousel .owl-item .ppt-carousel-item,
.cp10-related-carousel.owl-carousel .owl-item [class*="col-"] {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
    padding-left: 5px !important;
    padding-right: 5px !important;
    box-sizing: border-box !important;
}

/* Ensure cards inside carousel items take full width */
.cp10-related-carousel.owl-carousel .owl-item .card,
.cp10-related-carousel.owl-carousel .owl-item figure {
    width: 100% !important;
}

/* Grid layout for non-carousel mode */
.cp10-related-grid {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}

.cp10-related-grid > div {
    padding: 0 10px;
    margin-bottom: 20px;
}

/* Owl Carousel Navigation Arrows */
.cp10-related-listings-wrapper .owl-carousel .owl-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    z-index: 10;
}

.cp10-related-listings-wrapper .owl-carousel .owl-nav button.owl-prev,
.cp10-related-listings-wrapper .owl-carousel .owl-nav button.owl-next {
    pointer-events: auto;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.5) !important;
    color: #fff !important;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.3s ease;
    border: none;
    outline: none;
    cursor: pointer;
}

.cp10-related-listings-wrapper .owl-carousel .owl-nav button.owl-prev:hover,
.cp10-related-listings-wrapper .owl-carousel .owl-nav button.owl-next:hover {
    background: rgba(0, 0, 0, 0.8) !important;
}

.cp10-related-listings-wrapper .owl-carousel .owl-nav button.owl-prev {
    margin-left: -20px;
}

.cp10-related-listings-wrapper .owl-carousel .owl-nav button.owl-next {
    margin-right: -20px;
}

.cp10-related-listings-wrapper .owl-carousel .owl-nav button.owl-prev span,
.cp10-related-listings-wrapper .owl-carousel .owl-nav button.owl-next span {
    font-size: 24px;
    line-height: 1;
}

.cp10-related-listings-wrapper .owl-carousel .owl-nav .disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Owl Carousel Dots */
.cp10-related-listings-wrapper .owl-carousel .owl-dots {
    text-align: center;
    margin-top: 15px;
}

.cp10-related-listings-wrapper .owl-carousel .owl-dots .owl-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin: 0 5px;
    background: #ddd;
    border-radius: 50%;
    border: none;
    outline: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cp10-related-listings-wrapper .owl-carousel .owl-dots .owl-dot.active,
.cp10-related-listings-wrapper .owl-carousel .owl-dots .owl-dot:hover {
    background: #333;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .cp10-related-listings-wrapper .owl-carousel .owl-nav button.owl-prev,
    .cp10-related-listings-wrapper .owl-carousel .owl-nav button.owl-next {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    .cp10-related-listings-wrapper .owl-carousel .owl-nav button.owl-prev {
        margin-left: -10px;
    }
    
    .cp10-related-listings-wrapper .owl-carousel .owl-nav button.owl-next {
        margin-right: -10px;
    }
}

/* Notice styling */
.cp10-related-listings-notice {
    padding: 15px;
    background: #f5f5f5;
    border: 1px dashed #ddd;
    border-radius: 4px;
    color: #666;
    text-align: center;
}
