/* ============================================================
   GOLF GENIUS MODAL — FINAL, CLEAN, WORKING VERSION
   Uses the same activation pattern as your working TWSF modal
   ============================================================ */

/* Overlay (hidden by default, no flex yet) */
#gg-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.65);
    z-index: 999999;
    display: none; /* hidden until JS activates it */
    overflow: hidden;
}

/* Activated overlay (flex centering) */
#gg-modal-overlay.gg-active {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

/* Modal container */
#gg-modal {
    position: relative;
    background: #fff;
    width: 90vw;
    height: 90vh;
    max-width: 1100px;
    max-height: 850px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 0 25px rgba(0,0,0,0.4);
}

#tw-gg-content {
    border: 2px solid #ccc;
    padding: 20px;
    border-radius: 8px;
    background: #fff;
}


/* Partial overlay for event list click interception */
#tw-gg-modal-overlay {
    position: absolute;
    left: 0;
    width: 100%;
    top: 520px;              /* event list starts here */
    height: 2000px;          /* tall enough for all rows */
    background: rgba(0,0,0,0); /* fully transparent */
    z-index: 100000;         /* above iframe, below close button */
    pointer-events: auto;
}


/* Close button */
#gg-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 32px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1000000;
}

#gg-close {
    color: #000 !important;
    font-size: 36px;
    font-weight: 700;
}



/* Iframe fills modal */
#gg-frame {
    width: 100%;
    height: 100%;
    border: none;
}

#tw-gg-frame-container {
    position: relative;
    width: 100%;
    height: 3400px; /* increase height */
    overflow: hidden;
}


#tw-gg-page1-frame {
    width: 100%;
    height: 100%;
    border: 0;
}



#tw-gg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    background: rgba(0,0,0,0); /* fully transparent */
    z-index: 10;
}


/* Desktop sizing */
@media (min-width: 900px) {
    #gg-modal {
        width: 1100px;
        height: 850px;
        max-width: 95vw;
        max-height: 95vh;
    }
}

/* Mobile sizing override */
@media (max-width: 600px) {

    /* Make the modal taller on phones */
    #gg-modal {
        height: 95vh !important;
        max-height: 95vh !important;
    }

    /* Ensure the iframe fills the modal */
    #gg-frame,
    #tw-gg-frame-container,
    #tw-gg-page1-frame {
        height: 95vh !important;
        max-height: 95vh !important;
    }

    /* Allow scrolling inside the iframe container */
    #tw-gg-frame-container {
        overflow-y: auto !important;
    }
}

