﻿.search-box {
    position: relative
}

.searchInput {
    width: 100%;
    padding-right: 30px;
    box-sizing: border-box;
}

.search-clear {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    /*display: none;*/
}
/*Employee-tiles*/
.dtiles-primary {
    margin-left: 22px;
    margin-right: 22px;
    background-color: white;
    padding-top: 15px;
    padding-bottom: 15px;
}
.dtiles-primary .d-flex {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
    text-align: center;
}

    .dtiles-primary .d-flex div {
        background: #fff;
        border: 1px solid #ddd;
        border-radius: 10px;
        padding: 16px 12px;
        width: 22%;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        transition: all 0.3s ease;
        cursor: default;
    }

        .dtiles-primary .d-flex div:hover {
            box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
            transform: translateY(-4px);
        }

    .dtiles-primary .d-flex span {
        font-size: 1.8rem;
        font-weight: 700;
        color: #222;
        line-height: 1;
    }

.dtiles-primary p {
    margin: 0;
    font-weight: 500;
    color: #444;
    font-size: 1.5rem;
}


/*.org-chart {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    overflow-x: auto;
    padding: 1rem 0;
}
.org-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    margin-bottom: 1.25rem;
}*/

/* Card */
/*.person-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    min-width: 200px;
    text-align: left;
    transition: all 0.2s ease;
}

    .person-card:hover {
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
        transform: translateY(-2px);
    }

.person-photo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.person-info {
    display: flex;
    flex-direction: column;
}

.person-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: #0C111D;
}

.person-designation {
    font-size: 0.85rem;
    color: #555;
}

.person-dept {
    font-size: 0.8rem;
    color: #888;
}
.children-container {*/
    /*display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 2rem;
    flex-wrap: nowrap;*/ /* ensures single horizontal line */
    /*margin-top: 1rem;*/
    /*display: flex;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap;*/ /* allow wrapping to next line */
    /*gap: 2rem;
    margin-top: 1rem;
}
    .children-container > .org-node {*/
        /* display: flex;
        flex-direction: column;
        align-items: center;*/
        /*flex: 1 1 calc(33.333% - 2rem);*/ /* 3 per row */
        /*max-width: calc(33.333% - 2rem);
        min-width: 250px;*/ /* prevents shrinking too much */
        /*display: flex;
        flex-direction: column;
        align-items: center;
    }

.connector-vertical {
    width: 2px;
    height: 20px;
    background-color: #ccc;
    margin: 0.25rem 0;
}*/
/* container */
.org-chart {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    overflow-x: auto;
    padding: 1rem 0;
}

/* one node (person + optional children) */
.org-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

/* card */
.person-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    min-width: 250px;
    transition: all 0.2s ease;
}

    .person-card:hover {
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
        transform: translateY(-2px);
    }

.person-photo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.person-info {
    display: flex;
    flex-direction: column;
}

.person-name {
    font-weight: 500;
    font-size: 12px;
    color: #0C111D;
}

.person-designation {
    font-size: 0.85rem;
    color: #555;
}

.person-dept {
    font-size: 0.8rem;
    color: #888;
}

/* vertical connector between card and children row */
.connector-vertical {
    width: 2px;
    height: 10px;
    background-color: #ccc;
    margin: 0.25rem 0;
}


/* grid with 1–3 columns depending on --cols */
.children-row {
    display: grid;
    grid-template-columns: repeat(var(--cols, 3), minmax(250px, 1fr));
    gap: 1.2rem;
    width: 100%;
    justify-items: center; /* center each card inside its track */
}

/* each cell just centers its node */
.children-row__cell {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* responsive fallbacks (optional) */
@media (max-width: 900px) {
    .children-row {
        grid-template-columns: repeat(min(var(--cols, 3), 2), minmax(240px, 1fr));
    }
}

@media (max-width: 560px) {
    .children-row {
        grid-template-columns: 1fr;
    }
}
