.wh-fcta {
  position: fixed;
  z-index: 99990;
  inset: auto;
  bottom: var(--wh-fcta-offset-y);
  right: var(--wh-fcta-offset-x);
  pointer-events: none;
  --wh-fcta-size: 3.125rem;
  --wh-fcta-gap: 0.625rem;
  --wh-fcta-offset-x: 5%;
  --wh-fcta-offset-y: 5%;
  --wh-fcta-btn-bg: #ea002a;
  --wh-fcta-btn-bg-hover: #c80024;
  --wh-fcta-shadow: 0 10px 30px rgba(3, 7, 18, 0.22);
  --wh-fcta-label-bg: #fff;
  --wh-fcta-label-text: #0b1f41;
}

.wh-fcta__nav {
  display: flex;
  flex-direction: column;
  gap: var(--wh-fcta-gap);
  pointer-events: auto;
}

.wh-fcta[data-wh-fcta-desktop='bottom-right'] {
  right: var(--wh-fcta-offset-x);
  bottom: var(--wh-fcta-offset-y);
  left: auto;
}

.wh-fcta[data-wh-fcta-desktop='bottom-right'] .wh-fcta__nav,
.wh-fcta[data-wh-fcta-desktop='bottom-right'] .wh-fcta__items {
  align-items: flex-end;
}

.wh-fcta[data-wh-fcta-desktop='bottom-left'] {
  left: var(--wh-fcta-offset-x);
  bottom: var(--wh-fcta-offset-y);
  right: auto;
}

.wh-fcta[data-wh-fcta-desktop='bottom-left'] .wh-fcta__nav,
.wh-fcta[data-wh-fcta-desktop='bottom-left'] .wh-fcta__items {
  align-items: flex-start;
}

.wh-fcta__items {
  display: flex;
  flex-direction: column;
  gap: var(--wh-fcta-gap);
  margin: 0 0 0.75rem;
  padding: 0;
  list-style: none;
}

.wh-fcta__item {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  width: auto;
  height: auto;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: #fff;
  text-decoration: none;
  box-shadow: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
  opacity: 0;
  transform: translateY(0.5rem);
}

/* HTML: label then icon — row = testo sx / icona dx; row-reverse = icona sx / testo dx */
.wh-fcta[data-wh-fcta-desktop='bottom-right'] .wh-fcta__item {
  flex-direction: row;
}

.wh-fcta[data-wh-fcta-desktop='bottom-left'] .wh-fcta__item {
  flex-direction: row-reverse;
}

.wh-fcta.is-open .wh-fcta__item {
  opacity: 1;
  transform: translateY(0);
}

.wh-fcta__item:hover,
.wh-fcta__item:focus-visible {
  transform: translateY(-2px);
}

.wh-fcta__item-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: var(--wh-fcta-size);
  height: var(--wh-fcta-size);
  border-radius: 999px;
  background: var(--wh-fcta-btn-bg);
  box-shadow: var(--wh-fcta-shadow);
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.wh-fcta__item-icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

.wh-fcta__item:hover .wh-fcta__item-icon,
.wh-fcta__item:focus-visible .wh-fcta__item-icon {
  background: var(--wh-fcta-btn-bg-hover);
}

.wh-fcta__label {
  display: inline-flex;
  align-items: center;
  max-width: min(14rem, calc(100vw - 8rem));
  padding: 0.5rem 0.875rem;
  border-radius: 999px;
  background: var(--wh-fcta-label-bg);
  color: var(--wh-fcta-label-text);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow:
    0 4px 14px rgba(3, 7, 18, 0.12),
    0 0 0 1px rgba(11, 31, 65, 0.06);
}

.wh-fcta__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--wh-fcta-size);
  height: var(--wh-fcta-size);
  border: 0;
  border-radius: 999px;
  background: var(--wh-fcta-btn-bg);
  color: #fff;
  cursor: pointer;
  box-shadow: var(--wh-fcta-shadow);
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.wh-fcta__toggle:hover,
.wh-fcta__toggle:focus-visible {
  background: var(--wh-fcta-btn-bg-hover);
}

.wh-fcta__toggle:disabled {
  cursor: default;
  opacity: 0.92;
}

.wh-fcta--no-items .wh-fcta__toggle {
  cursor: default;
}

.wh-fcta__toggle.is-pulse {
  animation: wh-fcta-bounce 2.2s ease-in-out infinite;
}

.wh-fcta.is-open .wh-fcta__toggle.is-pulse {
  animation: none;
}

.wh-fcta__toggle-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease;
}

.wh-fcta__toggle-icon svg {
  display: block;
  width: 1.35rem;
  height: 1.35rem;
}

.wh-fcta__toggle-icon--close {
  display: none;
}

.wh-fcta.is-open .wh-fcta__toggle-icon--person {
  display: none;
}

.wh-fcta.is-open .wh-fcta__toggle-icon--close {
  display: inline-flex;
}

@keyframes wh-fcta-bounce {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-0.45rem);
  }
}

@media (max-width: 63.99rem) {
  .wh-fcta[data-wh-fcta-mobile='bottom-right'] {
    right: var(--wh-fcta-offset-x);
    left: auto;
  }

  .wh-fcta[data-wh-fcta-mobile='bottom-right'] .wh-fcta__nav,
  .wh-fcta[data-wh-fcta-mobile='bottom-right'] .wh-fcta__items {
    align-items: flex-end;
  }

  .wh-fcta[data-wh-fcta-mobile='bottom-right'] .wh-fcta__item {
    flex-direction: row;
  }

  .wh-fcta[data-wh-fcta-mobile='bottom-left'] {
    left: var(--wh-fcta-offset-x);
    right: auto;
  }

  .wh-fcta[data-wh-fcta-mobile='bottom-left'] .wh-fcta__nav,
  .wh-fcta[data-wh-fcta-mobile='bottom-left'] .wh-fcta__items {
    align-items: flex-start;
  }

  .wh-fcta[data-wh-fcta-mobile='bottom-left'] .wh-fcta__item {
    flex-direction: row-reverse;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wh-fcta__toggle.is-pulse {
    animation: none;
  }

  .wh-fcta__item,
  .wh-fcta__item-icon,
  .wh-fcta__toggle-icon {
    transition: none;
  }
}
