css/* BREAK DOWN PARAGRAPH BLOCKS TRAPPING THE CONTAINER */
.elementor-text-editor p:has(.atomic-wrap-figure) {
    display: inline !important; 
}

/* FLOATS AND FRAMES THE ENTIRE IMAGE + CAPTION UNIT TOGETHER */
.atomic-wrap-figure {
    float: left !important; /* Change to right if preferred */
    display: block !important;
    clear: none !important; 
    margin-right: 25px !important; 
    margin-bottom: 20px !important; 
    margin-top: 5px !important;
    
    /* We place the border and shadow here so the theme cannot block it */
    background: #ffffff !important; /* White card backing */
    padding: 10px !important; /* Generates space between the image/text and the border frame */
    border: 1px solid #d1d5db !important; /* Darker, clearly visible frame line */
    box-shadow: 0px 8px 20px rgba(0, 0, 0, 0.08) !important; /* Clean, noticeable shadow */
    border-radius: 6px !important;
}

/* HARD CONTROLS THE IMAGE SIZE INSIDE THE FRAME */
.atomic-wrap-image {
    width: 480px !important; /* Slightly reduced from 500px to allow for the 10px padding */
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
    margin: 0 auto !important;
    border-radius: 2px !important; /* Very slight rounding on the photo corners */
}

/* KEEPS THE CAPTION CENTRED AND LOCKED TO THE PICTURE WIDTH */
.atomic-wrap-caption,
.atomic-wrap-caption * {
    display: block !important;
    width: 100% !important;
    max-width: 480px !important; 
    text-align: center !important; 
    text-align-last: center !important; 
    justify-content: center !important;
    font-size: 0.85rem !important; 
    color: #555555 !important; 
    line-height: 1.4 !important;
    margin-top: 10px !important;
    margin-bottom: 2px !important;
    font-style: italic !important;
}

/* Keeps the sentence elements flowing natively in a line */
.inline-popup-row {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important; 
    gap: 0 10px !important; 
    position: relative !important;
}

/* Hides the operational system checkbox entirely */
.popup-toggle-checkbox {
    display: none !important;
}

/* Formats the keywords to look like an official clickable link */
.popup-trigger-label {
    cursor: pointer !important;
    text-decoration: underline dotted #dea6cf !important; 
    color: #dea6cf !important; 
    font-weight: 600 !important;
    display: inline-block !important;
}

/* Structural styling for the popup wrapper layout */
.click-popup-wrapper {
    position: absolute !important;
    bottom: 140% !important; 
    left: 25% !important;
    z-index: 99999 !important;
    transition: opacity 0.2s ease-in-out !important;
    background: #ffffff !important;
    border-radius: 6px !important;
    box-shadow: 0px 10px 25px rgba(0, 0, 0, 0.15) !important;
    border: 1px solid #d1d5db !important; 
    
    /* MASTER POPUP SIZE OVERRIDE (Change this number to resize the card layout) */
    width: 450px !important; 
    max-width: 450px !important; 
}

/* Forces the image component to physically stretch to the card size */
.click-popup-image {
    width: 100% !important;
    max-width: 100% !important; /* Forces the image node to fill the 450px layout container */
    height: auto !important;
    display: block !important;
    border-top-left-radius: 6px !important;
    border-top-right-radius: 6px !important;
    border-bottom-left-radius: 0px !important;
    border-bottom-right-radius: 0px !important;
}

/* Styles the caption text underneath the popup image */
.popup-hover-caption {
    display: block !important;
    width: 100% !important;
    
    /* Matches image frame container sizes perfectly */
    max-width: 450px !important; 
    
    text-align: center !important; 
    font-size: 0.85rem !important; 
    color: #4b5563 !important; 
    line-height: 1.4 !important;
    padding: 10px 8px 10px 8px !important; 
    font-style: italic !important;
    background: #ffffff !important; 
    border-bottom-left-radius: 6px !important; 
    border-bottom-right-radius: 6px !important;
}

/* Formats the floating red "X" circle toggle overlay button */
.popup-close-btn {
    position: absolute !important;
    top: -10px !important;
    right: -10px !important;
    width: 24px !important;
    height: 24px !important;
    background: #ef4444 !important; 
    color: #ffffff !important;
    font-size: 18px !important;
    font-weight: bold !important;
    line-height: 22px !important;
    text-align: center !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    box-shadow: 0px 2px 6px rgba(0,0,0,0.2) !important;
    z-index: 100000 !important;
}

/* HARD SHOW TRIGGER: Forces the inline visibility to turn on when checked */
.popup-toggle-checkbox:checked ~ .click-popup-wrapper {
    opacity: 1 !important;
    pointer-events: auto !important;
}





/* ========================================== */
/*   1. THE EXPANDABLE BUTTON STYLING         */
/* ========================================== */

.tree-toggle-button {
    display: inline-block !important;
    cursor: pointer !important;
    background-color: #0D9488 !important; /* Brand Blue */
    color: #ffffff !important;
    padding: 12px 35px !important; 
    font-size: 1rem !important;
    font-weight: 600 !important;
    border-radius: 26px !important;
    text-align: center !important;
    box-shadow: 0px 4px 12px rgba(59, 130, 246, 0.2) !important;
    transition: all 0.2s ease-in-out !important;
    margin-bottom: 25px !important;
    user-select: none !important;
}

.tree-toggle-button:hover {
    background-color: #0F766E !important; 
    transform: translateY(-2px) !important;
}


/* ========================================== */
/*   2. BUTTON TEXT TOGGLE LOGIC              */
/* ========================================== */

.tree-toggle-button .btn-text-hide { display: none !important; }
.tree-toggle-button .btn-text-show { display: inline !important; }

.tree-toggle-checkbox:checked ~ .tree-toggle-button .btn-text-hide { display: inline !important; }
.tree-toggle-checkbox:checked ~ .tree-toggle-button .btn-text-show { display: none !important; }
.tree-toggle-checkbox:checked ~ .tree-toggle-button { background-color: #4b5563 !important; } /* Changes button to grey when open */


/* ========================================== */
/*   3. THE MASTER REVEAL & ZOOM SIZE CONTROL */
/* ========================================== */

/* Unrolls the wrapper container when the button is clicked */
.tree-toggle-checkbox:checked ~ .tree-collapsible-wrapper {
    display: block !important;
}

/* Forces the massive tree structures inside the wrapper to scale down to 80% */
.tree-collapsible-wrapper .gt-tree-wrapper,
.tree-collapsible-wrapper .familytree {
    display: block !important;
    transform: scale(0.80) !important; /* Zoom scale down to 80% size */
    transform-origin: top center !important;
}


/* ========================================== */
/*   4. SMOOTH SCROLLBAR DESIGN               */
/* ========================================== */

.tree-collapsible-wrapper {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}
.tree-collapsible-wrapper::-webkit-scrollbar {
    height: 6px;
}
.tree-collapsible-wrapper::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 10px;
}




/* NEW DEDICATED RIGHT-SIDE WRAPPER */
.atomic-wrap-figure-right {
    float: right !important;
    display: block !important;
    clear: none !important; 
    margin-left: 25px !important; /* Pushes text away from the left of the image */
    margin-bottom: 20px !important; 
    margin-top: 5px !important;
    background: #ffffff !important; 
    padding: 10px !important; 
    border: 1px solid #d1d5db !important; 
    box-shadow: 0px 8px 20px rgba(0, 0, 0, 0.08) !important; 
    border-radius: 6px !important;
}
/* ======================================================= */
/*  DEDICATED RIGHT-ALIGNED FLOATING CONTAINER             */
/* ======================================================= */

.atomic-wrap-figure-right {
    float: right !important; /* Forces the entire box unit to the right wall */
    display: block !important;
    clear: none !important; 
    
    /* Pushes wrapping text cleanly away from the left edge of the box */
    margin-left: 25px !important;  
    margin-right: 0px !important; 
    margin-bottom: 20px !important; 
    margin-top: 5px !important;
    
    /* Polaroid frame effects */
    background: #ffffff !important; 
    padding: 10px !important; 
    border: 1px solid #d1d5db !important; 
    box-shadow: 0px 8px 20px rgba(0, 0, 0, 0.08) !important; 
    border-radius: 6px !important;
}

/* Forces the caption components inside this block to stay centered */
.atomic-wrap-figure-right .atomic-wrap-caption,
.atomic-wrap-figure-right .atomic-wrap-caption * {
    display: block !important;
    width: 100% !important;
    max-width: 480px !important; /* Must match yesterday's image width style */
    
    /* Hard overrides to anchor the centering underneath the photo */
    text-align: center !important; 
    text-align-last: center !important; 
    justify-content: center !important;
    
    font-size: 0.85rem !important; 
    color: #555555 !important; 
    line-height: 1.4 !important;
    margin-top: 10px !important;
    margin-bottom: 2px !important;
    font-style: italic !important;
	}



















