.bw-fab {
  position: fixed;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  pointer-events: none;
  width: 52px;
  overflow: visible;
}

.bw-fab--left {
  align-items: flex-start;
}

.bw-fab--below {
  flex-direction: column-reverse;
}

.bw-fab__scrim {
  position: fixed;
  inset: 0;
  z-index: 1;
  border: 0;
  margin: 0;
  padding: 0;
  background: rgba(27, 77, 62, 0.28);
  pointer-events: auto;
  cursor: pointer;
}

.bw-fab__bubble {
  pointer-events: auto;
  position: relative;
  z-index: 4;
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid #1b4d3e;
  background: #fff;
  color: #1b4d3e;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  touch-action: none;
  user-select: none;
  box-shadow: 0 4px 18px rgba(27, 77, 62, 0.28);
  transition: transform 0.18s ease, background 0.15s ease, box-shadow 0.15s ease;
  padding: 0;
}

.bw-fab__bubble::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 2px solid rgba(27, 77, 62, 0.28);
  opacity: 0;
  pointer-events: none;
}

.bw-fab--nudge .bw-fab__bubble {
  animation: bw-fab-shake 1.4s ease-in-out infinite;
}

.bw-fab--nudge .bw-fab__bubble::after {
  animation: bw-fab-ring 2s ease-out infinite;
}

.bw-fab__bubble:hover {
  transform: scale(1.04);
}

.bw-fab--nudge .bw-fab__bubble:hover {
  animation: none;
}

.bw-fab__bubble:active {
  cursor: grabbing;
}

@keyframes bw-fab-shake {
  0%,
  100% {
    transform: translateX(0) rotate(0);
  }
  15% {
    transform: translateX(-3px) rotate(-5deg);
  }
  30% {
    transform: translateX(3px) rotate(5deg);
  }
  45% {
    transform: translateX(-2px) rotate(-3deg);
  }
  60% {
    transform: translateX(2px) rotate(3deg);
  }
  75% {
    transform: translateX(0) rotate(0);
  }
}

@keyframes bw-fab-ring {
  0% {
    opacity: 0.7;
    transform: scale(0.92);
  }
  100% {
    opacity: 0;
    transform: scale(1.35);
  }
}

.bw-fab__tip {
  pointer-events: auto;
  position: absolute;
  z-index: 3;
  width: max-content;
  max-width: min(220px, calc(100vw - 28px));
  padding: 10px 12px;
  border-radius: 14px;
  background: #1b4d3e;
  color: #fff;
  font-family: Inter, system-ui, sans-serif;
  font-size: 0.78rem;
  line-height: 1.35;
  font-weight: 500;
  border: 1px solid #163f33;
  box-shadow: 0 8px 24px rgba(27, 77, 62, 0.28);
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.bw-fab__tip[hidden] {
  display: none !important;
}

.bw-fab--above .bw-fab__tip {
  bottom: calc(52px + 12px);
}

.bw-fab--below .bw-fab__tip {
  top: calc(52px + 12px);
}

.bw-fab--right .bw-fab__tip {
  right: 0;
}

.bw-fab--left .bw-fab__tip {
  left: 0;
}

.bw-fab__tip::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  background: #1b4d3e;
  transform: rotate(45deg);
}

.bw-fab--above.bw-fab--right .bw-fab__tip::after,
.bw-fab--above.bw-fab--left .bw-fab__tip::after {
  bottom: -4px;
}

.bw-fab--below.bw-fab--right .bw-fab__tip::after,
.bw-fab--below.bw-fab--left .bw-fab__tip::after {
  top: -4px;
}

.bw-fab--right .bw-fab__tip::after {
  right: 20px;
}

.bw-fab--left .bw-fab__tip::after {
  left: 20px;
}

.bw-fab__tip-text {
  flex: 1;
  min-width: 0;
}

.bw-fab__tip-x {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

@media (prefers-reduced-motion: reduce) {
  .bw-fab--nudge .bw-fab__bubble,
  .bw-fab--nudge .bw-fab__bubble::after {
    animation: none;
  }
}

.bw-fab--open .bw-fab__bubble {
  background: #fff;
  color: #0f172a;
  border-color: #e2e8f0;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.18);
}

.bw-fab__bubble-x {
  font-size: 1.5rem;
  line-height: 1;
  font-weight: 500;
}

.bw-fab__palm {
  width: 18px;
  height: 18px;
  display: block;
}

.bw-fab__panel {
  pointer-events: auto;
  position: absolute;
  z-index: 3;
  width: min(280px, calc(100vw - 28px));
  max-height: min(70vh, 440px);
  overflow-x: hidden;
  overflow-y: auto;
  padding: 12px;
  border-radius: 22px;
  background: #fff;
  color: #0f172a;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 12px 32px -12px rgba(15, 23, 42, 0.18);
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: bw-fab-pop 0.18s ease-out;
  font-family: Inter, system-ui, sans-serif;
  -webkit-overflow-scrolling: touch;
}

.bw-fab--above .bw-fab__panel {
  bottom: calc(52px + 10px);
}

.bw-fab--below .bw-fab__panel {
  top: calc(52px + 10px);
}

.bw-fab--right .bw-fab__panel {
  right: 0;
}

.bw-fab--left .bw-fab__panel {
  left: 0;
}

.bw-fab__panel[hidden] {
  display: none !important;
}

@keyframes bw-fab-pop {
  from {
    opacity: 0;
    transform: scale(0.86) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.bw-fab__title {
  margin: 2px 4px 0;
  font-size: 0.8125rem;
  font-weight: 700;
}

.bw-fab__hint {
  margin: 0 4px 4px;
  font-size: 0.6875rem;
  line-height: 1.35;
  color: #64748b;
}

.bw-fab__opt {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
}

.bw-fab__opt:hover:not(:disabled):not(.bw-fab__opt--current) {
  border-color: #1b4d3e55;
  background: #1b4d3e0a;
}

.bw-fab__opt--current {
  cursor: default;
  background: #1b4d3e0f;
  border-color: #1b4d3e44;
}

.bw-fab__opt-icon {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid #e2e8f0;
  color: #1b4d3e;
  font-size: 0.75rem;
  font-weight: 700;
  overflow: hidden;
  padding: 4px;
}

.bw-fab__opt-logo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.bw-fab__opt-icon--apuesta {
  color: #b45309;
}

.bw-fab__opt-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.bw-fab__opt-text strong {
  font-size: 0.8125rem;
  font-weight: 600;
}

.bw-fab__opt-text em {
  font-style: normal;
  font-size: 0.6875rem;
  color: #64748b;
  line-height: 1.25;
}

@media (prefers-reduced-motion: reduce) {
  .bw-fab__panel {
    animation: none;
  }
  .bw-fab__bubble {
    transition: none;
  }
}
