/* News reactions — the bar's designs (owner, 29 Nov 2026). Loaded by the reaction shell / bar on news websites and by the
   Reactions admin page for its previews. One markup (themes/news-base/views/news/reactions/bar.blade.php), eleven looks
   by class: .n-reactions--tiles (default) | pills | bubbles | bars | faces | chips | glass | gradient | outline | summary |
   segmented. Every reaction has its own colour (--rx, --rx-soft) by class, never by inline style. */

.n-reactions { --rx-line: #e5e7eb; --rx-ink: #0f172a; --rx-muted: #64748b; --rx-card: #fff; display: grid; gap: 14px; padding-top: 18px; border-top: 1px solid var(--rx-line); color: var(--rx-ink); }
.n-reaction--like { --rx: #2563eb; --rx-soft: #eff6ff; }
.n-reaction--love { --rx: #e11d48; --rx-soft: #fff1f2; }
.n-reaction--wow { --rx: #d97706; --rx-soft: #fffbeb; }
.n-reaction--sad { --rx: #4f46e5; --rx-soft: #eef2ff; }
.n-reaction--angry { --rx: #ea580c; --rx-soft: #fff7ed; }

/* Shared parts. */
.n-reactions .n-reactions__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; }
.n-reactions .n-reactions__title { margin: 0; font-weight: 800; font-size: 1.05rem; line-height: 1.4; }
.n-reactions .n-reactions__summary { margin: 0; display: inline-flex; align-items: center; gap: 8px; font-size: .88rem; color: var(--rx-muted); }
.n-reactions .n-reactions__stack { display: inline-flex; }
.n-reactions .n-reactions__stack span { display: inline-grid; place-items: center; width: 26px; height: 26px; margin-left: -7px; border-radius: 50%; background: #fff;
    box-shadow: 0 0 0 2px #fff, 0 1px 4px rgba(15, 23, 42, .15); font-size: 15px; line-height: 1; }
.n-reactions .n-reactions__stack span:first-child { margin-left: 0; }
.n-reactions .n-reactions__top { font-weight: 700; color: var(--rx-ink); }
.n-reactions .n-reactions__list { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin: 0; padding: 0; }
.n-reactions .n-reaction { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; max-width: 100%; padding: 6px 14px; border: 1px solid var(--rx-line);
    border-radius: 999px; background: var(--rx-card); color: var(--rx-ink); font: inherit; font-size: .92rem; cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background-color .18s ease, color .18s ease; -webkit-tap-highlight-color: transparent; }
.n-reactions .n-reaction:hover { border-color: var(--rx); box-shadow: 0 6px 16px -8px var(--rx); transform: translateY(-1px); }
.n-reactions .n-reaction:focus-visible { outline: 3px solid color-mix(in srgb, var(--rx) 45%, transparent); outline-offset: 2px; }
.n-reactions .n-reaction:active { transform: scale(.96); }
.n-reactions .n-reaction.is-static { cursor: default; }
.n-reactions .n-reaction.is-static:hover { transform: none; box-shadow: none; }
.n-reactions .n-reaction[disabled] { cursor: progress; }
.n-reactions .n-reaction.is-selected { border-color: var(--rx); background: var(--rx-soft); color: var(--rx); font-weight: 700; box-shadow: 0 0 0 1px var(--rx); }
.n-reactions .n-reaction__emoji { font-size: 1.25rem; line-height: 1; display: inline-block; transition: transform .2s ease; }
.n-reactions .n-reaction:hover .n-reaction__emoji { transform: scale(1.15) rotate(-6deg); }
.n-reactions .n-reaction__label { overflow-wrap: anywhere; }
.n-reactions .n-reaction__count { min-width: 1.7em; padding: 1px 7px; border-radius: 999px; background: color-mix(in srgb, var(--rx) 10%, #fff); color: var(--rx);
    text-align: center; font-weight: 800; font-size: .8rem; font-variant-numeric: tabular-nums; }
.n-reactions .n-reaction__pct, .n-reactions .n-reaction__meter { display: none; }
.n-reactions .n-reaction__meter { position: relative; height: 6px; border-radius: 99px; background: color-mix(in srgb, var(--rx) 12%, #fff); overflow: hidden; }
.n-reactions .n-reaction__fill { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: inherit; background: var(--rx); transition: width .5s cubic-bezier(.2, .8, .2, 1); }
.n-reactions .n-reaction__fill.is-p5 { width: 5%; } .n-reactions .n-reaction__fill.is-p10 { width: 10%; } .n-reactions .n-reaction__fill.is-p15 { width: 15%; }
.n-reactions .n-reaction__fill.is-p20 { width: 20%; } .n-reactions .n-reaction__fill.is-p25 { width: 25%; } .n-reactions .n-reaction__fill.is-p30 { width: 30%; }
.n-reactions .n-reaction__fill.is-p35 { width: 35%; } .n-reactions .n-reaction__fill.is-p40 { width: 40%; } .n-reactions .n-reaction__fill.is-p45 { width: 45%; }
.n-reactions .n-reaction__fill.is-p50 { width: 50%; } .n-reactions .n-reaction__fill.is-p55 { width: 55%; } .n-reactions .n-reaction__fill.is-p60 { width: 60%; }
.n-reactions .n-reaction__fill.is-p65 { width: 65%; } .n-reactions .n-reaction__fill.is-p70 { width: 70%; } .n-reactions .n-reaction__fill.is-p75 { width: 75%; }
.n-reactions .n-reaction__fill.is-p80 { width: 80%; } .n-reactions .n-reaction__fill.is-p85 { width: 85%; } .n-reactions .n-reaction__fill.is-p90 { width: 90%; }
.n-reactions .n-reaction__fill.is-p95 { width: 95%; } .n-reactions .n-reaction__fill.is-p100 { width: 100%; }
.n-reactions .n-reactions__hint { margin: 0; font-size: .85rem; color: var(--rx-muted); }

/* The reader's tap: the face pops at once (news-reader.js adds .is-popping before the answer comes). */
.n-reactions .n-reaction.is-popping .n-reaction__emoji { animation: n-rx-pop .5s cubic-bezier(.2, 1.5, .4, 1); }
@keyframes n-rx-pop { 0% { transform: scale(1); } 35% { transform: scale(1.55) rotate(-10deg); } 65% { transform: scale(.9) rotate(4deg); } 100% { transform: scale(1); } }

/* 1. Tiles (default): five cards, a big face, the name, the number and a share bar along the bottom. */
.n-reactions--tiles .n-reactions__list { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.n-reactions--tiles .n-reaction { display: grid; justify-items: center; align-content: start; gap: 5px; min-height: 112px; padding: 14px 6px 16px; border-radius: 16px; text-align: center; overflow: hidden; }
.n-reactions--tiles .n-reaction__emoji { font-size: 2.1rem; }
.n-reactions--tiles .n-reaction__label { font-size: .84rem; font-weight: 700; line-height: 1.3; }
.n-reactions--tiles .n-reaction__count { font-size: .78rem; }
.n-reactions--tiles .n-reaction__meter { display: block; position: absolute; left: 0; right: 0; bottom: 0; height: 5px; border-radius: 0; }
.n-reactions--tiles .n-reaction:hover { transform: translateY(-3px); box-shadow: 0 12px 24px -14px var(--rx); }
.n-reactions--tiles .n-reaction.is-selected { box-shadow: 0 0 0 2px var(--rx), 0 12px 24px -16px var(--rx); }
@media (max-width: 480px) {
    .n-reactions--tiles .n-reactions__list { gap: 6px; }
    .n-reactions--tiles .n-reaction { min-height: 96px; padding: 10px 2px 12px; border-radius: 12px; }
    .n-reactions--tiles .n-reaction__emoji { font-size: 1.7rem; }
    .n-reactions--tiles .n-reaction__label { font-size: .72rem; }
}

/* 2. Pills: the classic row, refined. */
.n-reactions--pills .n-reaction { padding: 6px 12px 6px 10px; }
.n-reactions--pills .n-reaction.is-selected .n-reaction__count { background: var(--rx); color: #fff; }

/* 3. Bubbles: round faces with the number as a badge, the name below. */
.n-reactions--bubbles .n-reactions__list { gap: 18px 22px; }
.n-reactions--bubbles .n-reaction { display: grid; justify-items: center; gap: 6px; padding: 0; min-height: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
.n-reactions--bubbles .n-reaction:hover { box-shadow: none; transform: translateY(-2px); }
.n-reactions--bubbles .n-reaction__emoji { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; background: var(--rx-soft); font-size: 1.8rem;
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rx) 18%, transparent); }
.n-reactions--bubbles .n-reaction__label { font-size: .8rem; font-weight: 700; }
.n-reactions--bubbles .n-reaction__count { position: absolute; top: -4px; right: -6px; background: var(--rx); color: #fff; box-shadow: 0 0 0 2px #fff; }
.n-reactions--bubbles .n-reaction.is-selected { background: none; box-shadow: none; }
.n-reactions--bubbles .n-reaction.is-selected .n-reaction__emoji { box-shadow: 0 0 0 3px var(--rx); background: #fff; }

/* 4. Poll bars: every reaction a full-width row with its share. */
.n-reactions--bars .n-reactions__list { display: grid; gap: 8px; }
.n-reactions--bars .n-reaction { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "e l p" "e m p"; align-items: center; gap: 4px 12px;
    width: 100%; padding: 10px 16px; border-radius: 14px; text-align: left; }
.n-reactions--bars .n-reaction__emoji { grid-area: e; font-size: 1.6rem; }
.n-reactions--bars .n-reaction__label { grid-area: l; font-weight: 700; }
.n-reactions--bars .n-reaction__count { grid-area: l; justify-self: end; background: none; padding: 0; color: var(--rx-muted); font-weight: 700; }
.n-reactions--bars .n-reaction__meter { grid-area: m; display: block; height: 8px; }
.n-reactions--bars .n-reaction__pct { grid-area: p; display: block; min-width: 3.2em; text-align: right; font-weight: 800; color: var(--rx); font-variant-numeric: tabular-nums; }
.n-reactions--bars .n-reaction:hover { transform: none; }

/* 5. Big faces: large faces that grow on hover, no boxes. */
.n-reactions--faces .n-reactions__list { justify-content: space-between; gap: 8px; }
.n-reactions--faces .n-reaction { display: grid; justify-items: center; gap: 4px; padding: 6px 4px; min-height: 0; border: 0; background: none; box-shadow: none; flex: 1 1 0; }
.n-reactions--faces .n-reaction:hover { box-shadow: none; transform: none; }
.n-reactions--faces .n-reaction__emoji { font-size: 2.8rem; filter: grayscale(.15); transition: transform .25s cubic-bezier(.2, 1.4, .4, 1), filter .2s ease; }
.n-reactions--faces .n-reaction:hover .n-reaction__emoji { transform: scale(1.25) translateY(-4px); filter: none; }
.n-reactions--faces .n-reaction__label { font-size: .8rem; font-weight: 700; color: var(--rx-muted); }
.n-reactions--faces .n-reaction.is-selected { background: none; box-shadow: none; }
.n-reactions--faces .n-reaction.is-selected .n-reaction__emoji { filter: drop-shadow(0 6px 10px color-mix(in srgb, var(--rx) 45%, transparent)); transform: scale(1.12); }
.n-reactions--faces .n-reaction.is-selected .n-reaction__label { color: var(--rx); }
.n-reactions--faces .n-reaction.is-selected::after { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--rx); }

/* 6. Compact chips: one small line, for narrow columns. */
.n-reactions--chips .n-reactions__list { gap: 6px; }
.n-reactions--chips .n-reaction { gap: 5px; min-height: 34px; padding: 3px 10px; font-size: .8rem; }
.n-reactions--chips .n-reaction__emoji { font-size: 1rem; }
.n-reactions--chips .n-reaction.is-selected { background: var(--rx); color: #fff; }
.n-reactions--chips .n-reaction.is-selected .n-reaction__count { background: rgba(255, 255, 255, .25); color: #fff; }

/* 7. Dark glass: a dark card that suits dark bands and photo stories. */
.n-reactions--glass { --rx-line: rgba(255, 255, 255, .14); --rx-ink: #f8fafc; --rx-muted: rgba(248, 250, 252, .7); --rx-card: rgba(255, 255, 255, .06);
    padding: 20px; border: 0; border-radius: 20px; background: linear-gradient(135deg, #0f172a, #1e293b 60%, #312e81); box-shadow: 0 20px 40px -24px rgba(15, 23, 42, .8); }
.n-reactions--glass .n-reactions__stack span { background: #1e293b; box-shadow: 0 0 0 2px #1e293b; }
.n-reactions--glass .n-reaction { backdrop-filter: blur(6px); }
.n-reactions--glass .n-reaction__count { background: rgba(255, 255, 255, .12); color: #fff; }
.n-reactions--glass .n-reaction.is-selected { background: var(--rx); border-color: var(--rx); color: #fff; }
.n-reactions--glass .n-reaction.is-selected .n-reaction__count { background: rgba(255, 255, 255, .25); }

/* 8. Colour gradient: bright tiles, each in its reaction's colour. */
.n-reactions--gradient .n-reactions__list { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 10px; }
.n-reactions--gradient .n-reaction { justify-content: center; flex-direction: column; gap: 4px; min-height: 96px; padding: 12px 8px; border: 0; border-radius: 18px;
    background: linear-gradient(160deg, var(--rx-soft), #fff 85%); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rx) 20%, transparent); }
.n-reactions--gradient .n-reaction__emoji { font-size: 2rem; }
.n-reactions--gradient .n-reaction__label { font-weight: 700; font-size: .84rem; }
.n-reactions--gradient .n-reaction.is-selected { background: linear-gradient(160deg, var(--rx), color-mix(in srgb, var(--rx) 70%, #000)); color: #fff; box-shadow: 0 10px 22px -12px var(--rx); }
.n-reactions--gradient .n-reaction.is-selected .n-reaction__count { background: rgba(255, 255, 255, .25); color: #fff; }

/* 9. Outline: coloured outlines that fill when chosen. */
.n-reactions--outline .n-reaction { border: 2px solid color-mix(in srgb, var(--rx) 55%, #fff); color: var(--rx); font-weight: 700; }
.n-reactions--outline .n-reaction:hover { background: var(--rx-soft); }
.n-reactions--outline .n-reaction.is-selected { background: var(--rx); border-color: var(--rx); color: #fff; box-shadow: none; }
.n-reactions--outline .n-reaction.is-selected .n-reaction__count { background: rgba(255, 255, 255, .25); color: #fff; }

/* 10. Summary line: the readers' verdict first (stacked faces, total, top reaction), then small buttons. */
.n-reactions--summary .n-reactions__head { display: grid; gap: 8px; }
.n-reactions--summary .n-reactions__summary { justify-self: start; padding: 8px 14px 8px 12px; border-radius: 999px; background: #f8fafc; box-shadow: inset 0 0 0 1px var(--rx-line);
    font-size: .95rem; color: var(--rx-ink); }
.n-reactions--summary .n-reactions__stack span { width: 30px; height: 30px; font-size: 17px; }
.n-reactions--summary .n-reactions__list { gap: 6px; }
.n-reactions--summary .n-reaction { min-height: 38px; padding: 4px 12px; font-size: .85rem; background: transparent; }
.n-reactions--summary .n-reaction__count { display: none; }

/* 11. Segmented: one joined control. */
.n-reactions--segmented .n-reactions__list { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; border: 1px solid var(--rx-line); border-radius: 16px; overflow: hidden; background: #fff; }
.n-reactions--segmented .n-reaction { display: grid; justify-items: center; gap: 3px; min-height: 76px; padding: 10px 4px; border: 0; border-left: 1px solid var(--rx-line); border-radius: 0; text-align: center; }
.n-reactions--segmented .n-reaction:first-child { border-left: 0; }
.n-reactions--segmented .n-reaction:hover { transform: none; box-shadow: none; background: var(--rx-soft); }
.n-reactions--segmented .n-reaction__emoji { font-size: 1.5rem; }
.n-reactions--segmented .n-reaction__label { font-size: .78rem; font-weight: 700; }
.n-reactions--segmented .n-reaction.is-selected { box-shadow: inset 0 -3px 0 var(--rx); }

/* Phones: every row design wraps tidily; nothing scrolls sideways. */
@media (max-width: 480px) {
    .n-reactions--pills .n-reaction, .n-reactions--outline .n-reaction { flex: 1 1 calc(50% - 10px); justify-content: center; }
    .n-reactions--segmented .n-reaction__label { font-size: .68rem; }
    .n-reactions--faces .n-reaction__emoji { font-size: 2.2rem; }
    .n-reactions--faces .n-reaction__label { font-size: .7rem; }
}
@media (prefers-reduced-motion: reduce) {
    .n-reactions *, .n-reactions .n-reaction { transition: none !important; animation: none !important; }
}
