.frontend-icon-picker {
    text-align: center;
    display: inline-block;
    .icon-container {
        position: relative;
        margin: 0.5em auto;
        width: 7em;
        height: 7em;
        border: 1px var(--dca-gray-light, var(--border-color, lightgray)) solid;

        transition: background-color 0.15s, color 0.15s;

        .icon-preview {
            width: 7em;
            height: 7em;
            display: flex;
            flex-direction: column;
            justify-content: center;
            .icon-box {
                font-size: 500%;
                line-height: 1.3;
                margin: 0;
                text-align: center;

                i, span {
                    font-size: unset; // djangocms-admin-style sets the font size for <i>
                }
            }
            .empty-box {
                text-align: center;
                overflow: hidden;
                text-overflow: ellipsis;
                line-height: 1;
                font-size: 100%;

                &.hidden {
                    display: none;
                }
            }
            &:hover {
                background: var(--dca-gray-light, var(--border-color, lightgray));
                cursor: pointer;
            }
        }
        .icon-close-indicator {
            display: block;
            border-radius: 50%;
            color: var(--dca-black, var(--body-fg, $body-fg));
            background-color: var(--dca-white, var(--body-bg, $body-bg));
            padding: 0.3rem;
            border: 1px solid var(--dca-black, var(--body-fg, $body-fg));
            transform: translate(-50%, -50%);
            top: 0;
            inset-inline-start: 100%;
            width: 0.6em;
            height: 0.6em;
            line-height: 0.5em;
            position: absolute;

            &:before {
                content: "×";
            }

            transition: background-color 0.15s;

            &:hover {
                background: var(--delete-button-bg, red);
                color: var(--delete-button-fg, white);
                cursor: pointer;
            }
        }
    }
 }


.uip-modal {
    position: fixed;
    height: 100%;
    width: 100%;
    inset-block-end: 0;
    inset-inline-start: 0;
    background-color: rgba(0, 0, 0, 0.8);
    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: var(--dca-gray-lightest, var(--darkened-bg, #f8f8f8));
        width: 100%;
        margin: auto;
        left: 0;
        right: 0;
        margin-bottom: 2em;

        /* Header */
        .uip-modal--header {
            padding: 15px 15px;
            background-color: var(--dca-white, var(--bg-color, #fff));
            box-shadow: 0 0 8px rgb(0 0 0 / 10%);
            position: relative;
            z-index: 1;
            font-size: 15px;
            color: var(--dca-gray, var(--body-quiet-color, #666));
            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: 70vh;
            display: flex;
            min-height: 50px;
            max-height: 85vh;
            overflow: auto;

            /* Sidebar Tabs */
            .uip-modal--sidebar {
                -ms-flex-negative: 0;
                flex-shrink: 0;
                max-width: 25%;
                .uip-modal--sidebar-tabs {
                    margin-top: 30px;
                    .uip-modal--sidebar-tab-item {
                        padding: 15px;
                        font-size: 14px;
                        color: var(--dca-gray, var(--body-quiet-color, #666));
                        text-align: start;
                        cursor: pointer;
                        position: relative;
                        display: flex;
                        align-items: center;
                        text-transform: capitalize;
                        i {
                            font-size: 20px;
                            padding-inline-end: 15px;
                            color: var(--dca-gray-lighter, var(--border-color, #ccc));
                        }
                        img {
                            padding-inline-end: 15px;
                        }
                        &.universal-active {
                            background-color: var(--dca-white, var(--bg-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;
                                inset-block-start: 0;
                                inset-inline-start: 0;
                                background-color: $color-secondary;
                            }
                            i {
                                color: $color-secondary;
                            }
                        }
                        &:only-child {
                            display: none;
                        }
                    }
                }
            }

            /* 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;
                padding: 30px 80px 0;
                width: 100%;

                .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: var(--dca-white, var(--bg-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 $color-secondary;
                                box-shadow: 0 1px 12px rgba(0, 0, 0, 0.05), 0 0 0 3px $color-secondary;
                            }
                            .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: var(--dca-gray-darkest, var(--body-fg, #333));
                                }
                                .uip-icon-item-name {
                                    color: var(--dca-gray, var(--body-quiet-color, #666));
                                    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: 100%;
                        padding: 8px 15px;
                        background-color: var(--dca-white, var(--bg-color, #fff));
                        border: none;
                        &::placeholder {
                            font-style: italic;
                        }
                    }
                    img {
                        position: absolute;
                        top: 50%;
                        -webkit-transform: translateY(-50%);
                        -ms-transform: translateY(-50%);
                        transform: translateY(-50%);
                        inset-inline-end: 10px;
                    }
                }
            }
        }
    }

    /* Footer */
    .uip-modal--footer {
        border-top: 1px solid var(--dca-gray-lighter, var(--border-color, #ccc));
        text-align: center;
        background-color: var(--dca-white, var(--bg-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  !important;
            color: $nav-pills-color !important;
            background-color: $nav-pills-background !important;
            border: none;
            cursor: pointer;
            outline: 0;
        }
        .universal-button {
            height: 40px;
            margin-inline-start: 5px;
        }
        .universal-button-success {
            padding: 12px 36px;
            color: var(--dca-white, var(--bg-color, #fff));
            width: initial;
            &:hover {
                background-color: $color-secondary;
            }
        }
    }
}


/* Responsive css */

@media (min-width: 1440px) {
    body:not(.cms-admin-modal) .uip-modal .uip-modal--content {
        max-width: 1200px;
    }
}
@media (max-width: 1439px) {
    body:not(.cms-admin-modal) .uip-modal .uip-modal--content {
        max-width: 990px;
    }
    .uip-modal--icon-preview-wrap {
        padding: 30px 50px 0;
    }
}

@media (max-width: 1023px) {
    body:not(.cms-admin-modal) .uip-modal .uip-modal--content {
        max-width: 740px;
    }
}

@media (max-width: 767px) {
    .uip-modal--icon-preview-wrap {
        padding: 15px  !important;
    }
    .uip-modal--sidebar {
        display: none;
    }
}

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

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

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

@media (max-width: 479px) {
    .uip-modal--icon-preview {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1439px) {
    .uip-modal--sidebar-tab-item {
        padding: 15px 15px 15px 25px;
        font-size: 11px;
        i {
            font-size: 15px;
        }
    }
}

@media (max-width: 1024px) {
    .uip-modal--sidebar-tab-item {
        i,
        img {
            display: none;
        }
    }
}
