/* Online quality of life: the ping and quick-chat bar, the team feed, bubbles over heads (social.js), the
   end screen's Rematch box (rematch.js) and the menu's Recent matches (recent.js). */

/* ---- pings and quick chat ---- */
#social { position: fixed; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 4; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; pointer-events: none; }
#social[hidden] { display: none; }
#social .so-bar { display: flex; gap: 6px; pointer-events: auto; }
#social .so-btn { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--fg); font-size: 17px; cursor: pointer; backdrop-filter: blur(6px); }
#social .so-btn:hover { border-color: rgba(255,255,255,.35); }
#social .so-btn.on { border-color: var(--ally); box-shadow: 0 0 0 1px var(--ally), 0 0 8px rgba(63, 196, 224, .21); }
#social .so-btn[hidden] { display: none; }
#social .so-menu { pointer-events: auto; display: flex; flex-direction: column; gap: 3px; min-width: 190px; padding: 8px; border-radius: 12px; background: rgba(8,11,17,.96); border: 1px solid var(--line); box-shadow: 0 14px 34px rgba(0,0,0,.5); }
#social .so-menu[hidden] { display: none; }
#social .so-mh { font: 700 12px var(--ui); color: var(--fg); padding: 2px 4px 6px; }
#social .so-mh small { color: var(--muted); font-weight: 500; margin-left: 4px; }
#social .so-menu button { display: flex; align-items: center; gap: 8px; text-align: left; padding: 6px 8px; border-radius: 8px; border: 0; background: transparent; color: var(--fg); font: 600 13px var(--ui); cursor: pointer; }
#social .so-menu button:hover { background: rgba(255,255,255,.07); }
#social .so-menu kbd { font: 700 10px var(--ui); color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; }
#social .so-menu button i { width: 10px; height: 10px; border-radius: 50%; background: var(--pc); box-shadow: 0 0 4px color-mix(in srgb, var(--pc) 60%, transparent); }
/* The feed sits left of the buttons, along the bottom edge (the replay Skip button is above the bar). */
#social .so-feed { position: absolute; right: 92px; bottom: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; width: 300px; }
#social .so-line { padding: 5px 10px; border-radius: 9px; background: rgba(8,11,17,.9); border: 1px solid var(--line); border-right: 3px solid var(--pc); font: 500 12.5px var(--ui); color: var(--fg); box-shadow: 0 6px 18px rgba(0,0,0,.4); animation: so-in .18s ease-out; transition: opacity .4s; }
#social .so-line b { color: var(--ally); font-weight: 700; margin-right: 4px; }
#social .so-line.out { opacity: 0; }
@keyframes so-in { from { transform: translateX(14px); opacity: 0; } }
#view.so-aim { cursor: crosshair !important; }
#sobubbles { position: fixed; inset: 0; pointer-events: none; z-index: 3; }
.so-bubble { position: absolute; left: 0; top: 0; padding: 4px 10px; border-radius: 10px; background: rgba(8,11,17,.94); border: 1px solid var(--pc); color: #fff; font: 700 12.5px var(--ui); white-space: nowrap; box-shadow: 0 0 12px color-mix(in srgb, var(--pc) 45%, transparent), 0 6px 16px rgba(0,0,0,.5); }
.so-bubble::after { content: ''; position: absolute; left: 50%; bottom: -5px; width: 8px; height: 8px; background: rgba(8,11,17,.94); border-right: 1px solid var(--pc); border-bottom: 1px solid var(--pc); transform: translateX(-50%) rotate(45deg); }
.so-bubble.pop { animation: so-pop .22s ease-out; }
@keyframes so-pop { from { opacity: 0; margin-top: 8px; } }

/* ---- the end screen's Rematch ---- */
.over-card .rm-box { display: flex; }
.over-card .rm-host { cursor: pointer; }
/* ---- the menu's Recent matches ---- */
.lobby-card .rc-box summary { cursor: pointer; list-style: none; }
.lobby-card .rc-box summary::-webkit-details-marker { display: none; }
.lobby-card .rc-box summary::before { content: '▸'; display: inline-block; width: 1em; color: var(--muted); transition: transform .15s; }
.lobby-card .rc-box[open] summary::before { transform: rotate(90deg); }
.lobby-card .rc-box summary small { color: var(--muted); font-weight: 500; margin-left: 6px; }
.lobby-card .rc-list { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.lobby-card .rc-list th { text-align: left; font: 600 11px var(--ui); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; padding: 3px 8px; border-bottom: 1px solid var(--line); }
.lobby-card .rc-list td { padding: 4px 8px; border-bottom: 1px solid rgba(255,255,255,.04); white-space: nowrap; }
.lobby-card .rc-list td small { color: var(--muted); }
.lobby-card .rc-list .rc-res { font-weight: 700; }
.lobby-card .rc-win .rc-res { color: var(--ally); }
.lobby-card .rc-loss .rc-res { color: var(--enemy, #ff4d6a); }
.lobby-card .rc-draw .rc-res { color: var(--muted); }
.lobby-card .rc-empty { margin: 8px 0 0; color: var(--muted); }
