@import 'theme/variables.scss';

.pickup-delivery-popover {
    top: -38px !important;
    max-width: 420px !important;

    .popover-body {
        transform: none;
        margin-left: -4px;
        margin-top: -1px;
    }

    &.bs-popover-top {
        top: auto !important;
        bottom: -38px !important;

        .load-component {
            .assigned-load-holder {
                order: 3;

                margin-top: 4px;
                margin-bottom: 0 !important;
            }

            .statusBar {
                order: 2;

                margin-top: 4px;
            }

            .animation-three-tabs {
                order: 1;
            }
        }
    }
}

.load-pickup-delivery-popover {
    top: -34px !important;
    max-width: 400px !important;
}

.gps_dropdown_popover {
    top: -38px;
    max-width: 748px !important;

    .popover-body {
        padding: 0;
    }
}

// Table Miles and Days Progress Popover
.table-progress-popover {
    background-color: unset !important;
    margin-left: -10px;

    .progress-dropdown {
        margin-top: -6px;
        width: 260px;
        height: 200px;
        background: $ta-black-2;
        border-radius: 3px;
        padding: 8px;
        box-shadow: $box-shadow-3;
        overflow: hidden;
        -webkit-animation: progressAnimation 0.25s ease-in-out;
        animation: progressAnimation 0.25s ease-in-out;

        .progress-header {
            .progress-title {
                font-size: 18px;
                font-weight: 600;
                color: $white;

                span {
                    font-weight: 400;
                }
            }

            .progress-total {
                font-size: 14px;
                line-height: 17px;
                color: $white;
            }
        }

        .table-progress-bar-container {
            width: 100%;
            height: 8px;
            margin-top: 6px;
            border-radius: 2px;
            overflow: hidden;

            .table-progress-bar {
                height: 100%;
            }
        }

        .progress-dropdown-body {
            .progress-dual-info-container {
                .progress-info-container {
                    width: 50%;
                }
            }

            .progress-info-container {
                margin-top: 10px;

                .progress-info-title {
                    margin-bottom: 2px;
                    font-size: 11px;
                    font-weight: 700;
                    line-height: 14px;
                    color: $white-4;
                }

                .progress-info-text {
                    font-size: 14px;
                    line-height: 18px;
                    color: $white;
                }
            }
        }

        &.credit-dropdown {
            height: 100px;
        }
    }

    @-webkit-keyframes progressAnimation {
        from {
            height: 0px;
        }
        to {
            height: 220px;
        }
    }

    @keyframes progressAnimation {
        from {
            height: 0px;
        }
        to {
            height: 220px;
        }
    }
}

// REMOVE POPOVER ARROW GLOBAL
ngb-popover-window {
    .popover-arrow {
        display: none !important;
    }

    padding: unset !important;
    border: unset !important;

    .popover-body {
        padding: unset !important;
    }
}

.dispatch-note {
    .popover-body {
        position: relative;
        top: -4px;
        left: -4px;
    }
}

.dropdown-menu-popover {
    .popover-body {
        transform: none;
    }
    &.bs-popover-end-top  {
       margin-left: -4px !important;
       margin-top: -4px !important;
    }

    &.bs-popover-bottom-end  {
       margin-right: -4px !important;
       margin-top: -3px !important;
    }

    &.bs-popover-end-bottom {
       margin-left: -3px !important;
       margin-bottom: -4px !important;
    }

    &.bs-popover-top-end {
       margin-right: -4px !important;
       margin-bottom: -3px !important;
    }

    // pickup delivery component
    &.ca-pickup-delivery-dropdown-popover {
        &.bs-popover-end-top {
            margin-left: 0 !important;
            margin-top: -6px !important;
        }
    }

    &.ca-pickup-delivery-list-dropdown-popover {
        &.bs-popover-end-top {
            margin-left: 4px !important;
            margin-top: -6px !important;
        }
    }
}

.dropdown-details-title-card-popover {
    .dropdown-container {
        transform: translate(0, -4px);
    }
}

.fleet-filter-popover {
    &.bs-popover-bottom-start .fleet-filter-dropdown-container {
        transform: translate(-4px, -4px) !important;
    }

    &.bs-popover-top-start .fleet-filter-dropdown-container {
        transform: translate(-4px, 4px) !important;
    }
}

.fleet-filter-sort-popover.bs-popover-end-top {
    transform: translate(158px, -3px) !important;
}

.factoring-dropdown-popover {
    &.bs-popover-bottom-end .factoring-dropdown-container {
        transform: translate(4px, -4px) !important;
    }
}

.items-dropdown-popover {
    &.bs-popover-bottom-start {
        margin-top: -4px !important;
    }

    &.bs-popover-top-start {
        margin-bottom: -4px !important;
    }
}
