@charset "utf-8";
/* ============================================================
   FILE: /sites/mhl/assets/css/reactions.css
   Post reactions — the pill under the title, the box after the
   body, and the prompt (DEV_PLAN Stage 1 §18, 30 September 2026)
   ------------------------------------------------------------
   Markup: templates/components/reaction_bar.php (the bars) and
   pages/blog-post.php (the prompt, built with core Form inside a
   core Popup). Behaviour: assets/js/reactions.js. Share has its
   own component, script and sheet (share_menu.php, share.js,
   share.css).

   2.5.2.2 (DEV_PLAN_Stage3 §4.15 item 3, Ben, 20 October 2026;
   boards R1–R5): the bars redrawn —
     TOP     one white pill, icons only: Like (the faces and the
             total; a thumbs-up outline when there are none; tinted
             blue once you have reacted) | the comment bubble | Share.
             Like opens the TRAY of the five above the pill.
     BOTTOM  "Enjoyed this post?" in a white box, the comment /
             Share mini-pill on its line, the summary, then the five
             on show in a pill and the 👎 beside it.
   Sizes are the boards' pixels (a control, so px — rem is 14px on
   phones). The blue is the posts colour's (--journal-mid #0861c4)
   on #e3eefc. Previous: "reactions - v1 (pre-2.5.2.2).css".

   ⚠ THE LIKE BUTTON STARTS DISABLED and is above the fold: never
   style it on :disabled (it would flash as the script enables it).
   Its hover is :not(:disabled) so a page without JavaScript shows
   no dead hover.

   ⚠ `:not([hidden])` ON EVERY display RULE FOR AN ELEMENT THAT
   STARTS HIDDEN (the tray, the bottom row). A class rule setting
   `display` beats the UA's [hidden] { display:none }. The same trap
   shipped with the comments' "Cancel reply" on 21 September 2026.
   ============================================================ */

.reactions {
  --react-ink:      #20242b;
  --react-muted:    #5f646b;
  --react-line:     #dfe3ea;
  --react-sep:      #e3e6ec;
  --react-hover:    #eef2f7;
  --react-mine-bg:  #e3eefc;
  --react-mine-fg:  var(--journal-mid, #0861c4);
  --react-shadow:   0 2px 8px rgba(16, 32, 56, .06);
  --react-pop:      0 10px 28px rgba(16, 32, 56, .18);

  color: var(--react-ink);
}

/* ------------------------------------------------------------
   The pill — white, rounded, segments split by thin lines
------------------------------------------------------------ */
.reactions__pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 46px;
  padding: 0 5px;
  background: #fff;
  border: 1px solid var(--react-line);
  border-radius: 999px;
  box-shadow: var(--react-shadow);
}
.reactions__sep {
  flex: none;
  width: 1px;
  height: 20px;
  background: var(--react-sep);
}
.no-js .reactions__sep--share { display: none; }   /* Share is JavaScript-only (share.css) */

/* Like and the comment link — the pill's segments (Share's is in share.css) */
.reactions__like,
.reactions__comments {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px 0 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--react-ink);
  font: 600 14px/1 "Open Sans", Helvetica, Arial, sans-serif;
  text-decoration: none;
  transition: background-color .15s ease;
}
.reactions__like { cursor: pointer; }
.reactions__like:not(:disabled):hover,
.reactions__comments:hover,
.reactions__like[aria-expanded="true"] { background: var(--react-hover); }
.reactions__like:focus-visible,
.reactions__comments:focus-visible { outline: 2px solid var(--react-mine-fg); outline-offset: 1px; }

/* Your reaction is in: the Like segment tinted blue */
.reactions__like.is-mine,
.reactions__like.is-mine:not(:disabled):hover { background: var(--react-mine-bg); color: var(--react-mine-fg); }

/* Nobody has reacted: the thumbs-up outline; otherwise the faces and the total */
.reactions__like:not(.is-empty) .reactions__icon,
.reactions__like.is-empty .reactions__faces,
.reactions__like.is-empty .reactions__count { display: none; }
.reactions__icon { flex: none; }

.reactions__faces { display: inline-flex; align-items: center; padding-right: 4px; }
.reactions__face {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-right: -5px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #f3f5f9;
  font-size: 13px;
  line-height: 1;
}
.reactions__count { margin-left: 4px; }
.reactions__count:empty { display: none; }

/* ------------------------------------------------------------
   The tray — the five, above the top pill (a click or tap on Like)
------------------------------------------------------------ */
/* ⚠ :not([hidden]) — see the header. */
.reactions__tray:not([hidden]) {
  display: flex;
  gap: 2px;
}
.reactions__tray {
  position: absolute;
  left: 0;
  bottom: calc(100% + 10px);
  z-index: 20;
  padding: 6px 8px;
  background: #fff;
  border: 1px solid var(--react-sep);
  border-radius: 999px;
  box-shadow: var(--react-pop);
}

.reactions__pick {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}
.reactions__pick .reactions__emoji { display: inline-block; transition: transform .12s ease; }
.reactions__pick:hover .reactions__emoji,
.reactions__pick:focus-visible .reactions__emoji { transform: scale(1.3); }
.reactions__pick:focus-visible { outline: 2px solid var(--react-mine-fg); outline-offset: -2px; }
.reactions__pick.is-mine { background: var(--react-mine-bg); }
.reactions__pick:disabled { opacity: .6; cursor: progress; }   /* only while a reaction is being sent */

/* Its name, above it, under the pointer or the keyboard (board R2, state 3) */
.reactions__pick::after {
  content: attr(data-label);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  z-index: 1;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--react-ink);
  color: #fff;
  font: 600 12px/1.4 "Open Sans", Helvetica, Arial, sans-serif;
  white-space: nowrap;
  transform: translateX(-50%);
  opacity: 0;
  pointer-events: none;
  transition: opacity .12s ease;
}
.reactions__pick:hover::after,
.reactions__pick:focus-visible::after { opacity: 1; }

/* ------------------------------------------------------------
   The top — straight under the title's gold rule
------------------------------------------------------------ */
.reactions--top { position: relative; margin: 1rem 0 0; }

/* ------------------------------------------------------------
   The help box (2.7.0.08, DEV_PLAN_Stage3 §4.5, Ben's board
   1qnd9UWu1pPA3gm16DgzEW, style A) — under the top pill, for a
   visitor arriving from the featured card's 👍 ❤️ 💬. A gold arrow
   bouncing up at the button (reactions.js sets its margin-left),
   then a blue box. It floats over the text below, so the page never
   moves. reactions.js marks the button it points at .is-hint.
------------------------------------------------------------ */
/* ⚠ :not([hidden]) — see the header. */
.reactions__help:not([hidden]) { display: block; }
.reactions__help {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 15;               /* under the tray's 20 */
  width: 440px;
  max-width: 100%;
}
.reactions__help-arrow {
  display: block;
  width: 24px;
  height: 24px;
  margin: 6px 0 4px;
  color: var(--mwd-gold, #d7a93b);
  animation: reactHelpBob 1.1s ease-in-out infinite;
}
.reactions__help-arrow svg { display: block; }
.reactions__help-box {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 12px 12px 16px;
  background: var(--journal-deep, #054a99);
  color: #fff;
  border-radius: 12px;
  box-shadow: var(--react-pop);
  animation: reactHelpIn .35s ease-out both;
}
.reactions__help-text {
  margin: 0;
  font: 400 15px/1.45 "Open Sans", Helvetica, Arial, sans-serif;
}
.reactions__help-text strong { font-weight: 600; }
.reactions__help-link { color: #fff; text-decoration: underline; text-underline-offset: 2px; }
.reactions__help-link:hover,
.reactions__help-link:focus { color: #f0cf7f; }
.reactions__help-close {
  flex: none;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .15);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}
.reactions__help-close:hover { background: rgba(255, 255, 255, .28); }
.reactions__help-close:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* The button the arrow points at; in the tray (from ❤️) the face pulses gold */
.reactions__like.is-hint,
.reactions__comments.is-hint { outline: 2px solid var(--mwd-gold, #d7a93b); outline-offset: 1px; }
.reactions__pick.is-hint {
  background: #fff4da;
  box-shadow: 0 0 0 2px var(--mwd-gold, #d7a93b);
  animation: reactHelpPulse 1.6s ease-out infinite;
}

@keyframes reactHelpBob   { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes reactHelpIn    { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes reactHelpPulse {
  0%   { box-shadow: 0 0 0 2px var(--mwd-gold, #d7a93b), 0 0 0 2px rgba(215, 169, 59, .7); }
  70%  { box-shadow: 0 0 0 2px var(--mwd-gold, #d7a93b), 0 0 0 12px rgba(215, 169, 59, 0); }
  100% { box-shadow: 0 0 0 2px var(--mwd-gold, #d7a93b), 0 0 0 2px rgba(215, 169, 59, 0); }
}

/* ------------------------------------------------------------
   The bottom — "Enjoyed this post?"
------------------------------------------------------------ */
.reactions--bottom {
  margin: 2.5rem 0 0;
  padding: 24px 26px 26px;
  background: #fff;
  border: 1px solid var(--react-sep);
  border-radius: 14px;
}
.reactions__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.reactions__heading {
  margin: 0;
  color: var(--react-ink);
  font-size: 21px;
  font-weight: 600;
  line-height: 1.3;
}

.reactions__pill--mini { height: 42px; padding: 0 4px; }
.reactions__pill--mini .reactions__comments { height: 34px; padding: 0 12px 0 10px; }
.reactions__pill--mini .reactions__sep { height: 18px; }

.reactions__summary {
  display: flex;
  align-items: center;
  gap: .4rem;
  margin: 6px 0 16px;
  color: var(--react-muted);
  font-size: 14px;
}
.reactions__top { font-size: 15px; letter-spacing: .05em; }
.reactions__top:empty { display: none; }

/* ⚠ :not([hidden]) — the row starts hidden; reactions.js shows it. */
.reactions__row:not([hidden]) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
/* The five, on show: the tray's pill, standing in the page */
.reactions__tray--open {
  position: static;
  display: inline-flex;
  box-shadow: var(--react-shadow);
  border-color: var(--react-line);
}
.reactions__tray--open .reactions__pick { font-size: 26px; }

/* "Not for me" (2.4.9, DEV_PLAN_Stage3 §4.12): the 👎 beside the five, never pressed, never counted */
.reactions__feedback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  padding: 0;
  background: #fff;
  border: 1px solid var(--react-line);
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: border-color .12s ease;
}
.reactions__feedback:hover { border-color: #b8c0cc; }
.reactions__feedback:focus-visible { outline: 2px solid var(--react-mine-fg); outline-offset: 2px; }

.reactions__message {
  margin: 12px 0 0;
  font-size: 14px;
}
.reactions--top .reactions__message { margin-top: 8px; }
.reactions__message.is-error { color: #8a3122; }

@media only screen and (max-width: 600px) {
  .reactions--bottom { padding: 20px 16px 20px 18px; }
  .reactions__heading { font-size: 20px; }
  .reactions__head { gap: 10px; }
  .reactions__pill--mini .reactions__comments { gap: 5px; padding: 0 10px 0 9px; font-size: 13.5px; }
  .reactions__summary { margin: 6px 0 14px; font-size: 13.5px; }
  .reactions__row:not([hidden]) { gap: 8px; }
  .reactions__tray--open { gap: 0; padding: 4px 6px; }
  .reactions__tray--open .reactions__pick { width: 44px; height: 44px; font-size: 24px; }
  .reactions__feedback { width: 46px; height: 46px; font-size: 20px; }
  .reactions__help { width: 100%; }                     /* 2.7.0.08 — the full column */
  .reactions__help-close { width: 32px; height: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  .reactions__help-arrow,
  .reactions__help-box,
  .reactions__pick.is-hint { animation: none; }         /* 2.7.0.08 — still, the ring stays */
  .reactions__like,
  .reactions__comments,
  .reactions__pick .reactions__emoji,
  .reactions__pick::after { transition: none; }
  .reactions__pick:hover .reactions__emoji,
  .reactions__pick:focus-visible .reactions__emoji { transform: none; }
}

/* ------------------------------------------------------------
   The prompt — core Form inside a core Popup (.popup--reactions).
   The "Not for me" box (2.4.9) is a second .popup--reactions
   (plus .popup--feedback) and shares every rule below.
------------------------------------------------------------ */
.popup--reactions fieldset { padding: 0; }

/* ⚠ HONEYPOT. Hidden here and never with the HTML hidden attribute — a bot reads the
   markup, not the stylesheet. Off-screen rather than display:none, which some bots check
   for. Same as .comment-form__hp. */
.reactions-prompt__hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.reactions-prompt__message {
  margin: 0 0 1rem;
  font-size: .9rem;
}
.reactions-prompt__message.is-error { color: #8a3122; }

/* ⚠ justify-content stated since 2.3.7.2: Save is now the only button, and core form.css
   right-aligns a button row. Left, under the fields (Ben). The Skip link and its
   .reactions-prompt__skip rules went in the same release. */
.popup--reactions .form-button-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: .75rem 1.25rem;
}

.popup--reactions button:disabled { opacity: .6; cursor: progress; }
