﻿@media (min-width: 991.98px) {
    .has-detailed-sidebar .page-main {
        -ms-grid-columns: 1fr 330px;
        grid-template-columns: 1fr 330px;
        --sticky-header-right: 330px;
    }
}

.has-detailed-sidebar #content {
    grid-column: 1 / 2;
    margin-right: 0;
}

.has-detailed-sidebar #mcv,
.has-detailed-sidebar #tenant_expiry {
    color: #fff !important;
    z-index: 999999;
}

.detailed-sidebar {
    background-image: url(/images/bg-side.jpg);
    background-position-y: -70px;
    grid-column: 2 / -1;
    grid-row: 2 / -1;
    background-attachment: fixed;
    position: relative;
}

    .detailed-sidebar > .dcw {
        --dcw-m: 0.5rem;
        --dcw-top: var(--header-height);
        --dcw-h: calc(100vh - var(--dcw-top) - var(--dcw-m));
        --dcw-w: calc(var(--sticky-header-right) - var(--dcw-m) - var(--content-padding-x));
        position: sticky;
        top: var(--dcw-top);
        height: var(--dcw-h);
        width: var(--dcw-w);
        margin: var(--dcw-m);
        border-radius: 0.3rem;
        will-change: height;
        transition: height 0.25s ease-in-out;
        margin-top: 0;
    }

        .detailed-sidebar > .dcw::after {
            content: "";
            background: url('/images/empty-effect.png') no-repeat;
            position: absolute;
            top: 0;
            left: 0;
            height: 100%;
            width: 100%;
            filter: opacity(0.2);
            background-size: cover;
            z-index: -1;
        }

    .detailed-sidebar > .spinner.active,
    .detailed-sidebar > .empty {
        display: flex;
        align-items: center;
        justify-content: center;
        height: calc(100vh - 1rem - var(--header-height));
        background-color: aliceblue;
        margin: .5rem;
        width: calc(var(--sticky-header-right) - .5rem - var(--content-padding-x));
        top: var(--header-height);
        position: fixed;
        transition: top 0.25s ease, height 0.15s ease-in-out;
    }

.sticky-header .detailed-sidebar > .empty,
.sticky-header .detailed-sidebar > .spinner.active {
    top: 0px;
    height: calc(100vh - (var(--dcw-m) * 2));
}

.detailed-sidebar > .empty {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
    color: #8d9ba9;
}

.detailed-sidebar > .dcw .entity {
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: var(--dcw-m);
    border-radius: 0.3rem;
    height: 100%;
    position: relative;
    top: calc(var(--dcw-m));
    height: calc(100% - var(--dcw-m));
}

    .detailed-sidebar > .dcw .entity .x-pane {
        flex: 1 1 auto;
        min-height: 0;
        overflow: auto;
        overscroll-behavior: contain;
    }

    .detailed-sidebar > .dcw .entity::before {
        content: "";
        position: absolute;
        border-radius: 0.3rem;
        top: 0;
        left: 0;
        height: 100%;
        width: 100%;
        background: aliceblue;
        z-index: -2;
    }

.detailed-sidebar > .dcw .entity-header {
    position: sticky;
    top: 0;
    z-index: 2;
}

    .detailed-sidebar > .dcw .entity-header .card {
        box-shadow: 0 0 0.625rem 0 rgb(48 122 190 / 50%);
    }

.detailed-sidebar > .dcw .entity .open-external {
    position: absolute;
    top: 0;
    right: 0;
}

/*EMPLOYEE*/
.detailed-sidebar > .dcw .employee {
    --dcw-e-img-s: 140px;
    --dcw-e-top: calc(var(--dcw-e-img-s) / 2);
    top: var(--dcw-e-top);
    height: calc(100% - var(--dcw-e-top));
    will-change: height;
    transition: height 0.15s ease-in-out;
}

    .detailed-sidebar > .dcw .employee .emp-badge {
        position: absolute;
        top: 0;
        transform: translateY(-50%);
        left: 0.3rem;
    }

    .detailed-sidebar > .dcw .employee .status-badge {
        right: 0.3rem;
        left: auto;
    }

    .detailed-sidebar > .dcw .employee .employee-img,
    .detailed-sidebar > .dcw .employee .employee-img::after {
        width: var(--dcw-e-img-s);
        height: var(--dcw-e-img-s);
        margin: calc(var(--header-height) * -1) auto 0;
        border-radius: 50%;
        overflow: hidden;
        border: 10px solid #0b1642;
        border-bottom-width: 5px;
        border-top-width: 5px;
        box-shadow: 0 16px 38px -12px rgba(0, 0, 0, 0.56), 0 4px 25px 0px rgba(0, 0, 0, 0.12), 0 8px 10px -5px rgba(0, 0, 0, 0.2);
    }

        .detailed-sidebar > .dcw .employee .employee-img img {
            width: 100%;
            height: 100%;
            pointer-events: none;
        }

        .detailed-sidebar > .dcw .employee .employee-img::after {
            content: "";
            position: absolute;
            width: calc(var(--dcw-e-img-s) + 10px);
            top: 0;
            left: calc(50% - (var(--dcw-e-img-s) / 2) - 5px);
            box-shadow: none;
            border: 10px solid aliceblue;
            z-index: -2;
        }

.sticky-header .detailed-sidebar > .dcw .employee {
    height: calc(100% - var(--dcw-e-top));
}


/*COMPANY*/
.detailed-sidebar > .dcw .company .open-external {
    top: 0.25rem;
    right: 0.25rem;
}

[dir=rtl] .has-detailed-sidebar #content {
    margin-right: var(--content-padding-x);
    margin-left: 0;
}

    [dir=rtl] .has-detailed-sidebar #content .section-header.sticky {
        left: var(--sticky-header-right);
        right: var(--sticky-header-left);
    }

@media (max-width: 991.98px) {
    .has-detailed-sidebar #content {
        grid-column: 1 / -1;
        margin: 0 var(--content-padding-x);
    }

    [dir=rtl] .has-detailed-sidebar #content {
        margin: 0 var(--content-padding-x);
    }
}

[dir=rtl] .detailed-sidebar > .dcw .employee .emp-badge {
    right: 0.3rem;
    left: auto;
}

[dir=rtl] .detailed-sidebar > .dcw .employee .status-badge {
    left: 0.3rem;
    right: auto;
}

[dir=rtl] .detailed-sidebar > .dcw .entity .open-external {
    right: auto;
    left: 0;
}

    [dir=rtl] .detailed-sidebar > .dcw .entity .open-external i {
        transform: scaleX(-1);
    }
