/**
 * MN SlideSwipe CSS
 * Template slider with swipe functionality
 */

/* Main Container */
.mn-slideswipe-wrapper {
    position: relative;
    width: 100%;
    overflow: visible; /* Allow arrows to extend beyond */
}

.mn-slideswipe-container {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    border-radius: 8px;
}

/* Swiper Wrapper */
.mn-slideswipe-container .swiper-wrapper {
    display: flex;
    align-items: stretch;
}

.mn-slideswipe-container .swiper-slide {
    display: flex;
    align-items: stretch;
    height: auto;
    box-sizing: border-box;
    flex-shrink: 0; /* Prevent slides from shrinking */
}

/* Slide Content */
.mn-slide-content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: transparent;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

/* Template Content Styling */
.mn-slide-content > .elementor {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.mn-slide-content > .elementor > .elementor-section-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Placeholder Styles */
.mn-slide-placeholder {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    background: #f8f9fa;
    border-radius: 6px;
}

.mn-slide-placeholder h3 {
    margin: 0 0 10px 0;
    font-size: 24px;
    font-weight: 600;
    color: #333;
}

.mn-slide-placeholder p {
    margin: 0;
    font-size: 14px;
    opacity: 0.7;
}

/* Navigation Arrows */
.mn-slideswipe-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background-color: rgba(0, 0, 0, 0.5);
    color: #ffffff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    z-index: 15;
    transition: all 0.3s ease;
    user-select: none;
}

.mn-slideswipe-arrow:hover {
    background-color: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.mn-slideswipe-arrow-prev {
    left: 10px;
}

.mn-slideswipe-arrow-next {
    right: 10px;
}

.mn-slideswipe-arrow.swiper-button-disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.mn-slideswipe-arrow.swiper-button-disabled:hover {
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
}

/* Navigation Dots */
.mn-slideswipe-wrapper .swiper-pagination {
    position: relative;
    margin: 20px 0;
    text-align: center;
}

.mn-slideswipe-wrapper .swiper-pagination-top {
    margin: 0 0 20px 0;
}

.mn-slideswipe-wrapper .swiper-pagination-bottom {
    margin: 20px 0 0 0;
}

.mn-slideswipe-wrapper .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    margin: 0 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 1;
}

.mn-slideswipe-wrapper .swiper-pagination-bullet:hover {
    background-color: rgba(0, 0, 0, 0.5);
    transform: scale(1.2);
}

.mn-slideswipe-wrapper .swiper-pagination-bullet-active {
    background-color: #007cba;
    transform: scale(1.3);
}

/* Loading State */
.mn-slideswipe-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 400px;
    background: #f8f9fa;
    border-radius: 8px;
}

.mn-slideswipe-loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007cba;
    border-radius: 50%;
    animation: mn-slideswipe-spin 1s linear infinite;
}

@keyframes mn-slideswipe-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */

/* Desktop (1200px and up) - Default styles apply */

/* Tablet Landscape (1024px - 1199px) */
@media (max-width: 1199px) and (min-width: 1024px) {
    .mn-slideswipe-arrow {
        width: 38px;
        height: 38px;
        font-size: 18px;
    }
}

/* Tablet Portrait (768px - 1023px) */
@media (max-width: 1023px) and (min-width: 768px) {
    .mn-slideswipe-arrow {
        width: 36px;
        height: 36px;
        font-size: 17px;
    }
    
    .mn-slide-placeholder {
        padding: 35px 18px;
    }
    
    .mn-slide-placeholder h3 {
        font-size: 22px;
    }
    
    .mn-slide-placeholder p {
        font-size: 13px;
    }
}

/* Mobile Landscape (480px - 767px) */
@media (max-width: 767px) and (min-width: 480px) {
    .mn-slideswipe-arrow {
        width: 34px;
        height: 34px;
        font-size: 16px;
    }
    
    .mn-slideswipe-arrow-prev {
        left: 8px;
    }
    
    .mn-slideswipe-arrow-next {
        right: 8px;
    }
    
    .mn-slide-placeholder {
        padding: 30px 15px;
    }
    
    .mn-slide-placeholder h3 {
        font-size: 20px;
    }
    
    .mn-slide-placeholder p {
        font-size: 13px;
    }
}

/* Mobile Portrait (up to 479px) */
@media (max-width: 479px) {
    .mn-slideswipe-arrow {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }
    
    .mn-slideswipe-arrow-prev {
        left: 5px;
    }
    
    .mn-slideswipe-arrow-next {
        right: 5px;
    }
    
    .mn-slideswipe-wrapper .swiper-pagination-bullet {
        width: 8px;
        height: 8px;
        margin: 0 3px;
    }
    
    .mn-slide-placeholder {
        padding: 20px 10px;
    }
    
    .mn-slide-placeholder h3 {
        font-size: 18px;
    }
    
    .mn-slide-placeholder p {
        font-size: 12px;
    }
}

/* Touch Devices */
@media (hover: none) and (pointer: coarse) {
    .mn-slideswipe-arrow {
        opacity: 0.8;
    }
    
    .mn-slideswipe-arrow:hover {
        transform: translateY(-50%);
        background-color: rgba(0, 0, 0, 0.5);
    }
    
    .mn-slideswipe-wrapper .swiper-pagination-bullet:hover {
        transform: none;
        background-color: rgba(0, 0, 0, 0.3);
    }
}

/* RTL Support */
[dir="rtl"] .mn-slideswipe-arrow-prev {
    right: 10px;
    left: auto;
}

[dir="rtl"] .mn-slideswipe-arrow-next {
    left: 10px;
    right: auto;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .mn-slideswipe-arrow {
        background-color: #000000;
        border: 2px solid #ffffff;
    }
    
    .mn-slideswipe-wrapper .swiper-pagination-bullet {
        background-color: #000000;
        border: 1px solid #ffffff;
    }
    
    .mn-slideswipe-wrapper .swiper-pagination-bullet-active {
        background-color: #ffffff;
        border: 2px solid #000000;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .mn-slideswipe-arrow,
    .mn-slideswipe-wrapper .swiper-pagination-bullet {
        transition: none;
    }
    
    .mn-slideswipe-arrow:hover {
        transform: translateY(-50%);
    }
    
    .mn-slideswipe-wrapper .swiper-pagination-bullet:hover {
        transform: none;
    }
}
