/* ── Global Chat Panel (desktop only) ─────────────────── */
@media (max-width: 760px) {
  .gchat-panel { display: none !important; }
}

.gchat-panel {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 280px;
  background: rgba(12,16,32,.42);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(0,0,0,.5);
  z-index: 50;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: height .2s ease;
}

/* Collapsed state */
.gchat-panel.collapsed .gchat-body { display: none; }
.gchat-panel.collapsed .gchat-head { border-bottom: none; }

/* Head */
.gchat-head {
  padding: 10px 14px;
  font-size: 12px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  display: flex; justify-content: space-between; align-items: center;
  cursor: pointer;
  user-select: none;
  background: rgba(124,156,255,.05);
  border-bottom: 1px solid rgba(255,255,255,.06);
  color: var(--muted);
}
.gchat-title {
  display: flex; align-items: center; gap: 6px; position: relative;
}
.gchat-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #ff5a6b;
  box-shadow: 0 0 8px rgba(255,90,107,.75);
  display: none;
}
.gchat-dot.on { display: inline-block; }
.gchat-toggle {
  background: transparent; border: none; color: var(--muted);
  font-size: 18px; cursor: pointer; padding: 0; line-height: 1;
  width: 22px; height: 22px;
}

/* Body */
.gchat-body {
  display: flex; flex-direction: column; height: 320px;
}

/* Messages */
.gchat-messages {
  flex: 1; overflow-y: auto; padding: 10px 12px;
  display: flex; flex-direction: column; gap: 8px;
  font-size: 12px;
}
.gchat-empty {
  color: var(--muted); text-align: center;
  font-size: 11px; padding: 40px 12px;
}
.gchat-msg {
  display: flex; gap: 8px; align-items: flex-start;
}
.gchat-av {
  flex-shrink: 0;
  width: 24px; height: 24px; border-radius: 50%;
  background: #2a3040; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 10px;
  overflow: hidden;
}
.gchat-av img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
}
.gchat-msg.me .gchat-av { background: var(--accent); color: var(--bg); }
.gchat-body-el { flex: 1; min-width: 0; }
.gchat-name {
  font-size: 10px; color: var(--muted);
  font-weight: 700; letter-spacing: .03em;
  display: flex; gap: 6px; align-items: baseline;
}
.gchat-time { font-size: 9px; opacity: .7; }
.gchat-text {
  color: var(--text);
  word-wrap: break-word;
  overflow-wrap: anywhere;
  margin-top: 1px;
}
.gchat-body > div:first-child { /* messages container already styled */ }

/* Input */
.gchat-input-wrap {
  padding: 8px;
  border-top: 1px solid var(--border);
}
.gchat-input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 8px 10px;
  font-size: 12px;
  font-family: inherit;
  outline: none;
  box-sizing: border-box;
}
.gchat-input:focus { border-color: var(--accent); }
