.easey-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 999999;
    padding: 20px;
    box-sizing: border-box;
}

.easey-popup {
    position: relative;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    margin: auto;
    max-width: 100%;
    max-height: 100%;
    overflow: auto;
}

.easey-popup-content {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: auto;
}

.easey-popup-content img {
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

.easey-popup-close {
    position: absolute;
    right: -1rem;
    top: -1rem;
    width: 2rem;
    height: 2rem;
    cursor: pointer;
    font-size: 1.25rem;
    color: #111827;
    border: none;
    background: white;
    padding: 0;
    margin: 0;
    opacity: 1;
    transition: all 0.2s ease;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 9999px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.easey-popup-close:hover {
    transform: scale(1.1);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    .easey-popup {
        width: 95%;
        margin: 10px;
    }

    /* Keep close button in the same position on mobile */
    .easey-popup-close {
        right: -1rem;
        top: -1rem;
    }
}

.easey-popup-overlay.position-center {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

.easey-popup-overlay.position-top-left {
    display: flex !important;
    justify-content: flex-start !important;
    align-items: flex-start !important;
    padding: 20px !important;
}

.easey-popup-overlay.position-top-right {
    display: flex !important;
    justify-content: flex-end !important;
    align-items: flex-start !important;
    padding: 20px !important;
}

.easey-popup-overlay.position-bottom-left {
    display: flex !important;
    justify-content: flex-start !important;
    align-items: flex-end !important;
    padding: 20px !important;
}

.easey-popup-overlay.position-bottom-right {
    display: flex !important;
    justify-content: flex-end !important;
    align-items: flex-end !important;
    padding: 20px !important;
}

/* Additional position-specific popup styles */
.position-center .easey-popup {
    margin: auto;
}

.position-top-left .easey-popup {
    margin: 0;
}

.position-top-right .easey-popup {
    margin: 0;
}

.position-bottom-left .easey-popup {
    margin: 0;
}

.position-bottom-right .easey-popup {
    margin: 0;
}

/* Ensure proper margin handling for the popup container */
.easey-popup {
    margin: auto; /* Default center positioning */
}

/* Animations */
.animation-fade {
    animation: fadeIn 0.3s ease-in;
}

.animation-fade-out {
    animation: fadeOut 0.3s ease-out;
}

.animation-slide-up {
    animation: slideUp 0.3s ease-in;
}

.animation-slide-up-out {
    animation: slideDown 0.3s ease-out;
}

.animation-slide-down {
    animation: slideDown 0.3s ease-in;
}

.animation-slide-down-out {
    animation: slideUp 0.3s ease-out;
}

.animation-slide-left {
    animation: slideLeft 0.3s ease-in;
}

.animation-slide-left-out {
    animation: slideRight 0.3s ease-out;
}

.animation-slide-right {
    animation: slideRight 0.3s ease-in;
}

.animation-slide-right-out {
    animation: slideLeft 0.3s ease-out;
}

/* Animation Keyframes */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes slideLeft {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes slideRight {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}
