/* Presence bar + chat dock */

/* Native [hidden] must win over display:flex / inline-flex on chrome */
#wd-chat-root [hidden],
.wd-chat-fab[hidden],
.wd-chat-mini[hidden],
.wd-chat-panel[hidden],
.wd-chat-emoji[hidden],
.wd-chat-gif-panel[hidden],
.wd-chat-badge[hidden],
.wd-chat-tabs button[hidden],
.wd-chat-tab-count[hidden] {
  display: none !important;
}

.wd-presence-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 80;
  background: linear-gradient(180deg, rgba(18, 18, 24, 0.92), rgba(10, 10, 14, 0.98));
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.45);
}
.wd-presence-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
}
.wd-presence-copy {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 200px;
}
.wd-presence-pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #e8a33c;
  box-shadow: 0 0 0 0 rgba(232, 163, 60, 0.6);
  animation: wd-pulse 1.6s infinite;
}
@keyframes wd-pulse {
  0% { box-shadow: 0 0 0 0 rgba(232, 163, 60, 0.55); }
  70% { box-shadow: 0 0 0 10px rgba(232, 163, 60, 0); }
  100% { box-shadow: 0 0 0 0 rgba(232, 163, 60, 0); }
}
.wd-presence-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.wd-presence-title {
  font-family: "Barlow Condensed", sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 1.05rem;
}
.wd-presence-sides {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1;
}
.wd-presence-side {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.wd-presence-side strong {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #e8a33c;
  font-size: 11px;
}
.wd-presence-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: auto;
}
body.has-presence-bar {
  padding-bottom: 72px;
}

/* Chat FAB + panel */
.wd-chat-fab {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 0;
  border-radius: 999px;
  background: #2a2a32;
  color: #f3f4f6;
  font-weight: 800;
  font-family: "Barlow Condensed", sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.wd-chat-fab:hover { background: #34343e; }
body.has-presence-bar .wd-chat-fab {
  bottom: 78px;
}
.wd-chat-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #e8a33c;
  color: #111;
  font-size: 11px;
  line-height: 18px;
  text-align: center;
  font-style: normal;
  font-weight: 800;
}
.wd-chat-mini {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 95;
}
body.has-presence-bar .wd-chat-mini {
  bottom: 78px;
}
.wd-chat-mini-restore {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #16161c;
  color: #eee;
  cursor: pointer;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  font-weight: 700;
  font-family: "Barlow Condensed", sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.wd-chat-mini-restore .mist {
  text-transform: none;
  letter-spacing: 0;
  font-family: Barlow, sans-serif;
  font-weight: 500;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wd-chat-panel {
  position: fixed;
  right: 18px;
  bottom: 72px;
  z-index: 95;
  width: min(680px, calc(100vw - 24px));
  height: min(600px, calc(100vh - 120px));
  display: flex;
  flex-direction: column;
  background: #121218;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}
body.has-presence-bar .wd-chat-panel {
  bottom: 132px;
}
.wd-chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: #0e0e14;
}
.wd-chat-tabs {
  display: flex;
  gap: 8px;
}
.wd-chat-tabs button {
  position: relative;
  border: 0;
  background: transparent;
  color: #9a9aa3;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  z-index: 1;
  overflow: visible;
}
.wd-chat-tabs button > span {
  position: relative;
  z-index: 2;
}
.wd-chat-tabs button.active,
.wd-chat-tabs button:hover {
  background: #2a2a32;
  color: #f3f4f6;
}
/* Yellow count badges sit behind the tab face */
.wd-chat-tab-count {
  position: absolute;
  top: -7px;
  right: -6px;
  z-index: 0;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #facc15;
  color: #111;
  font-size: 10px;
  line-height: 18px;
  text-align: center;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0;
  box-shadow: 0 0 0 2px #121218;
  pointer-events: none;
}
.wd-chat-head-actions {
  display: flex;
  gap: 4px;
}
.wd-chat-icon-btn {
  border: 0;
  background: transparent;
  color: #c4c4c8;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 16px;
  line-height: 1;
}
.wd-chat-icon-btn:hover { background: rgba(255,255,255,.06); color: #fff; }
.wd-chat-body {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 0;
  flex: 1;
}
.wd-chat-sidebar {
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  overflow: auto;
  padding: 8px;
  background: #0c0c10;
}
.wd-chat-side-block { margin-bottom: 12px; }
.wd-chat-side-block .caps {
  font-size: 10px;
  color: #9ca3af;
  margin: 0 0 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.wd-chat-side-n {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
  color: #e8a33c;
  font-weight: 700;
}
.wd-chat-peer,
.wd-chat-player {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  padding: 6px;
  border-radius: 6px;
  cursor: pointer;
}
.wd-chat-player { cursor: default; }
.wd-chat-peer-av {
  display: inline-flex;
  flex-shrink: 0;
  border-radius: 50%;
}
.wd-chat-peer-av:hover {
  outline: 2px solid rgba(197, 160, 89, 0.55);
  outline-offset: 1px;
}
.wd-chat-player-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.wd-chat-name {
  display: block;
  font-size: 12px;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wd-chat-clan {
  font-weight: 800;
  margin-right: 2px;
  letter-spacing: 0.04em;
}
.wd-chat-status {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.wd-chat-player.is-online .wd-chat-name,
.wd-chat-peer.is-online .wd-chat-name,
.wd-chat-player.is-online .wd-chat-status,
.wd-chat-peer.is-online .wd-chat-status {
  color: #4ade80;
}
.wd-chat-player.is-online .wd-chat-persona,
.wd-chat-peer.is-online .wd-chat-persona {
  animation: wd-online-pulse 1.8s ease-in-out infinite;
}
.wd-chat-player.is-offline .wd-chat-name,
.wd-chat-peer.is-offline .wd-chat-name,
.wd-chat-player.is-offline .wd-chat-status,
.wd-chat-peer.is-offline .wd-chat-status {
  color: #ef4444;
}
@keyframes wd-online-pulse {
  0%, 100% { opacity: 1; text-shadow: 0 0 0 rgba(74, 222, 128, 0); }
  50% { opacity: 0.75; text-shadow: 0 0 8px rgba(74, 222, 128, 0.55); }
}
.wd-chat-player.is-online strong::after {
  display: none;
}
.wd-chat-peer img,
.wd-chat-player img,
.wd-chat-avatar,
.wd-chat-msg-av {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.wd-chat-avatar {
  display: inline-grid;
  place-items: center;
  background: rgba(255,255,255,.1);
  font-size: 11px;
  font-weight: 700;
  color: #d1d5db;
}
.wd-chat-peer strong,
.wd-chat-player strong {
  display: block;
  font-size: 12px;
  line-height: 1.2;
}
.wd-chat-peer small,
.wd-chat-player small { font-size: 10px; }
.wd-chat-unread {
  display: inline-block;
  margin-left: 4px;
  padding: 0 5px;
  border-radius: 999px;
  background: #e8a33c;
  color: #111;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}
.wd-chat-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}
.wd-chat-title {
  padding: 8px 12px;
  font-size: 12px;
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.wd-chat-log {
  flex: 1;
  overflow: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.wd-chat-msg {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.wd-chat-msg.mine {
  flex-direction: row-reverse;
  text-align: right;
}
.wd-chat-bubble {
  margin: 2px 0 0;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255,255,255,.06);
  font-size: 13px;
  line-height: 1.35;
  word-break: break-word;
  display: inline-block;
  max-width: 100%;
  text-align: left;
}
.wd-chat-msg.mine .wd-chat-bubble {
  background: rgba(255, 255, 255, 0.12);
}
.wd-chat-gif {
  display: block;
  max-width: min(280px, 100%);
  max-height: 220px;
  border-radius: 8px;
  margin-top: 2px;
}
.wd-chat-msg.has-gif .wd-chat-bubble {
  padding: 4px;
  background: transparent;
}
.wd-chat-msg-meta {
  display: flex;
  gap: 8px;
  align-items: baseline;
  font-size: 11px;
}
.wd-chat-msg.mine .wd-chat-msg-meta { justify-content: flex-end; }
.wd-chat-msg-meta time { color: #6b7280; }
.wd-chat-empty { font-size: 12px; margin: 8px 0; }
.wd-chat-form {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.wd-chat-tools {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}
.wd-chat-tool-btn {
  border: 1px solid rgba(255,255,255,.12);
  background: #0e0e14;
  color: #e5e7eb;
  border-radius: 6px;
  padding: 6px 8px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}
.wd-chat-tool-btn:hover,
.wd-chat-tool-btn.is-on,
.wd-chat-tool-btn[aria-pressed="true"] {
  background: rgba(232, 163, 60, 0.16);
  border-color: rgba(232, 163, 60, 0.45);
  color: #fff;
}
.wd-chat-form input {
  flex: 1;
  min-width: 0;
  border: 1px solid rgba(255,255,255,.12);
  background: #0e0e14;
  color: #eee;
  border-radius: 6px;
  padding: 8px 10px;
}
.wd-chat-emoji {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 4px;
  padding: 8px 10px;
  border-top: 1px solid rgba(255,255,255,.08);
  background: #0e0e14;
  max-height: 120px;
  overflow: auto;
}
.wd-chat-emoji button {
  border: 0;
  background: transparent;
  font-size: 1.2rem;
  cursor: pointer;
  border-radius: 6px;
  padding: 4px;
}
.wd-chat-emoji button:hover { background: rgba(255,255,255,.08); }
.wd-chat-gif-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 10px;
  border-top: 1px solid rgba(255,255,255,.08);
  background: #0e0e14;
  max-height: 220px;
}
.wd-chat-gif-search,
.wd-chat-gif-paste {
  display: flex;
  gap: 8px;
}
.wd-chat-gif-panel .input {
  flex: 1;
  min-width: 0;
  border: 1px solid rgba(255,255,255,.12);
  background: #121218;
  color: #eee;
  border-radius: 6px;
  padding: 8px 10px;
}
.wd-chat-gif-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  overflow: auto;
  max-height: 120px;
}
.wd-chat-gif-thumb {
  border: 1px solid rgba(255,255,255,.1);
  background: #0c0c10;
  border-radius: 6px;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 1;
}
.wd-chat-gif-thumb:hover { border-color: rgba(232,163,60,.5); }
.wd-chat-gif-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.wd-dm-btn {
  margin-left: 8px;
  padding: 2px 8px !important;
  font-size: 11px !important;
}

/* Home live stats */
.hm-live-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}
@media (max-width: 720px) {
  .hm-live-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wd-chat-body { grid-template-columns: 1fr; }
  .wd-chat-sidebar { max-height: 160px; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.06); }
  .wd-chat-panel { width: calc(100vw - 16px); right: 8px; }
  .wd-chat-gif-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.hm-stat {
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(14, 14, 18, 0.72);
}
.hm-stat strong {
  display: block;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 1.6rem;
  letter-spacing: 0.04em;
  color: #e8a33c;
  line-height: 1;
}
.hm-stat span {
  font-size: 12px;
  color: #9a9aa3;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
