/* PopupJama Frontend Styles */

/* Popup container - hidden by default */
.popupjama-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    justify-content: center;
    align-items: center;
}

.popupjama-popup.popupjama-active {
    display: flex;
}

/* Body lock when popup is open */
body.popupjama-body-open {
    overflow: hidden;
}

/* Overlay */
.popupjama-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    animation: popupjamaFadeIn 0.3s ease;
}

.popupjama-closing .popupjama-overlay {
    animation: popupjamaFadeOut 0.3s ease forwards;
}

/* Content */
.popupjama-content {
    position: relative;
    z-index: 2;
    max-height: 90vh;
    overflow-y: auto;
    box-sizing: border-box;
}

.popupjama-body {
    padding: 0;
}

/* Close button */
.popupjama-close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: #454545;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.popupjama-close:hover,
.popupjama-close:focus,
.popupjama-close:active,
.popupjama-close:visited {
    color: #454545;
    background: transparent;
    outline: none;
    box-shadow: none;
    border: none;
    text-decoration: none;
}

/* Position variants */
.popupjama-position-center {
    justify-content: center;
    align-items: center;
}

.popupjama-position-top {
    justify-content: center;
    align-items: flex-start;
    padding-top: 40px;
}

.popupjama-position-bottom {
    justify-content: center;
    align-items: flex-end;
    padding-bottom: 0;
}

.popupjama-position-bottom .popupjama-content {
}

.popupjama-position-left {
    justify-content: flex-start;
    align-items: stretch;
}

.popupjama-position-left .popupjama-content {
    height: 100%;
    max-height: 100vh;
}

.popupjama-position-right {
    justify-content: flex-end;
    align-items: stretch;
}

.popupjama-position-right .popupjama-content {
    height: 100%;
    max-height: 100vh;
}

.popupjama-position-fullscreen .popupjama-content {
    width: 100% !important;
    max-width: 100% !important;
    height: 100%;
    max-height: 100vh;
    border-radius: 0;
}

/* Animations */
@keyframes popupjamaFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes popupjamaSlideDown {
    from { opacity: 0; transform: translateY(-50px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes popupjamaSlideUp {
    from { opacity: 0; transform: translateY(50px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes popupjamaSlideLeft {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes popupjamaSlideRight {
    from { opacity: 0; transform: translateX(-50px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes popupjamaZoomIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

/* Animation classes */
.popupjama-anim-fadeIn {
    animation: popupjamaFadeIn 0.3s ease forwards;
}

.popupjama-anim-slideDown {
    animation: popupjamaSlideDown 0.3s ease forwards;
}

.popupjama-anim-slideUp {
    animation: popupjamaSlideUp 0.3s ease forwards;
}

.popupjama-anim-slideLeft {
    animation: popupjamaSlideLeft 0.3s ease forwards;
}

.popupjama-anim-slideRight {
    animation: popupjamaSlideRight 0.3s ease forwards;
}

.popupjama-anim-zoomIn {
    animation: popupjamaZoomIn 0.3s ease forwards;
}

/* Closing animations */
.popupjama-closing .popupjama-content {
    animation: popupjamaFadeOut 0.3s ease forwards;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .popupjama-content {
        max-width: 95% !important;
    }

    .popupjama-position-top {
        padding-top: 10px;
    }

    .popupjama-close {
        top: 4px;
        right: 4px;
    }
}
