/* 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 > .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 > .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 > .tab-pane.fade:not(.show) {
    display: block !important;
}