.nwc-app .nwc-reaction-tray {
    --nwc-reaction-surface: #2a2129;
    --nwc-reaction-border: #75536a;
    --nwc-reaction-selected: #543046;
    min-inline-size: 0;
    color: #fae3ef;
    font-family: system-ui, sans-serif;
}

.nwc-app .is-mine .nwc-reaction-tray {
    --nwc-reaction-surface: #4a1d34;
    --nwc-reaction-border: #a76184;
    --nwc-reaction-selected: #783c59;
}

.nwc-app .nwc-reaction-toggle {
    display: inline-grid;
    inline-size: 44px;
    block-size: 44px;
    flex: none;
    place-items: center;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: #f5cbdf;
    background: transparent;
    vertical-align: middle;
}

.nwc-app .nwc-reaction-toggle svg {
    inline-size: 19px;
    block-size: 19px;
}

.nwc-app .nwc-reaction-toggle:hover,
.nwc-app .nwc-reaction-toggle[aria-expanded="true"] { background: #ffffff1c; }
.nwc-app .nwc-reaction-toggle[aria-disabled="true"] { opacity: .55; cursor: progress; }

.nwc-app .nwc-reaction-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: start;
    margin-block: .16rem -.15rem;
}

.nwc-app .nwc-reaction-chip {
    display: grid;
    min-inline-size: 44px;
    min-block-size: 44px;
    place-items: center;
    margin-inline-end: .26rem;
    padding: 0;
    border: 0;
    border-radius: .55rem;
    background: transparent;
}

.nwc-app .nwc-reaction-pill {
    display: grid;
    grid-auto-flow: column;
    align-items: center;
    column-gap: .26rem;
    padding: .21rem .36rem;
    border: 1px solid var(--nwc-reaction-border);
    border-radius: 99px;
    color: #ffe8f3;
    background: var(--nwc-reaction-surface);
}

.nwc-app .nwc-reaction-chip:hover .nwc-reaction-pill,
.nwc-app .nwc-reaction-chip[data-mine="true"] .nwc-reaction-pill,
.nwc-app .nwc-reaction-chip[aria-expanded="true"] .nwc-reaction-pill {
    border-color: #dc96b7;
    background: var(--nwc-reaction-selected);
}

.nwc-app .nwc-reaction-count {
    font-size: .75rem;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.nwc-app .nwc-reaction-glyph {
    display: block;
    inline-size: 20px;
    block-size: 20px;
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
}

.nwc-app .nwc-reaction-glyph[data-reaction="like"] { background-image: url("reaction-animals/like.png"); }
.nwc-app .nwc-reaction-glyph[data-reaction="love"] { background-image: url("reaction-animals/love.png"); }
.nwc-app .nwc-reaction-glyph[data-reaction="laugh"] { background-image: url("reaction-animals/laugh.png"); }
.nwc-app .nwc-reaction-glyph[data-reaction="surprised"] { background-image: url("reaction-animals/surprised.png"); }
.nwc-app .nwc-reaction-glyph[data-reaction="sad"] { background-image: url("reaction-animals/sad.png"); }
.nwc-app .nwc-reaction-glyph[data-reaction="angry"] { background-image: url("reaction-animals/angry.png"); }

.nwc-app .nwc-reaction-chip .nwc-reaction-glyph.is-pulsing {
    animation: nwchat-reaction-pulse 290ms ease-out;
}

@keyframes nwchat-reaction-pulse {
    0%, 100% { transform: scale(1); }
    42% { transform: scale(1.3); }
}

@media (prefers-reduced-motion: reduce) {
    .nwc-app .nwc-reaction-chip .nwc-reaction-glyph.is-pulsing { animation: none; }
}

.nwc-app .nwc-reaction-picker {
    inline-size: min-content;
    max-inline-size: 100%;
    margin-block: .32rem .12rem;
    padding: .17rem;
    border: 1px solid var(--nwc-reaction-border);
    border-radius: .72rem;
    background: var(--nwc-reaction-surface);
}

.nwc-app .nwc-reaction-options {
    display: grid;
    grid-template-columns: repeat(6, 44px);
}

.nwc-app .nwc-reaction-choice {
    display: grid;
    inline-size: 44px;
    block-size: 44px;
    place-items: center;
    padding: 0;
    border: 1px solid transparent;
    border-radius: .48rem;
    background: transparent;
}

.nwc-app .nwc-reaction-choice .nwc-reaction-glyph {
    inline-size: 32px;
    block-size: 32px;
}
.nwc-app .nwc-reaction-choice:hover { background: #ffffff1c; }
.nwc-app .nwc-reaction-choice[aria-pressed="true"] {
    border-color: #dc96b7;
    background: var(--nwc-reaction-selected);
}

.nwc-app .nwc-reaction-remove {
    display: block;
    min-block-size: 44px;
    inline-size: 100%;
    padding: .4rem .3rem;
    border: 0;
    border-top: 1px solid var(--nwc-reaction-border);
    border-radius: .24rem;
    color: #ffbdd4;
    background: transparent;
    font-size: .78rem;
    line-height: 1.2;
    text-align: center;
}

.nwc-app .nwc-reaction-remove:hover { background: #ffffff1c; }

.nwc-app .nwc-reaction-details,
.nwc-app .nwc-reaction-status {
    padding: .33rem .45rem;
    border-inline-start: 2px solid #dc96b7;
    border-radius: .3rem;
    color: #ffe8f3;
    background: var(--nwc-reaction-surface);
    font-size: .8rem;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.nwc-app .nwc-reaction-status:empty { position: absolute; padding: 0; border: 0; }

.nwc-app .nwc-reaction-details .nwc-reaction-glyph {
    display: inline-block;
    margin-inline-end: .32rem;
    vertical-align: middle;
}

.nwc-app .nwc-reaction-toggle:focus,
.nwc-app .nwc-reaction-choice:focus,
.nwc-app .nwc-reaction-chip:focus,
.nwc-app .nwc-reaction-remove:focus {
    outline: 2px solid #ffc2de;
    outline-offset: -2px;
}

@media (max-width: 370px) {
    .nwc-app .nwc-reaction-options { grid-template-columns: repeat(3, 44px); }
}
