/* Minimalist Popup Styles v6.4.3 */

.mp-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    padding: 15px;
    box-sizing: border-box;
    overflow-x: hidden;
}

.mp-overlay.mp-visible {
    opacity: 1;
    visibility: visible;
}

.mp-popup-container {
    position: relative;
    width: 100%;
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    transform: scale(0.95);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-align: center;
    max-height: 90vh;
    overflow-y: auto;
    box-sizing: border-box;
    margin: auto;

    /* CRITICAL FOR ROUNDED CORNERS ON IMAGES/SLIDERS */
    overflow: hidden;
}

.mp-overlay.mp-visible .mp-popup-container {
    transform: scale(1);
}

/* SIZES */
.mp-size-small {
    max-width: 300px !important;
}

.mp-size-medium {
    max-width: 500px !important;
}

.mp-size-large {
    max-width: 800px !important;
}

.mp-size-full {
    max-width: 95% !important;
    height: 90%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* TYPE: IMAGE / SLIDER */
.mp-type-image,
.mp-type-slider {
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
    border: none !important;
    /* No border for image types, just radius */
    /* Width forced */
    width: 100% !important;
    max-width: 100%;
}

.mp-type-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: inherit;
    /* inherit radius from container */
}

/* SLIDER STYLES */
.mp-slider {
    position: relative;
    width: 100%;
    min-height: 50px;
    overflow: hidden;
}

.mp-slide {
    display: none;
    width: 100%;
}

.mp-slide.active {
    display: block;
    animation: fadeEffect 0.5s;
}

@keyframes fadeEffect {
    from {
        opacity: 0.5
    }

    to {
        opacity: 1
    }
}

.mp-slide img {
    width: 100% !important;
    height: auto !important;
    display: block;
    margin: 0 auto;
}

/* Slider Controls */
.mp-prev,
.mp-next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 12px;
    margin-top: -20px;
    color: white;
    font-weight: bold;
    font-size: 18px;
    transition: 0.3s ease;
    user-select: none;
    background-color: rgba(0, 0, 0, 0.3);
    border: none;
    z-index: 10;
}

.mp-next {
    right: 0;
    border-radius: 4px 0 0 4px;
}

.mp-prev {
    left: 0;
    border-radius: 0 4px 4px 0;
}

.mp-prev:hover,
.mp-next:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.mp-dots {
    text-align: center;
    padding: 10px;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: -30px;
    position: relative;
    z-index: 20;
}

.mp-dot {
    cursor: pointer;
    height: 10px;
    width: 10px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    display: inline-block;
    transition: background-color 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.mp-dot.active,
.mp-dot:hover {
    background-color: #fff;
    transform: scale(1.2);
}

/* UNIFIED CLOSE BUTTON (White Circle, Inside Corner) */
.mp-close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    background: #fff;
    border: none;
    cursor: pointer;
    color: #333;
    transition: all 0.2s;
    padding: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    opacity: 0.9;
}

.mp-close-btn svg {
    width: 14px;
    height: 14px;
    display: block;
}

.mp-close-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
    opacity: 1;
    background: #fff;
}

/* Remove Image/Slider specific overrides as we want them unified */
/* Mobile Adjustment */
@media (max-width: 600px) {
    .mp-popup-container {
        padding: 25px;
    }

    .mp-close-btn {
        top: 8px;
        right: 8px;
        width: 30px;
        height: 30px;
    }
}