/* game-chat.css — per-game reaction rail + floating chat panel */

/* ===== Floating emoji burst ===== */
/* Spawned by BB_GAMECHAT.burst() — drifts upward & fades. */
.bb-rx-burst {
  position: fixed;
  font-size: 28px;
  pointer-events: none;
  z-index: 9999;
  opacity: 1;
  animation: bb-rx-burst-rise 1.6s cubic-bezier(0.2, 0.6, 0.3, 1) forwards;
  text-shadow: 0 2px 6px rgba(0,0,0,0.45);
  user-select: none;
}
@keyframes bb-rx-burst-rise {
  0%   { transform: translate(-50%, 0)         scale(0.7); opacity: 0; }
  20%  { transform: translate(-50%, -10px)      scale(1.15); opacity: 1; }
  100% { transform: translate(calc(-50% + var(--drift, 0px)), -130px) scale(1); opacity: 0; }
}

/* ===== Per-play reaction pill row ===== */
.bb-play-rx {
  display: inline-flex; gap: 3px; flex-wrap: wrap;
  margin-top: 4px;
}
.bb-play-rx-btn {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 999px;
  padding: 2px 7px;
  cursor: pointer;
  color: var(--text);
  font-size: 11px;
  display: inline-flex; align-items: center; gap: 3px;
  transition: background .12s, border-color .12s, transform .15s;
}
.bb-play-rx-btn:hover {
  background: rgba(255,170,0,0.12);
  border-color: rgba(255,170,0,0.35);
}
.bb-play-rx-btn.pulsed { transform: scale(1.25); }
.bb-play-rx-count {
  color: var(--muted); font-size: 10px;
  font-family: var(--font-display); font-weight: 800;
}

/* ===== Inline reaction rail (game-wide, mounted on each tile) ===== */
.bb-game-rx-rail {
  display: flex; gap: 4px; flex-wrap: wrap;
  padding: 6px 0;
}
/* When mounted inside a compact live tile, shrink the rail */
.zone-tile-rxrail {
  margin-top: 6px;
  padding: 0;
}
.zone-tile-rxrail .bb-game-rx-btn {
  padding: 3px 7px;
  font-size: 11px;
}
.zone-tile-rxrail .bb-game-rx-count { font-size: 10px; }
/* PBP play-reaction sits below the description, inline */
.pbp-play-rx { margin-top: 5px; display: inline-flex; }
.bb-game-rx-btn {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 10px;
  cursor: pointer;
  color: var(--text);
  font-size: 13px;
  display: inline-flex; align-items: center; gap: 4px;
  transition: background .12s, border-color .12s, transform .15s;
}
.bb-game-rx-btn:hover { background: rgba(255,170,0,0.10); border-color: rgba(255,170,0,0.4); }
.bb-game-rx-btn.pulsed { transform: scale(1.25); }
.bb-game-rx-count {
  color: var(--muted); font-size: 11px;
  font-family: var(--font-display); font-weight: 800;
  min-width: 10px; text-align: center;
}

/* ===== Floating chat root ===== */
.bb-gc-root {
  position: fixed;
  bottom: 92px;   /* clears mobile bottom-nav (60px) + breathing room */
  right: 16px;
  z-index: 9500;
  font-family: inherit;
}
@media (min-width: 768px) {
  .bb-gc-root { bottom: 22px; }
}

/* The bubble */
.bb-gc-fab {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--amber); color: #000;
  border: none; padding: 10px 16px;
  border-radius: 999px;
  cursor: pointer;
  font-family: var(--font-display); font-weight: 900;
  font-size: 13px; letter-spacing: 0.4px;
  box-shadow: 0 6px 22px rgba(0,0,0,0.45);
  position: relative;
  transition: transform .15s, opacity .15s;
}
.bb-gc-fab:hover { transform: translateY(-2px); }
.bb-gc-fab.open { opacity: 0.85; }
.bb-gc-fab-emoji { font-size: 17px; }
.bb-gc-fab-badge {
  position: absolute; top: -6px; right: -6px;
  background: #ff3737; color: #fff;
  border-radius: 999px;
  font-size: 10px; font-weight: 900;
  padding: 2px 6px;
  min-width: 18px; text-align: center;
}

/* The panel */
.bb-gc-panel {
  position: absolute;
  bottom: 56px;
  right: 0;
  width: 360px;
  max-width: calc(100vw - 32px);
  height: 480px;
  max-height: calc(100vh - 180px);
  background: #15120e;
  border: 1px solid rgba(255,170,0,0.4);
  border-radius: 14px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.6);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.bb-gc-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 12px 14px;
  background: linear-gradient(180deg, rgba(255,170,0,0.10), transparent);
  border-bottom: 1px solid var(--border);
}
.bb-gc-title {
  font-family: var(--font-display); font-weight: 900;
  font-size: 14px; color: var(--amber);
  letter-spacing: 0.4px;
}
.bb-gc-title-game {
  font-size: 12px; color: var(--muted); margin-top: 2px;
}
.bb-gc-close {
  background: transparent; border: none; color: var(--muted);
  font-size: 22px; cursor: pointer; line-height: 1;
  padding: 0 4px;
}
.bb-gc-close:hover { color: var(--text); }
.bb-gc-body {
  flex: 1;
  overflow-y: auto;
  padding: 10px 12px;
  background: rgba(0,0,0,0.18);
}
.bb-gc-loading, .bb-gc-empty {
  text-align: center; padding: 28px 12px;
  color: var(--muted); font-size: 13px;
}
.bb-gc-msg {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 8px;
  margin-bottom: 8px;
}
.bb-gc-msg-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  overflow: hidden;
  background: rgba(255,170,0,0.12);
  display: flex; align-items: center; justify-content: center;
  color: var(--amber); font-family: var(--font-display); font-weight: 900;
  font-size: 12px; text-decoration: none;
}
.bb-gc-msg-avatar img { width: 100%; height: 100%; object-fit: cover; }
.bb-gc-msg-head {
  display: flex; gap: 6px; align-items: baseline;
  margin-bottom: 1px;
}
.bb-gc-msg-handle {
  color: var(--amber); font-weight: 600; font-size: 12px;
  text-decoration: none;
}
.bb-gc-msg-time { color: var(--muted); font-size: 11px; }
.bb-gc-msg-text {
  color: var(--text); font-size: 13px; line-height: 1.4;
  word-break: break-word;
}

/* Composer */
.bb-gc-composer {
  display: flex; gap: 6px;
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  background: rgba(0,0,0,0.3);
}
.bb-gc-input {
  flex: 1; background: rgba(255,255,255,0.04);
  border: 1px solid var(--border); color: var(--text);
  padding: 8px 12px; border-radius: 999px;
  font-size: 13px; outline: none;
}
.bb-gc-input:focus { border-color: var(--amber); }
.bb-gc-send {
  background: var(--amber); color: #000;
  border: none; padding: 8px 16px; border-radius: 999px;
  font-family: var(--font-display); font-weight: 900;
  font-size: 12px; letter-spacing: 0.4px;
  cursor: pointer;
}
.bb-gc-send:hover { opacity: 0.9; }
.bb-gc-send:disabled { opacity: 0.5; cursor: wait; }

/* ===== Mobile (≤600px) ===== */
@media (max-width: 600px) {
  /* Floating chat — full-width-ish panel anchored to bottom-right */
  .bb-gc-root {
    bottom: 76px;   /* above the 60px bottom-nav */
    right: 10px;
  }
  .bb-gc-fab-label { display: none; }
  .bb-gc-fab {
    padding: 12px;
    font-size: 0;     /* hide any leftover text node */
    border-radius: 999px;
    width: 52px; height: 52px;
    display: flex; align-items: center; justify-content: center;
  }
  .bb-gc-fab-emoji { font-size: 22px; }
  .bb-gc-fab-badge {
    top: -4px; right: -4px;
    font-size: 9px;
    padding: 2px 5px; min-width: 16px;
  }
  .bb-gc-panel {
    width: calc(100vw - 20px);
    right: -5px;
    height: 72vh;
    max-height: 72vh;
    border-radius: 14px 14px 10px 10px;
  }
  .bb-gc-header { padding: 10px 12px; }
  .bb-gc-title { font-size: 13px; }
  .bb-gc-title-game { font-size: 11px; }

  .bb-gc-msg { grid-template-columns: 28px 1fr; gap: 7px; }
  .bb-gc-msg-avatar { width: 26px; height: 26px; font-size: 11px; }
  .bb-gc-msg-handle { font-size: 11px; }
  .bb-gc-msg-time { font-size: 10px; }
  .bb-gc-msg-text { font-size: 12px; }

  .bb-gc-composer { padding: 8px 10px; gap: 5px; }
  .bb-gc-input { padding: 7px 11px; font-size: 13px; }
  .bb-gc-send { padding: 7px 12px; font-size: 11px; }

  /* Inline reaction rail wraps tighter */
  .bb-game-rx-btn { padding: 4px 8px; font-size: 12px; }
}
