div.note-icon-widget {
    /* The size of the icon */
    --note-icon-size: 30px;
    /* The padding size for the icon container */
    --note-icon-container-padding-size: 10px;
    contain: unset;
}

.note-icon-widget button.note-icon {
    --size: calc(var(--note-icon-size) + var(--note-icon-container-padding-size) * 2);

    width: var(--size);
    height: var(--size);
    padding: 0;
    border: 1px solid transparent;
    background-color: transparent;
    color: var(--muted-text-color);
    cursor: pointer;
    font-size: var(--note-icon-size);
}

.note-icon-widget button.note-icon:disabled {
    cursor: default;
    opacity: .75;
}

.note-icon-widget .dropdown-menu {
    border-radius: 10px;
    border-width: 2px;
    box-shadow: 10px 10px 93px -25px black;
    padding: 10px 15px 10px 15px !important;
}

.note-icon-widget .filter-row {
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 1em;
}

.note-icon-widget .filter-row span {
    display: block;
    font-weight: bold;
}

.note-icon-widget .icon-list {
    height: 500px;
    overflow: auto;
}

.note-icon-widget .icon-list span {
    display: inline-block;
    padding: 10px;
    cursor: pointer;
    border: 1px solid transparent;
    font-size: 180%;
}

.note-icon-widget .icon-list span:hover {
    border: 1px solid var(--main-border-color);
}

.note-icon-widget .icon-list span.bx-empty {
    width: unset;
}

.note-icon-widget .icon-list span.bx-empty::before {
    display: inline-block;
    content: "";
    border: 1px dashed var(--muted-text-color);
    width: 1em;
    height: 1em;
}

.note-icon-widget {
    .no-results {
        padding: 20px;
        text-align: center;
        color: var(--muted-text-color);
    }
}

body.experimental-feature-new-layout {
    .note-icon-widget button.note-icon {
        --input-focus-outline-color: var(--note-icon-hover-background-color);

        position: relative;
        background: transparent !important;

        &, &:hover {
            border-radius: 50%;
        }

        /* The icon */
        &::before {
            position: relative;
            z-index: 1;
            color: var(--note-icon-custom-color, var(--note-icon-color));
        }

        /* The background circle */
        &:not(.bx-empty:disabled)::after {
            content: "";
            position: absolute;
            inset: 0;
            border-radius: 50%;
            background: var(--note-icon-custom-background-color, var(--note-icon-background-color));
        }

        &:focus-visible {
            outline: 2px solid var(--note-icon-custom-color, var(--note-icon-color));
        }

        &:hover:not(.bx-empty:disabled)::after {
            background: var(--note-icon-hover-custom-background-color, var(--note-icon-hover-background-color));
            transition: background 200ms ease-out;
        }
    }
}

body.mobile .modal.icon-switcher {
    .modal-dialog {
        left: 0;
        right: 0;
        margin: unset;
        transform: unset;
        max-width: 100%;
        height: 100%;
    }

    .modal-body {
        padding: 0;
        display: flex;
        flex-direction: column;

        > .filter-row {
            padding: 0.25em var(--bs-modal-padding) 0.5em var(--bs-modal-padding);
            border-bottom: 1px solid var(--main-border-color);
        }
    }

    .icon-list {
        margin: auto;
        flex-grow: 1;
        height: 100%;

        span {
            padding: 12px;
        }
    }
}
