$uip-primary-color: #1cc2ff;
$uip-success-color: #42d6a0;

.uip-modal {
    position: fixed;
    height: 100%;
    width: 100%;
    bottom: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    user-select: none;
    display: flex;
    align-items: center;

    *,
    :before,
    :after {
        box-sizing: border-box;
    }

    &.uip-close {
        opacity: 0;
        visibility: hidden;
        transition: all 0.4s ease-in-out;
    }

    &.uip-open {
        opacity: 1;
        visibility: visible;
        transition: all 0.4s ease-in-out;
    }

    .uip-modal--content {
        position: absolute;
        border-radius: 3px;
        box-shadow: 2px 8px 23px 3px rgba(0, 0, 0, 0.2);
        overflow: hidden;
        font-family: Roboto, Arial, Helvetica, Verdana, sans-serif;
        background-color: #f1f3f5;
        width: 100%;
        margin: auto;
        left: 0;
        right: 0;

        /* Header */
        .uip-modal--header {
            padding: 15px 15px;
            background-color: #fff;
            box-shadow: 0 0 8px rgb(0 0 0 / 10%);
            position: relative;
            z-index: 1;
            font-size: 15px;
            color: #495157;
            font-weight: 500;
            display: flex;
            align-items: center;
            justify-content: space-between;

            .uip-modal--header-logo-title {
                padding-top: 2px;
                line-height: 1;
                text-transform: uppercase;
                font-weight: bold;
                cursor: pointer;
            }

            .uip-modal--header-close-btn {
                cursor: pointer;
            }
        }

        /* body */
        .uip-modal--body {
            font-size: 12px;
            line-height: 1.5;
            box-sizing: border-box;
            padding: 0;
            height: 700px;
            display: flex;
            min-height: 50px;
            max-height: 85vh;
            overflow: auto;

            /* Sidebar Tabs */
            .uip-modal--sidebar {
                -ms-flex-negative: 0;
                flex-shrink: 0;
                width: 25%;
                background-color: hsla(0, 0%, 100%, 0.3);
                .uip-modal--sidebar-tabs {
                    margin-top: 30px;
                    .uip-modal--sidebar-tab-item {
                        padding: 15px;
                        font-size: 14px;
                        color: #6d7882;
                        text-align: left;
                        cursor: pointer;
                        position: relative;
                        display: flex;
                        align-items: center;
                        text-transform: capitalize;
                        i {
                            font-size: 20px;
                            padding-right: 15px;
                            color: #a4afb7;
                        }
                        img {
                            padding-right: 15px;
                        }
                        &.universal-active {
                            background-color: #fff;
                            -webkit-box-shadow: 0 6px 20px 0 rgba(0, 0, 0, 0.1);
                            box-shadow: 0 6px 20px 0 rgba(0, 0, 0, 0.1);
                            &:after {
                                content: "";
                                position: absolute;
                                height: 100%;
                                width: 5px;
                                top: 0;
                                left: 0;
                                background-color: $uip-primary-color;
                            }
                            i {
                                color: $uip-primary-color;
                            }
                        }
                    }
                }
            }

            /* Preview wrapper */
            .uip-modal--icon-preview-wrap {
                display: -webkit-box;
                display: -ms-flexbox;
                display: flex;
                -webkit-box-orient: vertical;
                -webkit-box-direction: normal;
                -ms-flex-direction: column;
                flex-direction: column;

                .uip-modal--icon-preview-inner {
                    overflow: auto;
                    margin: 25px -15px 0;
                    padding: 0 15px 15px;

                    .uip-modal--icon-preview {
                        display: grid;
                        grid-gap: 20px;
                        margin: 20px 0;

                        /* Icon Item */
                        .uip-icon-item {
                            position: relative;
                            padding: 10px;
                            background-color: #fff;
                            -webkit-box-shadow: 0 1px 12px rgba(0, 0, 0, 0.05);
                            box-shadow: 0 1px 12px rgba(0, 0, 0, 0.05);
                            -webkit-border-radius: 3px;
                            border-radius: 3px;
                            cursor: pointer;
                            -webkit-transition: all 0.3s;
                            -o-transition: all 0.3s;
                            transition: all 0.3s;
                            overflow: hidden;
                            &:hover {
                                -webkit-box-shadow: 0 1px 14px rgba(0, 0, 0, 0.16);
                                box-shadow: 0 1px 14px rgba(0, 0, 0, 0.16);
                            }
                            &.universal-selected {
                                -webkit-box-shadow: 0 1px 12px rgba(0, 0, 0, 0.05), 0 0 0 3px $uip-primary-color;
                                box-shadow: 0 1px 12px rgba(0, 0, 0, 0.05), 0 0 0 3px $uip-primary-color;
                            }
                            .uip-icon-item-inner {
                                display: -webkit-box;
                                display: -ms-flexbox;
                                display: flex;
                                -webkit-box-orient: vertical;
                                -webkit-box-direction: normal;
                                -ms-flex-direction: column;
                                flex-direction: column;
                                -webkit-box-align: center;
                                -ms-flex-align: center;
                                align-items: center;
                                padding: 1px;
                                i,
                                .uip-icon-item__icon {
                                    font-size: 25px;
                                    color: #6d7882;
                                }
                                .uip-icon-item-name {
                                    color: #c2cbd2;
                                    font-size: 11px;
                                    padding: 13px 0 0;
                                    max-width: 100%;
                                    white-space: nowrap;
                                    -o-text-overflow: ellipsis;
                                    text-overflow: ellipsis;
                                    overflow: hidden;
                                    text-transform: capitalize;
                                }
                            }
                        }
                    }
                }

                /* search filter */
                .uip-modal--icon-search {
                    position: relative;
                    input {
                        width: calc(100% - 15px);
                        padding: 8px 15px;
                        background-color: #fff;
                        border: none;
                        &::placeholder {
                            font-style: italic;
                        }
                    }
                    img {
                        position: absolute;
                        top: 50%;
                        -webkit-transform: translateY(-50%);
                        -ms-transform: translateY(-50%);
                        transform: translateY(-50%);
                        right: 25px;
                    }
                }
            }
        }
    }

    /* Footer */
    .uip-modal--footer {
        border-top: 1px solid #e6e9ec;
        text-align: center;
        background-color: #fff;
        border: none;
        display: none;
        justify-content: flex-end;
        padding: 5px;
        box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);
        position: relative;
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        button.uip-insert-icon-button {
            padding: 10px 35px;
            color: #fff;
            font-size: 15px;
            background-color: $uip-success-color;
            border: none;
            cursor: pointer;
            outline: 0;
        }
        .universal-button {
            height: 40px;
            margin-left: 5px;
        }
        .universal-button-success {
            padding: 12px 36px;
            color: #fff;
            width: initial;
            font-size: 15px;
            &:hover {
                background-color: $uip-success-color;
            }
        }
    }
}


/* Responsive css */

.uip-modal--icon-preview {
    grid-template-columns: repeat(2, 1fr);
}

.uip-modal--icon-preview-wrap {
    width: 100%;
    padding: 30px 50px 0;
}

.uip-modal .uip-modal--content {
    max-width: 100%;
}

.uip-modal--sidebar-tab-item {
    padding: 15px 15px 15px 25px;
    font-size: 11px;
    i {
        font-size: 15px;
    }
}

.uip-modal--sidebar-tab-item {
    i,
    img {
        display: none;
    }
}

@media (min-width: 480px) {
    .uip-modal--icon-preview {
        grid-template-columns: repeat(3, 1fr);
    }
    .uip-modal--icon-preview-wrap {
        padding: 30px 80px 0;
        width: 75%;
    }

    .uip-modal--sidebar-tab-item {
        i,
        img {
            display: block;
        }
    }
}

@media (min-width: 600px) {
    .uip-modal--icon-preview {
        grid-template-columns: repeat(4, 1fr);
    }
}


@media (min-width: 768px) {
    .uip-modal--icon-preview {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (min-width: 1024px) {
    .uip-modal--icon-preview {
        grid-template-columns: repeat(6, 1fr);
    }
    .uip-modal .uip-modal--content {
        max-width: 990px;
    }
}

@media (min-width: 1440px) {
    .uip-modal--icon-preview {
        grid-template-columns: repeat(7, 1fr);
    }
    .uip-modal .uip-modal--content {
        max-width: 1200px;
    }
}
