/* Balão — desafios PvP expirados (dashboard only) */
.pnv-missed-ch {
  position: fixed;
  right: 16px;
  /* +30px vs FABs (antes ~88px) */
  bottom: calc(118px + env(safe-area-inset-bottom, 0px));
  z-index: 94000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  pointer-events: none;
}

/* display:flex acima anula [hidden] sem !important — nunca mostrar vazio */
.pnv-missed-ch[hidden],
.pnv-missed-ch:not(.pnv-missed-ch--visible) {
  display: none !important;
}

/* display:grid no badge também anula [hidden] — nunca badge "0" fantasma */
.pnv-missed-ch__badge[hidden] {
  display: none !important;
}

.pnv-missed-ch__btn,
.pnv-missed-ch__panel {
  pointer-events: auto;
}

.pnv-missed-ch__btn {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  border: 1px solid rgba(185, 28, 28, 0.35);
  background: linear-gradient(145deg, #fef2f2, #fecaca);
  box-shadow: 0 6px 18px rgba(127, 29, 29, 0.18);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 22px;
  line-height: 1;
}

.pnv-missed-ch__btn:hover {
  transform: translateY(-1px);
}

.pnv-missed-ch__badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #b91c1c;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  display: grid;
  place-items: center;
}

.pnv-missed-ch__panel {
  width: min(320px, calc(100vw - 28px));
  max-height: min(420px, 55vh);
  overflow: auto;
  border-radius: 14px;
  border: 1px solid rgba(127, 29, 29, 0.2);
  background: #fffaf9;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18);
  padding: 12px;
}

.pnv-missed-ch__head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.pnv-missed-ch__head strong {
  flex: 1;
  font-size: 14px;
  color: #7f1d1d;
}

.pnv-missed-ch__link,
.pnv-missed-ch__close,
.pnv-missed-ch__ghost {
  border: 0;
  background: transparent;
  cursor: pointer;
  color: #9f1239;
  font-weight: 700;
  font-size: 12px;
}

.pnv-missed-ch__close {
  font-size: 18px;
  line-height: 1;
  padding: 0 4px;
}

.pnv-missed-ch__hint {
  margin: 0 0 10px;
  font-size: 12px;
  color: #7c2d12;
}

.pnv-missed-ch__row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 0;
  border-top: 1px solid rgba(127, 29, 29, 0.12);
}

.pnv-missed-ch__who {
  font-size: 13px;
  color: #1f2937;
}

.pnv-missed-ch__online {
  color: #15803d;
  font-size: 11px;
  font-weight: 700;
}

.pnv-missed-ch__offline {
  color: #94a3b8;
  font-size: 11px;
  font-weight: 600;
}

.pnv-missed-ch__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pnv-missed-ch__cta {
  border: 0;
  border-radius: 999px;
  padding: 6px 12px;
  background: #b91c1c;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.pnv-missed-ch__cta:hover {
  background: #991b1b;
}

@media (max-width: 640px) {
  .pnv-missed-ch {
    right: 12px;
    bottom: calc(126px + env(safe-area-inset-bottom, 0px));
  }
}
