/* Employee Hierarchy Collapse Animation */

/* Container that holds the card will also collapse */
div:has(> .card.hierachy-tree.hide) {
    width: 0 !important;
    min-width: 0 !important;
    flex-shrink: 0;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                min-width 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.4s ease,
                padding 0.4s ease;
    overflow: hidden;
}

.card.hierachy-tree {
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                padding 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                margin 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                border 0.4s ease;
    max-height: 10000px;
}

/* Collapse state - shrink height, width handled by parent container transition, override global .hide display:none */
.card.hierachy-tree.hide {
    display: flex !important;
    flex-direction: column;
    max-height: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    padding-left: 4px !important;
    padding-right: 4px !important;
    margin: 0 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    overflow: hidden !important;
    border-right: none !important;
}

.card.hierachy-tree.hide .card-header,
.card.hierachy-tree.hide .card-body,
.card.hierachy-tree.hide .pa,
.card.hierachy-tree.hide .bb {
    display: none;
}

/* Float icon - collapse button indicator, slides in from left */
.float-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 8px;
    cursor: pointer;
    animation: slideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    position: fixed;
    left: 8px;
    top: 20%;
    transform: translateY(-50%);
    z-index: 200;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    transition: background 0.3s ease;
}

.float-icon:hover {
    background: rgba(0, 0, 0, 0.5);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-50%) translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(-50%) translateX(0);
    }
}

/* Parent container smooth transition */
.card.hierachy-tree,
.card.hierachy-tree.hide {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}




