/* ============================================================
   Reactions System Styles
   Add to your main stylesheet or include as reactions.css
   ============================================================ */

.reaction-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    user-select: none;
}

/* Main like button */
.reaction-main-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border: 1px solid #ddd;
    border-radius: 20px;
    background: #fff;
    cursor: pointer;
    font-size: 14px;
    color: #555;
    transition: all 0.15s ease;
}

.reaction-main-btn:hover {
    background: #f0f2f5;
    border-color: #bbb;
}

.reaction-main-btn.reacted {
    background: #e7f0ff;
    border-color: #5b8dee;
    color: #5b8dee;
    font-weight: 600;
}

.reaction-main-emoji {
    font-size: 16px;
    line-height: 1;
}

/* Reaction picker popup */
.reaction-picker {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    display: flex;
    gap: 4px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 30px;
    padding: 6px 10px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    opacity: 0;
    transform: scale(0.85) translateY(6px);
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
    z-index: 100;
    white-space: nowrap;
}

.reaction-picker.visible {
    opacity: 1;
    transform: scale(1) translateY(0);
    pointer-events: all;
}

.reaction-pick-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 8px;
    transition: transform 0.1s ease, background 0.1s ease;
}

.reaction-pick-btn:hover {
    transform: scale(1.25) translateY(-4px);
    background: #f0f2f5;
}

.reaction-pick-btn.active {
    background: #e7f0ff;
}

.reaction-emoji {
    font-size: 22px;
    line-height: 1;
}

.reaction-pick-label {
    font-size: 10px;
    color: #888;
    margin-top: 2px;
}

/* Count display */
.reaction-counts {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: #666;
}

.reaction-pill {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    background: #f0f2f5;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 12px;
}

.reaction-total {
    font-weight: 600;
    color: #444;
    margin-right: 2px;
}

/* Login toast */
.reaction-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 14px;
    z-index: 9999;
    animation: toastIn 0.2s ease;
}

.reaction-toast a {
    color: #7eb6ff;
    text-decoration: underline;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(-50%) translateY(10px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .reaction-main-btn {
        background: #2a2a2a;
        border-color: #444;
        color: #ccc;
    }
    .reaction-main-btn:hover { background: #333; }
    .reaction-main-btn.reacted { background: #1a2a4a; border-color: #5b8dee; color: #7eb6ff; }
    .reaction-picker { background: #2a2a2a; border-color: #444; }
    .reaction-pick-btn:hover { background: #333; }
    .reaction-pick-label { color: #aaa; }
    .reaction-pill { background: #333; color: #ccc; }
    .reaction-total { color: #ccc; }
}