.bb-affiliate-chests {
  margin-top: 1rem;
  padding: 1.1rem 1rem 1.25rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.92);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, 0.08), transparent 55%),
    radial-gradient(ellipse at 50% 100%, rgba(0, 0, 0, 0.22), transparent 60%),
    linear-gradient(180deg, #2d6b3f 0%, #1f4f2d 55%, #163d23 100%);
  color: #fff;
}

.bb-affiliate-chests__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.bb-affiliate-chests__title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.bb-affiliate-chests__counter {
  font-size: 0.95rem;
  font-weight: 500;
  opacity: 0.95;
}

.bb-affiliate-chests__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.bb-affiliate-chests__card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 96px;
  padding: 0.75rem 0.35rem 0.65rem;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  color: inherit;
  font: inherit;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.bb-affiliate-chests__card:hover {
  transform: translateY(-1px);
}

.bb-affiliate-chests__card--disponivel {
  cursor: pointer;
  background: rgba(255, 214, 102, 0.14);
  border-color: rgba(255, 214, 102, 0.35);
  box-shadow: 0 0 0 1px rgba(255, 214, 102, 0.12);
}

.bb-affiliate-chests__card--disponivel:hover {
  background: rgba(255, 214, 102, 0.22);
}

.bb-affiliate-chests__card--coletado {
  opacity: 0.72;
}

.bb-affiliate-chests__card--claiming {
  pointer-events: none;
  opacity: 0.65;
}

.bb-affiliate-chests__icon {
  width: 34px;
  height: 28px;
  display: block;
}

.bb-affiliate-chests__status {
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
}

.bb-affiliate-chests__value {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.2;
}

.bb-affiliate-chests__tooltip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  padding: 0.28rem 0.55rem;
  border-radius: 8px;
  background: rgba(24, 28, 36, 0.95);
  color: #fff;
  font-size: 0.72rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  z-index: 2;
}

.bb-affiliate-chests__card:hover .bb-affiliate-chests__tooltip {
  opacity: 1;
}

.bb-affiliate-chests__message {
  margin-top: 0.75rem;
  font-size: 0.82rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.82);
}

.bb-affiliate-chests__message--error {
  color: #ffb4c0;
}

.bb-affiliate-chests__message--success {
  color: #b8ffd8;
}

@media (max-width: 420px) {
  .bb-affiliate-chests__grid {
    gap: 8px;
  }

  .bb-affiliate-chests__card {
    min-height: 88px;
    padding: 0.65rem 0.2rem 0.55rem;
  }

  .bb-affiliate-chests__status {
    font-size: 0.72rem;
  }

  .bb-affiliate-chests__value {
    font-size: 0.68rem;
  }
}
