.interactive-popup-content-block {
    max-width: 700px;
    width: 95vw;
    background: #ffffff;
    height: 80vh !important;
    max-height: 80vh !important;
    position: relative;
    border-radius: 4px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: inline-flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    box-sizing: border-box;
}

/* Inner Scroll Container */
.ip-scroll-container {
    overflow-y: auto !important;
    overflow-x: hidden;
    padding: 70px 30px 50px;
    flex: 1 1 auto;
    /* Grow and shrink but respect parent height */
    min-height: 0;
    /* CRITICAL for flex-child scrolling */
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

/* Ensure Fancybox doesn't force height auto */
.interactive-popup-container .fancybox-content {
    padding: 0 !important;
    height: fit-content !important;
    overflow: hidden !important;
}



/* Top Right Sticky Area (Decoration + Close Button) */
.ip-sticky-corner {
    position: absolute;
    top: 0;
    right: 0;
    width: 140px;
    height: 140px;
    z-index: 100;
    pointer-events: none;
    /* Let clicks pass through to close button below */
}

/* Close Decoration (Teal Triangle) */
.ip-sticky-corner::before {
    content: "";
    background-image: url('/wp-content/uploads/2025/01/close-bg.png');
    background-size: contain;
    background-repeat: no-repeat;
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
}


/* Removed redundant/moved to .ip-sticky-corner */


/* Shared Header Styles */
.ip-program-user-popup,
.ip-committee-popup {
    text-align: center;
    border-radius: 0 !important;
}

.ip-program-user-popup .ip-logo,
.ip-committee-popup .ip-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 25px;
}

.ip-program-user-popup .ip-logo img,
.ip-committee-popup .ip-logo img {
    max-width: 180px;
    height: auto;
}

.ip-program-user-popup .ip-main-heading,
.ip-committee-popup .ip-main-heading {
    color: var(--primary-color);
    font-size: var(--heading-3);
    font-weight: 700;
    margin: 0 0 10px 0;
    line-height: 1.3;
    letter-spacing: 1;
}

.ip-program-user-popup .ip-sub-heading,
.ip-committee-popup .ip-sub-heading {
    color: #14203D;
    font-size: var(--heading-4);
    font-weight: 500;
    line-height: 1.3;
    margin: 0 auto 30px;
    max-width: 850px;
    letter-spacing: 0.3px;
}

/* Program User Layout Specifics */
.ip-program-user-popup .ip-scroll-container {
    padding: 70px 50px 50px !important;
}

/* Committee Layout Specifics */
.ip-committee-popup .ip-scroll-container {
    padding: 70px 30px 50px !important;
    text-align: left !important;
}


.ip-committee-popup header {
    text-align: center;
}

.ip-committee-popup .ip-popup-content-heading h3 {
    color: #12A085;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 25px;
    text-align: left;
}

.ip-committee-popup .ip-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}

.ip-committee-popup .ip-col-6 {
    display: flex;
    flex-direction: column;
    background: #D9F9F4;
    transition: transform 0.2s ease;
}

.ip-committee-popup .ip-member-img {
    background: #E0E0E0;
    overflow: hidden;
    position: relative;
    height:180px;
    /* Tiny top offset to match image style */
}

.ip-committee-popup .ip-member-img img {
    width: 100%;
    height: auto;
    display: block;
    mix-blend-mode: multiply;
    /* Helps blend grayscale images */
}

.ip-committee-popup .ip-member-content {
    padding: 20px;
    flex-grow: 1;
}

.ip-committee-popup .ip-member-content h4 {
    color: #1C2B39;
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 8px 0;
}

.ip-committee-popup .ip-member-content p {
    color: #1C2B39;
    font-size: 16px;
    line-height: 1.4;
    margin: 0;
    opacity: 0.9;
}

@media (max-width: 768px) {
    .ip-committee-popup .ip-grid-2 {
        grid-template-columns: 1fr;
    }
}


/* Consolidated Decorations */



/* Fancybox Close Button Override (Stays pinned to the corner) */
.interactive-popup-container .fancybox-close-small {
    position: absolute !important;
    top: 25px !important;
    right: 25px !important;
    color: #12a085 !important;
    opacity: 1 !important;
    z-index: 101;
    /* Higher than triangle */
    border-radius: 50%;
    background: #fff;
    width: 44px;
    height: 44px;
}

.interactive-popup-container .fancybox-close-small:hover {
    background: #000;
    color: #fff !important;
}


/* Interactive Popup Trigger Classes */
.interactive-popup-trigger {
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.interactive-popup-trigger:hover {
    opacity: 0.8;
}

.interactive-popup-trigger.loading {
    cursor: wait;
    opacity: 0.5;
    pointer-events: none;
}

.fancybox-content-wrapper {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}