.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: visible;
    box-sizing: border-box;
}

.easey-popup-content {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: visible;
    padding: 20px;
    box-sizing: border-box;
}

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

/* Form elements styling inside popup */
.easey-popup-content input[type="text"],
.easey-popup-content input[type="email"],
.easey-popup-content input[type="password"],
.easey-popup-content input[type="number"],
.easey-popup-content input[type="tel"],
.easey-popup-content input[type="url"],
.easey-popup-content input[type="search"],
.easey-popup-content input[type="date"],
.easey-popup-content input[type="time"],
.easey-popup-content input[type="datetime-local"],
.easey-popup-content textarea,
.easey-popup-content select {
    display: block;
    width: 100%;
    max-width: 100%;
    padding: 8px 12px;
    margin: 8px 0;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.5;
    color: #111827;
    background-color: #ffffff;
    box-sizing: border-box;
    opacity: 1;
    visibility: visible;
    z-index: 1;
    position: relative;
}

.easey-popup-content input:focus,
.easey-popup-content textarea:focus,
.easey-popup-content select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.easey-popup-content textarea {
    min-height: 100px;
    resize: vertical;
}

.easey-popup-content label {
    display: block;
    margin: 12px 0 4px 0;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.easey-popup-content button[type="submit"],
.easey-popup-content input[type="submit"],
.easey-popup-content button:not(.easey-popup-close) {
    display: inline-block;
    padding: 10px 20px;
    margin: 8px 4px 8px 0;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    background-color: #3b82f6;
    color: #ffffff;
    transition: background-color 0.2s ease;
    z-index: 1;
    position: relative;
}

.easey-popup-content button[type="submit"]:hover,
.easey-popup-content input[type="submit"]:hover,
.easey-popup-content button:not(.easey-popup-close):hover {
    background-color: #2563eb;
}

.easey-popup-close {
    position: absolute;
    right: -0.5rem;
    top: -0.5rem;
    width: 24px;
    height: 24px;
    min-width: 24px;
    min-height: 24px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    color: #111827;
    border: none;
    background: white;
    padding: 0;
    margin: 0;
    opacity: 1;
    transition: all 0.2s ease;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    aspect-ratio: 1 / 1;
}

.easey-popup-close:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

@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 {
    justify-content: center;
    align-items: center;
}

.easey-popup-overlay.position-center.is-visible {
    display: flex;
}

.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;
}

/* 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);
    }
}