/* ==========================================================================
   Help FAB (Floating Action Button) Styles
   ========================================================================== */

.help-fab-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 10000;
  font-family: "DM Sans", sans-serif;
}

/* FAB Button */
.help-fab-button {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-color: var(--color-black);
  color: var(--color-white);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
  position: relative;
  outline: none;
}

.help-fab-button:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2), 0 3px 6px rgba(0, 0, 0, 0.15);
}

.help-fab-button:active {
  transform: scale(0.95);
}

.help-fab-button.active {
  background-color: var(--color-gray-dark);
  transform: rotate(45deg);
}

.help-fab-button.active:hover {
  transform: rotate(45deg) scale(1.1);
}

/* Icon */
.help-fab-icon {
  width: 32px;
  height: 32px;
  transition: transform 0.3s ease;
}

.help-fab-button.active .help-fab-icon {
  transform: rotate(-45deg);
}

/* Tooltip */
.help-fab-tooltip {
  position: absolute;
  right: 70px;
  top: 50%;
  transform: translateY(-50%);
  background-color: var(--color-black);
  color: var(--color-white);
  padding: 8px 12px;
  border-radius: 4px;
  font-size: var(--fs-small);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.help-fab-tooltip::after {
  content: "";
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 6px 0 6px 6px;
  border-color: transparent transparent transparent var(--color-black);
}

.help-fab-button:hover .help-fab-tooltip:not(.hidden) {
  opacity: 1;
}

.help-fab-button.active .help-fab-tooltip {
  display: none;
}

/* Loading state */
.help-fab-button.loading {
  pointer-events: none;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 0 0 0 rgba(0, 0, 0, 0.3);
  }
  70% {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 0 0 20px rgba(0, 0, 0, 0);
  }
  100% {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 0 0 0 rgba(0, 0, 0, 0);
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .help-fab-container {
    bottom: 16px;
    right: 16px;
  }

  .help-fab-button {
    width: 48px;
    height: 48px;
  }

  .help-fab-icon {
    width: 26px;
    height: 26px;
  }

  .help-fab-tooltip {
    display: none;
  }
}