/* Reactions styling, linked onto Community pages via Extension::extendsPortals()'s ->css().
   Written as explicit CSS (not Tailwind utilities) because core's precompiled build only scans
   its OWN blades -- utility classes used only in an extension view never make it into the
   compiled stylesheet. Uses core's daisyUI theme vars so it re-tunes on theme switch. */

/* ---- "Latest reactions" chip: avatar circle · emoji · word ---- */
.kop-rchip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 12px 3px 3px;
    border-radius: 999px;
    background: var(--color-base-200, #e5e7eb);
    font-size: 13px;
    line-height: 1.2;
}
.kop-rchip__emoji { font-size: 16px; line-height: 1; }
.kop-rchip__word { opacity: .9; }

/* ---- the reacting person's own chip, rendered as a real <button> so the whole thing is a
   click-to-remove control -- reset the browser's own button chrome so it still looks exactly
   like the plain (non-interactive) .kop-rchip <span> everyone else's chips use, then add a
   hover/focus background so it visibly reads as clickable, same treatment daisyUI's own
   .kop-rmodal__emoji already gives its picker buttons. */
.kop-rchip--mine {
    border: 0;
    font: inherit;
    color: inherit;
    cursor: pointer;
    transition: background .12s;
}
.kop-rchip--mine:hover,
.kop-rchip--mine:focus-visible {
    background: var(--color-base-300, #d1d5db);
}

/* ---- the "+" opener on the rail ---- */
.kop-radd { font-size: 16px; line-height: 1; }

/* ---- "just changed" flash on vote/reaction buttons, triggered by js/app.js on
   htmx:after:settle -- mirrors the reaction glow on the marketing site's own live demo. Only
   fires on an actual swap (yours, or someone else's arriving via the rail's OOB update), never
   on a plain page load, so a feed full of cards doesn't all flash at once on first paint. Uses
   the theme's own primary color (not a fixed hue) so it re-tunes across admin re-branding. */
.kop-rpop { animation: kop-rpop-glow .8s ease; }
@keyframes kop-rpop-glow {
    0% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--color-primary, #2b4a9b) 0%, transparent); }
    35% { box-shadow: 0 0 14px 4px color-mix(in oklab, var(--color-primary, #2b4a9b) 55%, transparent); }
    100% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--color-primary, #2b4a9b) 0%, transparent); }
}
@media (prefers-reduced-motion: reduce) {
    .kop-rpop { animation: none; }
}

/* ---- picker modal ---- */
.kop-rmodal {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: grid;
    place-items: center;
    padding: 16px;
}
.kop-rmodal__backdrop {
    position: absolute;
    inset: 0;
    background: color-mix(in oklab, var(--color-neutral, #1f2937) 45%, transparent);
}
.kop-rmodal__panel {
    position: relative;
    width: 100%;
    max-width: 360px;
    background: var(--color-base-100, #fff);
    color: var(--color-base-content, #1f2937);
    border: 1px solid var(--color-base-300, #d1d5db);
    border-radius: var(--radius-box, 1rem);
    box-shadow: 0 24px 60px -20px rgba(20, 24, 34, .5);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.kop-rmodal__head { display: flex; align-items: center; justify-content: space-between; }
.kop-rmodal__title { font-size: 18px; font-weight: 700; margin: 0; }
.kop-rmodal__grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 6px;
}
.kop-rmodal__emoji {
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    border-radius: var(--radius-field, .5rem);
    background: transparent;
    border: 0;
    cursor: pointer;
    transition: background .12s;
}
.kop-rmodal__emoji:hover { background: var(--color-base-200, #e5e7eb); }
.kop-rmodal__emoji.is-picked {
    background: var(--color-base-300, #d1d5db);
    box-shadow: inset 0 0 0 2px var(--color-primary, #2b4a9b);
}
.kop-rmodal__wordhead {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 6px; font-size: 11px; text-transform: uppercase;
    letter-spacing: .06em; font-weight: 700; opacity: .6;
}
.kop-rmodal__quips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.kop-rmodal__foot {
    display: flex; align-items: center; gap: 8px;
    padding-top: 8px; border-top: 1px solid var(--color-base-200, #e5e7eb);
}
.kop-rmodal__preview { font-size: 14px; opacity: .7; }
