.top {
    display: flex;
    padding: $space15 $space20;
    background: $bg-light;
    box-shadow: 0px 4px 7px 0px rgba(0, 0, 0, 0.1);
    margin-bottom: $space30;

    .head {
        @include font-size(18px);
        line-height: 22px;
        color: $primary-color;
        font-family: $robotomedium;
        padding-left: $space10;
    }

    .back {
        img {
            vertical-align: middle;
        }
    }
}

//input fields
.single-input {
    position: relative;
    transition: 0.3s all ease-in-out;
    margin-top: $space40;

    &:nth-of-type(1) {
        margin-top: 0;
    }

    .field-label {
        position: absolute;
        top: 0;
        left: 7px;
        @include font-size(12px);
        line-height: 15px;
        color: $subtitle-color;
        opacity: 0;
        transition: 0.2s all ease-in-out;
        width: 100%;
    }

    &.field-not-empty {
        .field-label {
            top: -15px;
            opacity: 1;
        }
    }

    .input-field {
        width: 100%;
        padding: $space5 7px;
        border-bottom: $common-border;
        @include font-size(15px);
        line-height: 20px;
        color: $title-color;
        font-family: $robotoregular;

        &::placeholder {
            color: $placeholder-color;
            @include font-size(15px);
            line-height: 20px;
        }
    }

    input[type=date]:invalid::-webkit-datetime-edit {
        color: $placeholder-color;
        text-transform: uppercase;
    }

    input[type=date]:valid::-webkit-datetime-edit {
        color: $title-color;
    }

    .hasDatepicker,
    &.result input[type=text] {
        background: url('../images/calender.svg') no-repeat;
        background-position: right 5px center;
    }

    .otp_enter {
        text-align: center;
    }

    .remove-alt {
        position: absolute;
        right: 0;
        bottom: 8px;
        cursor: pointer;
    }
}

.btn {
    display: block;
    color: $white;
    background: $primary-color;
    border-radius: 10px;
    padding: $space15 0;
    text-align: center;
    letter-spacing: 0.01em;
    margin: $space30+$space5 0;

    @media (hover: hover) {
        &:hover {
            background: $primary-hover;
        }
    }

}

.documents {
    margin-top: $space35;

    .dropdown-list {
        margin-bottom: $space25;
        border: 1px solid transparent;

        .drp-head {
            @include font-size(16px);
            line-height: 20px;
            color: $title-color;
            position: relative;
            padding: $space15 $space10;
            border-radius: 10px;
            transition: 0.3s all ease-in-out;
            background: $bg-light;
            border: 1px solid transparent;

            &::after {
                content: '';
                background: url('../images/dropdown.svg') no-repeat;
                background-position: right 5px center;
                width: 22px;
                height: 10px;
                position: absolute;
                top: 21px;
                right: 10px;
                transition: 0.3s all ease-in-out;
            }

            &.active {
                background: rgba(243, 97, 30, 0.1);
                border: 1px solid #FFE1D3;
                border-radius: 10px 10px 0 0;
                border-bottom: 1px solid transparent;

                &::after {
                    transform: rotate(180deg);
                }
            }
        }

        .sub-dropbox {
            padding: $space15 $space10;
            display: none;
            background: $white;
            border: 1px solid #FFE1D3;
            border-top: 0;
            border-radius: 0 0 10px 10px;

            .drp-item {
                @include font-size(16px);
                line-height: 20px;
                color: $title-color;
                padding: $space15 $space10;
                background: $bg-light;
                border-radius: 10px;
                margin-bottom: $space15;
                @include flex;
                position: relative;

                &:nth-last-of-type(1) {
                    margin-bottom: 0;
                }

                // .up-link,
                // .lor-link {
                //     @include font-size(14px);
                //     line-height: 20px;
                //     color: $primary-color;
                //     font-family: $robotomedium;
                // }

                .up-link {
                    display: inline-block;

                    img {
                        @media (hover:hover) {
                            &:hover {
                                opacity: 0.9;
                            }
                        }
                    }
                }
            }
        }
    }
}

.after-select {
    align-items: center;

    img {
        &:nth-of-type(1) {
            width: 20px;
            height: 20px;
        }
    }

    .f-name {
        font-family: $robotomedium;
        margin-left: $space10;
        line-height: 18px;
    }

    // .date {
    //     display: block;
    //     @include font-size(14px);
    //     line-height: 16px;
    //     color: $placeholder-color;
    //     margin-top: $space5;
    // }

    .dots {
        margin-left: auto;
    }
}

.dots-box {
    display: none;
    background: $white;
    border: $common-border;
    border-radius: 10px;
    box-shadow: 0px 0px 4px 0px #00000024;
    padding: $space10 $space15;
    width: 50%;
    position: absolute;
    top: 35px;
    right: 6px;
    z-index: 1;

    .download,
    .delete,
    .view-detail {
        display: block;
        @include font-size(16px);
        line-height: 20px;
        color: $subtitle-color;
        padding: $space10 0;

        img {
            width: 16px;
            height: 20px;
            vertical-align: sub;
            margin-right: $space10;

            @media (hover:hover) {
                &:hover {
                    opacity: 0.9;
                }
            }
        }
    }

    .download,
    .view-detail {
        border-bottom: $common-border;
    }
}

.upload-popup {
    left: -110%;
    top: 0;
    bottom: 0;
    z-index: 3;

    .popup-body {
        padding: $space60+$space15 $space15 0;

        .up-icon {
            display: block;
            margin: auto auto $space10;

            &.fill {
                path {
                    fill: $primary-color;
                }
            }
        }

        .p-head,
        .select-file,
        .ad-file {
            @include font-size(16px);
            line-height: 20px;
            color: $title-color;
            font-family: $robotomedium;
        }

        .p-head {
            margin-bottom: $space10;
        }

        .subhead {

            &:nth-of-type(1) {
                margin-bottom: $space5;
            }
        }

        .select-file,
        .ad-file {
            display: block;
            background: $bg-light;
            margin: $space35 auto 0;
            width: max-content;
            border-radius: 10px;
        }

        .select-file {
            position: relative;
            padding: $space10+2 $space40;

            .file {
                position: absolute;
                top: 0;
                left: 0;
                right: 0;
                bottom: 0;
                margin: auto;
                width: 100%;
                opacity: 0;
            }

            svg {
                display: inline-block;
                vertical-align: sub;
                margin: 0 $space5 0 0;
            }
        }

        .file-list {
            margin-top: $space35;

            .files {
                display: flex;
                align-items: flex-start;
                padding: $space10 0;
                border-bottom: $common-border;

                &:nth-last-of-type(1) {
                    margin-bottom: 0;
                }

                .f-name {
                    margin-left: $space10;
                    color: $title-color;
                    text-align: left;

                    .f-size {
                        display: block;
                        color: $placeholder-color;
                        margin-top: 6px;
                    }
                }

                .f-name,
                .f-size {
                    @include font-size(14px);
                    line-height: 16px;
                }

                .f-actions {
                    margin-left: auto;

                    .replace {
                        margin-right: $space10;
                    }
                }
            }
        }

        .ad-file {
            padding: $space10 $space50;

            .subhead {
                color: $placeholder-color;
                margin: 3px 0 0;
            }
        }

        .view-lor {
            margin-top: $space40;
            text-align: left;

            .p-head {
                margin-bottom: $space25;
            }
        }

    }

    .lor-form {
        .upload-btn {
            display: none;
        }
    }

    .single-input {
        .label {
            display: block;
            text-align: left;
            margin-bottom: $space25;
            @include font-size(16px);
            line-height: 20px;
            font-family: $robotoregular;
            color: $title-color;
        }
    }
}

.upload-popup,
.delete-popup {
    position: fixed;
    right: 0;
    background: $white;
    width: 100%;

    .popup-body {
        display: block;
        text-align: center;

        .p-head {
            @include font-size(16px);
            line-height: 20px;
            color: $title-color;
            font-family: $robotomedium;
        }

        .subhead {
            @include font-size(13px);
            line-height: 16px;
            color: $subtitle-color;
            display: block;
        }
    }
}

.upload-popup,
.lor-popup {
    .upload-btn {
        position: absolute;
        bottom: 0;
        right: 0;
        left: 0;
        background: $primary-color;
        color: $white;
        text-align: center;
        padding: $space15 0;
        border-radius: 10px;
        width: 90%;
        margin: 0 $space20 $space35;
        font-family: $robotomedium;

        @media (hover: hover) {
            &:hover {
                background: $primary-hover;
            }
        }
    }
}

.delete-popup {
    display: none;
    z-index: 2;
    left: 0;
    bottom: -110%;
    border-radius: 10px 10px 0 0;

    .top {
        border-radius: 10px 10px 0 0;
    }

    .subhead {
        display: inline-block;
        margin-top: $space5;
    }

    .btn {
        width: max-content;
        padding: $space15 $space50+4;
        margin: $space10 auto $space25;
    }

    .delete-btn {
        background: #E33E3E;

        @media (hover: hover) {
            &:hover {
                background: #e33e3ef0;
            }
        }
    }

    .popup-body {
        margin: $space25 $space60;

        img {
            display: block;
            margin: auto auto $space15;
        }
    }
}

.lor-popup {
    position: fixed;
    top: 0;
    left: -110%;
    right: 0;
    bottom: 0;
    background: $white;
    width: 100%;
    z-index: 2;

    .popup-body {
        margin: $space35 $space20 0;
    }
}

.success-msg {
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    margin: 0 $space15;
    background: #E5F5E8;
    color: $title-color;
    border: 1px solid #038942;
    border-radius: 10px;
    padding: $space10+1 $space10 - 1;
    @include font-size(15px);
    line-height: 20px;

    img {
        vertical-align: middle;
        margin-right: 8px;
    }
}

.upload-popup,
.lor-popup,
.delete-popup {
    svg {
        vertical-align: middle;
    }
}

.overlay {
    position: fixed;
    display: none;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1;
    cursor: pointer;
}

@media screen and (min-width:768px) {
    .top {
        display: none;
    }

    .single-input {
        .remove-alt {
            @media (hover: hover) {
                &:hover {
                    opacity: 0.9;
                }
            }
        }
    }

    .after-select {
        justify-content: flex-start;

        .dots {
            display: none;
        }
    }

    .dots-box {
        display: inline-block;
        position: unset;
        margin-left: auto;
        border: none;
        box-shadow: none;
        width: unset;
        display: flex;
        padding: 0;
        z-index: unset;
        background: transparent;

        .download,
        .view-detail {
            border: none;
        }

        .download,
        .view-detail,
        .delete {
            padding: 0;
        }

        span {
            display: none;
        }
    }

    .upload-popup,
    .lor-popup {
        top: 0;
        bottom: 0;
        left: 0;
        width: 460px;
        height: fit-content;
        margin: auto;
        display: none;
        transition: 0.3s all ease-in-out;
        box-shadow: 0px 0px 16px 0px #00000024;
        border-radius: 10px;
        z-index: 2;
    }

    .upload-popup {
        z-index: 14;
        min-height: 577px;

        .popup-body {
            .file-list {
                max-height: 180px;
                overflow-y: scroll;
                padding-right: $space5;

                &::-webkit-scrollbar {
                    width: 2px;
                }

                &::-webkit-scrollbar-track {
                    background: $white;
                }

                &::-webkit-scrollbar-thumb {
                    background: #c1c1c1;
                }

                &::-webkit-scrollbar-thumb:hover {
                    background: #a3a3a3;
                }
            }

            .select-file {
                margin-bottom: $space50;
            }
        }

        .upload-btn {
            width: 93%;
            margin: $space35 auto;
        }
    }

    .delete-popup {
        display: none;
        bottom: 0;
        top: 0;
        min-height: 41%;
        width: 460px;
        margin: auto;
        height: fit-content;
        box-shadow: 0px 0px 16px 0px #00000024;
        border-radius: 10px;
        z-index: 13;

        .delete-btn {
            width: 93%;
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
        }
    }

    .lor-popup {
        z-index: 13;

        .popup-body {
            margin-top: $space25;
        }

        .single-input {
            width: 100%;

            &:nth-last-of-type(1) {
                margin-bottom: $space50;
            }
        }

        .upload-btn {
            position: unset;
            margin: $space35 0;
            width: 100%;
        }
    }


    .upload-popup,
    .delete-popup,
    .lor-popup {
        .top {
            display: flex;
            justify-content: space-between;
            flex-direction: row-reverse;
            border-radius: 10px 10px 0 0;
            padding: $space15;

            .head {
                color: $title-color;
            }

            svg {
                path {
                    fill: $title-color;
                }
            }
        }
    }

    .success-msg {
        top: 65px;
        margin: auto;
        width: 35%;
        min-width: 500px;
    }

    .overlay {
        z-index: 12;
    }
}

@media screen and (min-width:1024px) {
    .delete-popup {
        height: 55%;
    }
}