/* The entire popup overlay */
.popup {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    
    /* Background overlay with blur */
    background-color: rgba(3, 3, 39, 0.84);
    backdrop-filter: blur(35px);
    -webkit-backdrop-filter: blur(35px);
    
    /* Use flexbox to center popup-content horizontally & vertically */

    align-items: center;
    justify-content: center;
    
    /* Fade-in animation */
    opacity: 0; /* Start invisible */
    transition: opacity 0.5s;
    
    /* Prevent clicks when hidden */
    pointer-events: none;
    overflow: hidden; /* So the page doesn’t scroll under the popup */
}

/* When the popup is shown (.show added), make it interactive and visible */
.popup.show {
    opacity: 1;
    pointer-events: auto; /* Enable clicks */
}

/* Clicking outside closes the popup */
.popup.show::before {
    content: "";
    position: absolute;
    inset: 0; /* top:0, right:0, bottom:0, left:0 */
    pointer-events: auto;
}


.popup-content {
    position: relative;
    background-color: transparent;
    border-radius: 16px;
    width: 32vw;
    height: 72vh;
    max-width: 32vw;
    min-width: 350px;
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.5s, transform 0.5s;
    pointer-events: auto;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-direction: column;
}

/* When popup is shown, animate popup-content up (from 50px -> 0) and fade in */
.popup.show .popup-content {
    opacity: 1;
    transform: translateY(0);
}

/* IDENTICAL closing animation */
.popup.hiding .popup-content {
    opacity: 0;
    transform: translateY(50px); /* Moves back down */
}

/* Close button */
.close-btn {
    position: absolute;
    top: -8%;
    right: 0%;
    font-size: 22px;
    cursor: pointer;
    color: #fff;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10003;
}

/* Calendly widget takes full size of popup-content */
.calendly-inline-widget {
    width: 100% !important;
    height: 100% !important;
    border: none;
    z-index: 10001;
}

/* Lock the page scrolling when popup is active */
html.popup-active,
body.popup-active {
    overflow: hidden;
}

