.tab-content>.tab-pane, .pill-content>.pill-pane {
	display: block !important;
	/* undo display:none */
	height: 0 !important;
	/* height:0 is also invisible */
	overflow: hidden !important;
	/* no-overflow */
}

.tab-content>.active, .pill-content>.active {
	height: auto !important;
	/* let the content decide it */
}



/* 1. Prevent the container from collapsing to 0 during the swap */
.tab-content {
    position: relative;
    min-height: 1px; /* Ensures there is always a baseline */
}

/* 2. Custom visibility logic that bypasses 'display: none' */
.tab-content > .acf-innerblocks-container .tab-pane,
.tab-content > .tab-pane {
    display: block !important; 
    height: 0 !important;
    overflow: hidden !important;
    visibility: hidden;
    opacity: 0;
    /* Use a simple transition for the opacity only */
    transition: opacity 0.15s linear;
}

/* 3. The Active State */
.tab-content > .acf-innerblocks-container  .tab-pane.active.show,
.tab-content > .tab-pane.active.show {
    height: auto !important;
    visibility: visible;
    opacity: 1;
    overflow: visible !important;
}

/* 4. Disable Bootstrap's default 'fade' class if it's causing extra delay */
.tab-content > .acf-innerblocks-container .tab-pane.fade:not(.show),
.tab-content > .tab-pane.fade:not(.show) {
    display: block !important;
}