@import "../settings/_mixins";
@import "../settings/_variables";

.dnetor-team-member {
    .dnetor-team-member-icon-wrap {
        z-index: 10;
        .dnetor-team-member-icon {
            color: $accent_color;
            fill: $accent_color;
            text-align: center;
            width: 24px;
            height: 24px;
            font-size: 20px;
            display: block;
            background: #fff;
            border-radius: 50%;
            position: relative;
            padding: 20px;
            @include box-shadow(0 0 10px 0 rgba(0, 0, 0, 0.15));
            @include transition(all 0.3s ease);
            margin-bottom: 10px;
            svg {
                width: 20px;
            }
            &:hover {
                cursor: pointer;
                color: #fff;
                fill: #fff;
                background-color: $accent_color;
            }

            .dnetor-icon-element {
                position: absolute;
                top: 50%;
                left: 50%;
                @include transform(translate(-50%, -50%));
            }
        }
    }

    .dnetor-team-member-content {
        width: 100%;
        .dnetor-team-member-name {
            font-size: 24px;
            margin-top: 0;
        }
    }

    .dnetor-team-member-pos {
        color: $secondary_color;
        margin-top: 0;
    }

    .dnetor-team-member-name {
        margin-bottom: 3px;
    }

    .progress-title{
        margin-top: 0;
    }

    &.dnetor-team-member-layout-01 {
        .dnetor-team-member-item:hover {
            .dnetor-image {
                .image:after {
                    opacity: 1;
                }
                .dnetor-team-member-social {
                    opacity: 1;
                    @include transform(scale(1));
                }
            }
        }
        .dnetor-team-member-content {
            text-align: center;
            padding: 24px;
            .dnetor-team-member-pos {
                margin: 0;
            }
        }

        .dnetor-image {
            width: 100%;
            @include d-flex();
            @include justify-content-center();
            position: relative;

            .image {
                width: 100%;
                border-radius: 100%;
                background-size: cover;
                background-repeat: no-repeat;
                position: relative;
                z-index: 1;
                &:nth-child(2){
                    display: none;
                }
                &:after {
                    content: "";
                    position: absolute;
                    top: 0;
                    right: 0;
                    bottom: 0;
                    left: 0;
                    background-color: rgba(0, 0, 0, 0.1);
                    @include transition(all 0.3s ease);
                    opacity: 0;
                    z-index: 1;
                }
            }

            .dnetor-team-member-icon-wrap {
                position: absolute;
                top: 50%;
                left: 50%;
                @include transform(translate(-50%, -50%));
                @include d-inline-flex();
            }
            .dnetor-team-member-social {
                z-index: 2;
                opacity: 0;
                @include transform(scale(0.5));
                @include transition(all .5s);
                + .dnetor-team-member-social {
                    margin-left: 10px;
                }
            }
        }
    }

    &.dnetor-team-member-layout-02 {
        .dnetor-team-member-item {
            position: relative;
            overflow: hidden;
            .dnetor-team-member-content {
                position: absolute;
                bottom: 30px;
                left: 30px;
                right: 30px;
                width: auto;
                background-color: #fff;
                border-radius: 16px;
                opacity: 0;
                -webkit-transform: translate(270px, 140px) rotate(45deg);
                transform: translate(270px, 140px) rotate(45deg);
                @include transition(all .5s ease-in-out);
                padding: 24px;
                text-align: center;
                .dnetor-team-member-name {
                    font-size: 20px;
                    font-weight: 600;
                    line-height: 30px;
                }
                .dnetor-team-member-pos {
                    margin: 0;
                }
            }
            &:hover {
                > .dnetor-team-member-content {
                    opacity: 1;
                    -webkit-transform: translate(0, 0) rotate(0deg);
                    transform: translate(0, 0) rotate(0deg);
                }
            }

            .dnetor-image {
                width: 100%;
                @include d-flex();
                @include justify-content-center();
                margin-bottom: 0;
            }

            .dnetor-team-member-icon-wrap {
                position: absolute;
                top: 15px;
                right: 15px;
            }

            .dnetor-team-member-social {
                display: none;
            }
        }
    }

    &.dnetor-team-member-layout-03 {
        .dnetor-team-member-item {
            @include d-flex();
            position: relative;
        }
        .dnetor-team-member-content {
            padding-left: 20px;
            padding-right: 20px;
            @include d-flex();
            @include flex-column();
            @include justify-content-center();
            .dnetor-team-member-name {
                font-weight: 400;
                font-size: 24px;
            }
        }

        .dnetor-team-member-icon-wrap {
            position: absolute;
            top: 15px;
            left: 15px;
        }

        .dnetor-team-member-social {
            display: none;
        }
        .dnetor-team-member-pos {
            margin-bottom: 25px;
        }
        .dnetor-team-member-name {
            margin-bottom: 3px;
        }
    }

    .progress-title {
        margin-bottom: 10px;
        color: #111;
    }

    .dnetor-team-member-progress {
        .progress-bar {
            @include flex-row();
            position: relative;
            overflow: unset;
            width: 0;
            opacity: 0;
            @include transition(width 1s linear);
            border-top-left-radius: inherit;
            border-bottom-left-radius: inherit;
            &:after {
                background: $primary_color none repeat scroll 0 0;
                border: 4px solid $primary_color;
                height: 40px;
                position: absolute;
                right: -1%;
                top: 50%;
                @include transform(translateY(-50%));
                width: 40px;
            }
            @include justify-content-center();
            @include d-flex();
            color: #fff;
            text-align: center;
            white-space: nowrap;
            background-color: $accent_color;
        }

        .progress {
            @include d-flex();
            line-height: inherit;
            overflow: unset;
            height: 5px;
            background-color: #e9ecef;
            border-radius: 0.25rem;

            .dnetor-progress-value {
                position: absolute;
                font-size: 14px;
                top: -35px;
                color: #000;
                right: 0;
                &:after {
                    border-top: 5px solid;
                    border-top-color: $primary_color;
                    border-left: 5px solid transparent;
                    border-right: 5px solid transparent;
                    top: 100%;
                    left: 50%;
                    @include transform(translateX(-50%));
                    position: absolute;
                }
            }
        }

        .dnetor-progress-label {
            display: inline-block;
            margin-bottom: 2px;
        }
    }

    .dnetor-progress-header {
        @include d-flex();
        @include justify-content-between();
    }

    .dnetor-progress-content {
        + .dnetor-progress-content {
            margin-top: 1rem;
        }
    }
}

@media (min-width: 768px) {
    .dnetor-team-member {
        &.dnetor-team-member-layout-01 {
            .dnetor-image {
                .image {
                    &:before {
                        content: "";
                        display: block;
                        padding-top: 100%;
                    }
                    &:after {
                        border-radius: 100%;
                    }
                }
            }
        }
    }
}

@media (max-width: 767px) {
    .dnetor-team-member {
        &.dnetor-team-member-layout-01 {
            .dnetor-image {
                .image {
                    &:first-child{
                        display: none;
                    }
                    &:nth-child(2){
                        display: block;
                    }
                }
            }
        }
    }
}

@media (max-width: 480px) {
    .dnetor-team-member {
        &.dnetor-team-member-layout-03 {
            .dnetor-team-member-item {
                display: block;
            }
            .dnetor-team-member-content {
                padding-top: 15px;
                padding-left: 0;
                padding-right: 0;
            }
        }
    }
}