/**
 * Mauritius Carousel - Modal Styles
 * Modal popup for carousel interactions
 */

/* Modal Overlay */
.mce-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mce-modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* Force modal to work in Elementor */
.elementor .mce-modal-overlay,
.elementor-widget-container .mce-modal-overlay,
.elementor-element .mce-modal-overlay {
    position: fixed !important;
    z-index: 999999 !important;
    width: 100% !important;
    height: 100% !important;
    top: 0 !important;
    left: 0 !important;
}

.elementor .mce-modal-content,
.elementor-widget-container .mce-modal-content,
.elementor-element .mce-modal-content {
    max-height: 98vh !important;
}

/* Modal Content */
.mce-modal-content {
    position: relative;
    background: #fff;
    border-radius: 20px;
    max-width: 900px;
    width: 90%;
    max-height: 85vh;
    height: 85vh;
    overflow: hidden;
    transform: translateY(-30px);
    transition: transform 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.mce-modal-overlay.show .mce-modal-content {
    transform: translateY(0);
}

/* Deals Carousel Container */
.mce-deals-carousel-container {
    width: 100%;
    height: 100%;
    position: relative;
}

.mce-deals-carousel {
    width: 100%;
    height: 100%;
}

.mce-deals-carousel .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Deal Card */
.mce-deal-card {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    background: #fff;
}

.mce-deal-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.mce-deal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.mce-deal-content {
    position: relative;
    z-index: 2;
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    background: linear-gradient(to bottom, 
        rgba(0, 0, 0, 0.3) 0%, 
        rgba(0, 0, 0, 0.6) 40%, 
        rgba(0, 0, 0, 0.85) 100%
    );
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

/* Initial Slide Specific */
.mce-initial-slide .mce-deal-content {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: linear-gradient(to bottom, 
        rgba(0, 0, 0, 0.2) 0%, 
        rgba(0, 0, 0, 0.5) 30%, 
        rgba(0, 0, 0, 0.85) 100%
    );
}

.mce-initial-slide h2 {
    color: #ffffff;
    font-size: 2rem;
    margin: 0 0 10px 0;
    font-weight: 700;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.mce-initial-slide .mce-deal-subtitle {
    color: #ffffff;
    font-size: 1.1rem;
    margin: 0 0 20px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(209, 203, 164, 0.3);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

/* Initial slide description text */
.mce-initial-slide .mce-deal-description {
    color: #fff;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.9);
}

.mce-initial-slide .mce-deal-description p {
    color: #fff;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.9);
    margin-bottom: 15px;
}

.mce-initial-slide .mce-deal-description ul {
    list-style: none;
    padding: 0;
    margin: 10px 0;
}

.mce-initial-slide .mce-deal-description li {
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9);
    padding: 5px 0;
    font-size: 1rem;
}

.mce-swipe-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px;
    background: linear-gradient(135deg, #197F8C, #2A8C99);
    color: #fff;
    border-radius: 50px;
    margin-top: 20px;
    font-size: 0.95rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Deal Slide Specific */
.mce-deal-title {
    color: #ffffff;
    font-size: 1.8rem;
    margin: 0 0 15px 0;
    font-weight: 700;
    text-shadow: 0 3px 10px rgba(0, 0, 0, 1);
}

.mce-deal-text {
    color: #fff;
    font-size: 1.05rem;
    line-height: 1.6;
    margin: 0 0 20px 0;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.9);
}

.mce-deal-price {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 20px 0;
}

.mce-price-current {
    font-size: 2.2rem;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 3px 8px rgba(0, 0, 0, 1);
}

.mce-price-original {
    font-size: 1.2rem;
    color: #ccc;
    text-decoration: line-through;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.mce-price-discount {
    background: #EA2839;
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 700;
    box-shadow: 0 3px 10px rgba(234, 40, 57, 0.5);
}

.mce-deal-provider {
    color: #ffffff;
    font-size: 0.95rem;
    margin: 10px 0 20px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    opacity: 0.9;
}

.mce-deal-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, #197F8C, #2A8C99);
    color: #fff;
    padding: 15px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s ease;
    margin-top: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.mce-deal-btn:hover {
    background: linear-gradient(135deg, #2A8C99, #ffffff);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(25, 127, 140, 0.6);
    color: #fff;
}

/* Pagination */
.mce-deals-pagination {
    bottom: 20px !important;
}

.mce-deals-pagination .swiper-pagination-bullet {
    background: #197F8C;
    opacity: 0.5;
}

.mce-deals-pagination .swiper-pagination-bullet-active {
    opacity: 1;
}

/* Close Button - Matches Theme Style */
.mce-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10001;
    background: #197F8C;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    min-width: 50px;
    min-height: 50px;
    max-width: 50px;
    max-height: 50px;
    color: #D1CBA4;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(25, 127, 140, 0.4);
    line-height: 1;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    flex-shrink: 0;
    overflow: visible;
    text-align: center;
    vertical-align: middle;
}

.mce-modal-close:hover {
    background: #EA2839;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(234, 40, 57, 0.5);
}

.mce-modal-close:active {
    transform: scale(0.95);
}

/* Modal Header */
.mce-modal-header {
    position: relative;
    height: 300px;
    overflow: hidden;
    border-radius: 20px 20px 0 0;
}

.mce-modal-header img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Modal Body */
.mce-modal-body {
    padding: 40px 30px;
}

.mce-modal-body h2 {
    color: #197F8C;
    font-size: 2rem;
    margin: 0 0 10px 0;
    font-weight: 700;
}

.mce-modal-subtitle {
    color: #666;
    font-size: 1.1rem;
    margin: 0 0 25px 0;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

/* Modal Description */
.mce-modal-description {
    color: #444;
    line-height: 1.8;
    margin-bottom: 30px;
}

.mce-modal-description p {
    margin: 0 0 15px 0;
    font-size: 1.05rem;
}

.mce-modal-description ul {
    list-style: none;
    padding: 0;
    margin: 15px 0;
}

.mce-modal-description li {
    padding: 8px 0;
    font-size: 1rem;
    color: #555;
}

/* Modal Actions */
.mce-modal-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.mce-btn-primary,
.mce-btn-secondary {
    flex: 1;
    min-width: 150px;
    padding: 15px 25px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.mce-btn-primary {
    background: linear-gradient(135deg, #197F8C, #2A8C99);
    color: #fff;
}

.mce-btn-primary:hover {
    background: linear-gradient(135deg, #2A8C99, #197F8C);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(25, 127, 140, 0.3);
}

.mce-btn-secondary {
    background: #f5f5f5;
    color: #197F8C;
    border: 2px solid #197F8C;
}

.mce-btn-secondary:hover {
    background: #197F8C;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(25, 127, 140, 0.2);
}

/* Responsive Design */

/* Large Desktop (1200px+) */
@media (min-width: 1200px) {
    .mce-modal-content {
        width: 85%;
        max-width: 1000px;
        height: 80vh;
        max-height: 80vh;
    }
    
    .mce-deal-content {
        padding: 45px;
    }
    
    .mce-deal-title {
        font-size: 2.5rem;
    }
    
    .mce-price-current {
        font-size: 3rem;
    }
    
    .mce-modal-close {
        width: 50px;
        height: 50px;
        font-size: 20px;
        top: 20px;
        right: 20px;
    }
}

/* Tablet Landscape (1024px to 1199px) */
@media (min-width: 1024px) and (max-width: 1199px) {
    .mce-modal-content {
        width: 95%;
        height: 85vh;
        max-height: 85vh;
    }
    
    .mce-deal-content {
        padding: 40px;
    }
    
    .mce-deal-title {
        font-size: 2.3rem;
    }
    
    .mce-price-current {
        font-size: 2.8rem;
    }
    
    .mce-modal-close {
        width: 48px;
        height: 48px;
        min-width: 48px;
        min-height: 48px;
        max-width: 48px;
        max-height: 48px;
        font-size: 19px;
        top: 18px;
        right: 18px;
    }
}

/* Tablet Portrait (768px to 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    .mce-modal-content {
        width: 98%;
        height: 90vh;
        max-height: 90vh;
        border-radius: 12px;
    }
    
    .mce-deal-content {
        padding: 35px;
    }
    
    .mce-deal-title {
        font-size: 2.2rem;
    }
    
    .mce-price-current {
        font-size: 2.6rem;
    }
    
    .mce-initial-slide h2 {
        font-size: 2.3rem;
    }
    
    .mce-modal-close {
        width: 45px;
        height: 45px;
        min-width: 45px;
        min-height: 45px;
        max-width: 45px;
        max-height: 45px;
        font-size: 18px;
        top: 18px;
        right: 18px;
    }
}

/* Mobile (below 768px) */
@media (max-width: 767px) {
    .mce-modal-content {
        width: 98%;
        height: 90vh;
        max-height: 90vh;
        border-radius: 12px;
    }

    .mce-modal-header {
        height: 200px;
    }

    .mce-modal-body {
        padding: 30px 20px;
    }

    .mce-modal-body h2 {
        font-size: 1.5rem;
    }

    .mce-modal-subtitle {
        font-size: 1rem;
    }

    .mce-modal-actions {
        flex-direction: column;
    }

    .mce-btn-primary,
    .mce-btn-secondary {
        width: 100%;
    }
    
    .mce-deal-content {
        padding: 25px;
    }
    
    .mce-deal-title {
        font-size: 1.8rem;
    }
    
    .mce-price-current {
        font-size: 2rem;
    }
    
    .mce-initial-slide h2 {
        font-size: 1.9rem;
    }
    
    .mce-modal-close {
        width: 42px;
        height: 42px;
        min-width: 42px;
        min-height: 42px;
        max-width: 42px;
        max-height: 42px;
        font-size: 17px;
        top: 15px;
        right: 15px;
    }
}

/* Small Mobile (below 480px) */
@media (max-width: 480px) {
    .mce-modal-content {
        width: 98%;
        height: 90vh;
        max-height: 90vh;
        border-radius: 12px;
    }
    
    .mce-modal-header {
        height: 180px;
    }

    .mce-modal-body {
        padding: 25px 15px;
    }

    .mce-modal-body h2 {
        font-size: 1.3rem;
    }
    
    .mce-deal-content {
        padding: 20px 18px;
    }
    
    .mce-deal-title {
        font-size: 1.5rem;
    }
    
    .mce-price-current {
        font-size: 1.8rem;
    }
    
    .mce-initial-slide h2 {
        font-size: 1.6rem;
    }

    .mce-modal-close {
        width: 40px;
        height: 40px;
        min-width: 40px;
        min-height: 40px;
        max-width: 40px;
        max-height: 40px;
        font-size: 16px;
        top: 12px;
        right: 12px;
        box-shadow: 0 3px 12px rgba(0, 0, 0, 0.4);
    }
    
    .mce-swipe-hint {
        padding: 12px;
        font-size: 0.85rem;
    }
}

/* Extra Small Mobile (below 360px) */
@media (max-width: 360px) {
    .mce-modal-close {
        width: 36px;
        height: 36px;
        min-width: 36px;
        min-height: 36px;
        max-width: 36px;
        max-height: 36px;
        font-size: 14px;
        top: 10px;
        right: 10px;
    }
}

/* Prevent any distortion on all mobile devices */
@media (max-width: 767px) {
    .mce-modal-close {
        aspect-ratio: 1 / 1 !important;
        flex-shrink: 0 !important;
        -webkit-flex-shrink: 0 !important;
        /* Ensure text content doesn't cause distortion */
        white-space: nowrap;
        text-overflow: clip;
        /* Ensure the × symbol renders correctly */
        font-family: Arial, sans-serif;
        font-weight: 300;
        letter-spacing: 0;
    }
}

/* Hover Effects */
.mce-destination-box {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.mce-button-icon {
    cursor: pointer;
    transition: all 0.3s ease;
}

.mce-button-icon:active {
    transform: scale(0.95);
}

/* Loading Animation */
@keyframes mceLoading {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.mce-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: mceLoading 0.8s linear infinite;
}

