/* Docs: reaction menu walkthrough. Dashboard side reuses the classes and values from roles/roles.css and
   shared.css (scoped here, so the docs page is untouched); the chat side follows a real capture of Lunar's
   messages in a dark Discord theme. Fake names and data only. Every size is fixed so playing never moves the page. */
.rdemo { --rd-chat: #1a1a1e; --rd-embed: #242429; --rd-pill: #29292d; --rd-pill-own: #292c51; --rd-compose: #222327; --rd-app: #5865f2; gap: 10px; width: 100%; box-sizing: border-box; }
.rdemo [hidden] { display: none !important; }
.rdemo-stage { position: relative; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); grid-template-rows: 44px minmax(0, 1fr); gap: 12px; height: 580px; }
.rdemo-banner { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; padding: 0 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-surface); min-width: 0; }
.rdemo-bnum { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; font-size: 13px; font-weight: 700; }
.rdemo-btext { font-size: 16px; font-weight: 500; line-height: 1.3; color: var(--text-primary); min-width: 0; }
.rdemo-btext b { color: #fff; font-weight: 700; }
.rdemo-btext.flash { animation: rdemo-fade 0.3s ease-out; }
@keyframes rdemo-fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.rdemo-js .rdemo-caps { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.rdemo-pane { min-width: 0; height: 100%; box-sizing: border-box; overflow: hidden; border: 1px solid var(--border); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.rdemo-dash { background: var(--bg-surface); }
.rdemo-label { margin: 0; font-size: 11px; letter-spacing: 0.4px; font-weight: 500; color: var(--text-muted); text-transform: uppercase; }

/* dashboard side: values copied from roles.css and shared.css */
.rdemo .card { background: var(--bg-surface); border: 0.5px solid var(--border); border-radius: var(--radius-md); padding: 16px 18px; margin: 0; }
.rdemo .cr-field { margin-bottom: 10px; min-width: 0; }
.rdemo .cr-label { display: block; font-size: 12px; color: var(--text-secondary); margin-bottom: 5px; }
.rdemo .cr-select { display: block; width: 100%; min-height: 34px; background: var(--bg-app); border: 0.5px solid var(--border); color: var(--text-primary); padding: 8px 10px; border-radius: var(--radius-md); font-size: 13px; line-height: 17px; font-family: inherit; box-sizing: border-box; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.rdemo .rdemo-area { min-height: 54px; white-space: normal; }
.rdemo .rdemo-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.rdemo .rdemo-tv.ph, .rdemo .rdemo-rv.ph { color: var(--text-muted); }
.rdemo .rr-maps { display: flex; flex-direction: column; gap: 6px; }
.rdemo .rr-map { background: var(--bg-app); border: 0.5px solid var(--border); border-radius: var(--radius-md); padding: 6px 8px; }
.rdemo .rr-map-row { display: flex; align-items: center; gap: 8px; }
.rdemo .rr-map-role { flex: 1; min-width: 0; }
.rdemo .rdemo-emo { width: 44px; flex: 0 0 auto; text-align: center; font-size: 16px; padding: 8px 0; }
.rdemo .rdemo-emo.empty .rdemo-ev::before { content: "+"; color: var(--text-muted); font-size: 14px; }
.rdemo .cr-btn { display: inline-flex; align-items: center; gap: 6px; background: var(--bg-app); border: 0.5px solid var(--border); color: var(--text-secondary); padding: 8px 14px; border-radius: var(--radius-md); font-size: 13px; font-family: inherit; }
.rdemo .cr-btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.rdemo .rdemo-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 4px; }
.rdemo .rr-menu-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.rdemo .rr-menu-title { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.rdemo .rr-menu-meta { margin: 0 0 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--text-muted); font-size: 12px; }
.rdemo .rr-sep { color: var(--border-strong); }
.rdemo .rr-map-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rdemo .cr-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--bg-app); border: 0.5px solid var(--border); border-radius: 999px; padding: 3px 10px; color: var(--text-primary); font-size: 12px; white-space: nowrap; }
.rdemo .rr-emoji { display: inline-flex; align-items: center; font-size: 14px; line-height: 1; }
.rdemo .rr-arrow { color: var(--text-muted); }
.rdemo .cr-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.rdemo .cr-badge { font-size: 10px; letter-spacing: 0.4px; text-transform: uppercase; font-weight: 500; padding: 2px 8px; border-radius: 999px; border: 0.5px solid var(--border); color: var(--text-muted); }
.rdemo .cr-badge.syncs { color: var(--teal); border-color: color-mix(in srgb, var(--teal) 40%, transparent); background: color-mix(in srgb, var(--teal) 10%, transparent); }
.rdemo .cr-badge.sticky { color: var(--periwinkle-soft); border-color: color-mix(in srgb, var(--periwinkle-soft) 40%, transparent); background: color-mix(in srgb, var(--periwinkle-soft) 10%, transparent); }
.rdemo .rd-teal { background: var(--teal); }
.rdemo .rd-coral { background: var(--coral); }
.rdemo .rd-lav { background: var(--lavender); }
.rdemo .is-hit { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.rdemo .cr-btn.is-hit { box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 45%, transparent); }
.rdemo .is-press { filter: brightness(1.18); }
.rdemo-caret { display: inline-block; width: 1px; height: 14px; margin-left: 1px; vertical-align: -2px; background: var(--text-primary); animation: rdemo-blink 1s steps(1) infinite; }
@keyframes rdemo-blink { 50% { opacity: 0; } }

/* chat side: matched to a real capture (dark theme) */
.rdemo-chat { background: var(--rd-chat); padding: 0; gap: 0; color: #dbdee1; font-size: 14px; }
.rdemo-chead { padding: 12px 16px; border-bottom: 1px solid #111113; font-weight: 600; font-size: 15px; color: #f2f3f5; }
.rdemo-hash { color: #80848e; font-weight: 400; margin-right: 2px; }
.rdemo-body { flex: 1; padding: 12px 0 4px; min-height: 0; overflow: hidden; }
.rdemo-msg { display: flex; gap: 16px; padding: 2px 16px; }
.rdemo-msg + .rdemo-msg { margin-top: 17px; }
.rdemo-msg.in { animation: rdemo-rise 0.3s ease-out; }
.rdemo .rdemo-av { display: block; margin-top: 3px; width: 40px; height: 40px; max-width: none; border: 0; border-radius: 50%; box-shadow: none; flex: 0 0 auto; background: #2b2d31; object-fit: cover; }
.rdemo-mc { min-width: 0; }
.rdemo-mh { display: flex; align-items: center; gap: 5px; line-height: 22px; font-size: 16px; }
.rdemo-name { font-weight: 600; color: #f2f3f5; }
.rdemo-app { display: inline-flex; align-items: center; gap: 2px; background: var(--rd-app); color: #fff; font-size: 10px; font-weight: 600; line-height: 15px; padding: 0 4px; border-radius: 3px; }
.rdemo-time { font-size: 12px; color: #949ba4; margin-left: 3px; }
.rdemo-embed { margin-top: 4px; max-width: 432px; background: var(--rd-embed); border-left: 4px solid var(--accent); border-radius: 4px; padding: 8px 16px 14px 12px; line-height: 1.375; }
.rdemo-et { font-size: 16px; font-weight: 600; color: #f2f3f5; margin-bottom: 8px; }
.rdemo-role { display: inline-block; border-radius: 3px; padding: 0 2px; font-weight: 500; background: color-mix(in srgb, var(--rc) 22%, transparent); color: var(--rc); }
.rdemo .rc-teal { --rc: var(--teal); }
.rdemo .rc-coral { --rc: var(--coral); }
.rdemo .rc-lav { --rc: var(--lavender); }
.rdemo-reacts { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.rdemo-r { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 8px; border-radius: 8px; background: var(--rd-pill); border: 1px solid transparent; font-size: 14px; color: #b5bac1; box-sizing: border-box; }
.rdemo-r.own { background: var(--rd-pill-own); border-color: var(--rd-app); color: #c9cdfb; }
.rdemo-r.pop { animation: rdemo-pop 0.22s ease-out both; }
.rdemo-re { font-size: 17px; line-height: 1; }
.rdemo-add { padding: 0 8px; }
.rdemo-ctext { color: #dbdee1; }
.rdemo-ctext.ph { color: #6d6f78; }
.rdemo-compose { margin: 0 16px 16px; height: 44px; flex: 0 0 auto; border-radius: 8px; background: var(--rd-compose); display: flex; align-items: center; gap: 14px; padding: 0 14px; color: #6d6f78; font-size: 15px; }
@keyframes rdemo-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes rdemo-pop { from { opacity: 0; transform: scale(0.6); } to { opacity: 1; transform: none; } }

/* the member and their profile card (colors sampled from a real capture) */
.rdemo-chat { position: relative; }
.rdemo .rd-gray { background: #80848e; }
.rdemo-miav { display: flex; align-items: center; justify-content: center; margin-top: 3px; width: 40px; height: 40px; border-radius: 50%; flex: 0 0 auto; background: linear-gradient(135deg, #6f5fe0, #e06fa6); color: #fff; font-weight: 700; font-size: 16px; }
.rdemo-txt { font-size: 16px; line-height: 1.375; color: #dbdee1; }
.rdemo-profile { position: absolute; left: 64px; bottom: 6px; width: min(260px, calc(100% - 76px)); z-index: 4; overflow: hidden; background: #29292d; border: 1px solid #1a1a1e; border-radius: 10px; box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.85); }
.rdemo-profile.in { animation: rdemo-rise 0.25s ease-out; }
.rdemo-pbanner { position: relative; height: 36px; background: #8267d1; }
.rdemo-pdots { position: absolute; right: 8px; top: 8px; width: 26px; height: 26px; border-radius: 50%; background: rgba(0, 0, 0, 0.55); display: flex; align-items: center; justify-content: center; gap: 2px; }
.rdemo-pdots i { width: 3px; height: 3px; border-radius: 50%; background: #dbdee1; }
.rdemo-msg.open { background: #2b2b30; }
.rdemo-pav { position: relative; width: 52px; height: 52px; box-sizing: content-box; margin: -30px 0 0 12px; border: 5px solid #29292d; border-radius: 50%; background: linear-gradient(135deg, #6f5fe0, #e06fa6); display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 22px; }
.rdemo-pdot { position: absolute; right: -4px; bottom: -4px; width: 18px; height: 18px; box-sizing: border-box; border: 4px solid #29292d; border-radius: 50%; background: #45a366; }
.rdemo-pbody { padding: 2px 12px 10px; }
.rdemo-pname { font-size: 16px; font-weight: 700; color: #f2f3f5; line-height: 1.2; }
.rdemo-phandle { font-size: 12px; color: #b5bac1; margin-bottom: 6px; }
.rdemo-psec { background: #323237; border-radius: 8px; padding: 7px 10px; margin-bottom: 6px; }
.rdemo-ph2 { font-size: 12px; font-weight: 700; color: #f2f3f5; margin-bottom: 6px; }
.rdemo-rps { display: flex; flex-wrap: wrap; gap: 6px; }
.rdemo-rp { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 8px; box-sizing: border-box; border: 1px solid #3f3f45; border-radius: 7px; background: #29292d; font-size: 12px; color: #dbdee1; }
.rdemo-rp.add { justify-content: center; width: 24px; padding: 0; border-radius: 50%; color: #b5bac1; }
.rdemo-pedit { display: flex; align-items: center; justify-content: center; gap: 6px; background: #4e4f57; border-radius: 8px; padding: 7px 12px; font-size: 13px; font-weight: 600; color: #fff; }

/* fake mouse and the small menus it opens */
.rdemo-cursor { position: absolute; left: 0; top: 0; width: 20px; height: 24px; z-index: 7; pointer-events: none; transition: transform 650ms cubic-bezier(0.45, 0.05, 0.25, 1); filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.55)); }
.rdemo-cursor svg { display: block; transition: transform 120ms; transform-origin: 3px 2px; }
.rdemo-cursor.is-click svg { transform: scale(0.82); }
.rdemo-cursor::after { content: ""; position: absolute; left: -7px; top: -7px; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--accent); opacity: 0; }
.rdemo-cursor.is-click::after { animation: rdemo-ring 0.35s ease-out; }
@keyframes rdemo-ring { from { opacity: 0.9; transform: scale(0.3); } to { opacity: 0; transform: scale(1.6); } }
.rdemo-pop { position: absolute; z-index: 6; min-width: 150px; background: var(--bg-app-soft); border: 1px solid var(--border-strong); border-radius: 10px; padding: 4px; box-shadow: 0 14px 30px -10px rgba(0, 0, 0, 0.8); font-size: 13px; color: var(--text-primary); }
.rdemo-opt { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 6px; white-space: nowrap; }
.rdemo-opt.is-hot { background: var(--bg-active); }
.rdemo-pop.grid { display: grid; grid-template-columns: repeat(6, 34px); gap: 2px; min-width: 0; }
.rdemo-pop.grid .rdemo-opt { justify-content: center; padding: 5px 0; font-size: 18px; line-height: 1; }

/* controls and captions */
.rdemo-ctl { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 32px; }
.rdemo-ctl button { font: inherit; font-size: 12.5px; color: var(--text-2, var(--text-secondary)); background: var(--surface, var(--bg-surface)); border: 1px solid var(--border); border-radius: 8px; padding: 5px 11px; cursor: pointer; }
.rdemo-ctl button:hover { border-color: var(--border-hi, var(--border-strong)); color: var(--text, var(--text-primary)); }
.rdemo-ctl button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.rdemo-dots { display: flex; gap: 6px; margin: 0 4px; }
.rdemo-dots button { width: 10px; height: 10px; padding: 0; border-radius: 50%; }
.rdemo-dots button[aria-current="step"] { background: var(--accent); border-color: var(--accent); }
.rdemo-caps { height: 3.2em; overflow: hidden; }
.rdemo-caps b { color: var(--text, var(--text-primary)); }

@media (max-width: 720px) {
  .rdemo-stage { grid-template-columns: minmax(0, 1fr); grid-template-rows: 64px 524px 380px; height: auto; }
  .rdemo-btext { font-size: 14.5px; }
  .rdemo-caps { height: 4.8em; }
}
