.emoji-picker {
    --top: 0px;
    --left: 0px;
    position: absolute;
    background-color: var(--foreground-color);
    border: var(--highlight-color) solid 0.1rem;
    padding: 1rem;
    border-radius: 1rem;
    min-width: 15rem;
    min-height: 10rem;
    max-height: 20rem;
    overflow: auto;
    top: calc(var(--top) + 2.5rem);
    left: calc(var(--left) - 5.5rem);
}

.emoji-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(2.5rem, 1fr));
    grid-template-rows: repeat(auto-fill, minmax(2.5rem, 1fr));
}

.dialog {
    z-index: +26;
}

.emoji:hover {
    cursor: pointer;
}

summary {
    padding: 0.5rem 0;
    cursor: pointer;
}

.search {
    margin: 0;
    width: 100%;
}

@media (max-width: 1000px) {
    .emoji-picker {
        top: unset;
        left: 0;
        /*Display emoji picker above keyboard (currently only on Chrome)*/
        bottom: env(keyboard-inset-height, 0);
        position: fixed;
        width: 100vw;
        max-width: 100vw;
        max-height: 30rem;
        border-bottom: none;
        border-left: none;
        border-right: none;
        border-radius: 0;
    }

    .emoji-list {
        gap: 0.2rem;
        margin: 0.5rem 0;
    }
    
    ::deep {
        .emoji {
            .custom-reaction, .unicode-reaction {
                font-size: 3rem !important;
            }
        }
    }
}
