/* ── CBOX POPUP MODAL ── */
.chat-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  pointer-events: none;
}

.chat-overlay.active {
  display: block;
  pointer-events: none;
}

.chat-modal {
  display: none;
  pointer-events: all;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 360px;
  background: #000;
  border: 2px solid var(--purple);
  box-shadow:
    -1px -1px 0 var(--purple-mid),
     1px  1px 0 var(--purple-dark),
     0 0 20px rgba(123,85,161,0.6),
     0 0 40px rgba(123,85,161,0.2);
  z-index: 10001;
  overflow: hidden;
}

.chat-overlay.active .chat-modal {
  display: block;
}

.chat-modal-header {
  background: #0d0618;
  border-bottom: 1px solid var(--purple);
  padding: 6px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: 'MS Gothic', 'ms gothic', 'MS PGothic', monospace;
  font-size: 11px;
  letter-spacing: 1px;
  cursor: grab;
  user-select: none;
}

.chat-modal-header:active {
  cursor: grabbing;
}

.chat-close {
  background: none;
  border: 1px solid var(--purple);
  color: var(--purple);
  font-size: 10px;
  padding: 1px 5px;
  cursor: pointer;
  font-family: 'MS Gothic', monospace;
  transition: background 0.15s, color 0.15s;
}

.chat-close:hover {
  background: var(--purple);
  color: #000;
}

.chat-modal-body {
  padding: 0;
  background: #000;
}

.chat-modal-body iframe {
  display: block;
}
/* ── end popup ── */

@media (max-width: 780px) {
  .chat-overlay.active .chat-modal {
    width: 94vw;
    left: 3vw !important;
    top: 10vh !important;
    transform: none !important;
    margin: 0 !important;
  }
}