.hh-reactions-button {
    display: inline-block;
    vertical-align: middle;
}

.hh-reactions-row {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.hh-reactions-picker-wrap {
    position: relative;
    display: inline-block;
    z-index: 2;
}

.hh-reactions-button.is-picker-open {
    z-index: 1200;
}

.hh-reactions-trigger {
    border: 0;
    background: transparent;
    padding: 0;
    margin: 0;
    color: #65676b;
    font-weight: 600;
    font-size: inherit;
    line-height: inherit;
    cursor: pointer;
}

.hh-reactions-trigger:hover,
.hh-reactions-trigger:focus {
    text-decoration: none;
    color: #65676b;
    outline: none;
}

.hh-reactions-button.is-reacted .hh-reactions-trigger,
.hh-reactions-button.is-reacted .hh-reactions-trigger:hover,
.hh-reactions-button.is-reacted .hh-reactions-trigger:focus {
    color: var(--bs-accent, var(--accent, #21A1B3));
}

.hh-reactions-counts {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    margin-left: 2px;
}

.hh-reactions-count-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    margin: 2px 0;
    border: 1px solid var(--hh-background3, #d7d7d7);
    border-radius: 6px;
    background: var(--hh-background-color-secondary, var(--bs-light, #f8f9fa));
    color: #65676b;
    font-size: 13px;
    line-height: 1.2;
    cursor: pointer;
    text-decoration: none;
}

.hh-reactions-count-item:hover,
.hh-reactions-count-item:focus {
    color: #65676b;
    text-decoration: none;
    border-color: var(--bs-accent, var(--accent, #21A1B3));
}

.hh-reactions-count-item-hidden {
    display: none;
}

.hh-reactions-count-emoji {
    font-size: 14px;
    line-height: 1;
}

.hh-reactions-count-value {
    font-weight: 600;
    min-width: 0.75em;
    font-size: 12px;
}

.hh-reactions-picker {
    position: absolute;
    left: 0;
    top: calc(100% + 6px);
    display: flex;
    gap: 4px;
    padding: 8px 10px;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.12s ease, transform 0.12s ease, visibility 0.12s ease;
    z-index: 1201;
    pointer-events: none;
    white-space: nowrap;
}

.hh-reactions-button.is-picker-open .hh-reactions-picker {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.hh-reactions-button.is-picker-open .hh-reactions-trigger {
    color: var(--bs-accent, var(--accent, #21A1B3));
}

.hh-reactions-picker-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
}

.hh-reactions-picker-item:hover {
    transform: scale(1.15);
}

.hh-reactions-picker-item.is-selected {
    background: rgba(24, 119, 242, 0.1);
}

.hh-reactions-picker-emoji {
    font-size: 24px;
    line-height: 1;
}

.comment .wall-entry-controls {
    position: relative;
    overflow: visible;
}

.comment .wall-entry-controls:has(.hh-reactions-button.is-picker-open) {
    z-index: 1200;
}

.wall-entry-controls .hh-reactions-button {
    margin-top: 10px;
    margin-bottom: 0;
    vertical-align: baseline;
}

.wall-entry-controls .hh-reactions-trigger {
    font-size: 11px;
    font-weight: inherit;
    line-height: normal;
}

.wall-entry-controls .hh-reactions-row {
    align-items: center;
    gap: 6px;
}

.wall-entry-controls .hh-reactions-count-item {
    margin: 0;
    padding: 3px 6px;
}

.comment .wall-entry-controls .hh-reactions-picker {
    top: auto;
    bottom: calc(100% + 6px);
    transform: translateY(6px);
}

.comment .wall-entry-controls .hh-reactions-button.is-picker-open .hh-reactions-picker {
    transform: translateY(0);
}

@media (max-width: 767px) {
    #hh-reactions-picker-portal {
        position: fixed;
        inset: 0;
        z-index: 9999;
        pointer-events: none;
    }

    #hh-reactions-picker-portal .hh-reactions-picker.is-portal-picker {
        position: fixed;
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        white-space: normal;
        border-radius: 16px;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: none;
        z-index: 9999;
    }
}
