/* Furbase – schwebender WhatsApp-Kontakt
   Sitzt oberhalb des Elementor-Nach-oben-Buttons (48x47px, 39px/24px vom Rand).
   Reiner wa.me-Link: kein Meta-Script, keine Datenübertragung vor dem Klick. */

.fb-wa {
  --fb-wa-green: #25d366;
  --fb-wa-green-dark: #1da851;
  --fb-wa-ink: #07375f;
  --fb-wa-muted: #526c85;
  --fb-wa-ease: cubic-bezier(.2, .8, .2, 1);

  position: fixed;
  /* Der Elementor-Nach-oben-Button sitzt bei right:24px und ist 48px breit,
     Mitte also 48px vom Rand. Bei 56px Breite ergibt 20px dieselbe Mitte. */
  right: 20px;
  bottom: 86px;
  z-index: 9990;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  font-family: "Poppins", "Helvetica Neue", Arial, sans-serif;
}

/* ---------------------------------------------------------------- Auswahlfeld */

.fb-wa__panel {
  width: min(19rem, calc(100vw - 48px));
  padding: 16px;
  border: 1px solid #e4ebf2;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 4px 10px rgba(7, 55, 95, .06), 0 20px 48px rgba(7, 55, 95, .18);
  transform-origin: bottom right;
}

.fb-wa__panel[hidden] {
  display: none;
}

.fb-wa:not(.is-open) .fb-wa__panel {
  opacity: 0;
  transform: translateY(8px) scale(.96);
  pointer-events: none;
}

.fb-wa.is-open .fb-wa__panel {
  opacity: 1;
  transform: none;
  transition: opacity .22s var(--fb-wa-ease), transform .22s var(--fb-wa-ease);
}

.fb-wa__title {
  margin: 0 0 4px;
  color: var(--fb-wa-ink);
  font-size: .98rem;
  font-weight: 700;
  line-height: 1.3;
}

.fb-wa__sub {
  margin: 0 0 14px;
  color: var(--fb-wa-muted);
  font-size: .84rem;
  line-height: 1.5;
}

.fb-wa__choice {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 8px;
  padding: 11px 13px;
  border: 1px solid #e4ebf2;
  border-radius: 12px;
  background: #fbfcfe;
  color: var(--fb-wa-ink) !important;
  text-decoration: none !important;
  transition: border-color .25s var(--fb-wa-ease), background-color .25s var(--fb-wa-ease), transform .25s var(--fb-wa-ease);
}

.fb-wa__choice:last-of-type {
  margin-bottom: 0;
}

.fb-wa__choice:hover,
.fb-wa__choice:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(37, 211, 102, .55);
  background: #f2fdf6;
}

.fb-wa__choice:focus-visible {
  outline: 2px solid var(--fb-wa-green-dark);
  outline-offset: 2px;
}

.fb-wa__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 10px;
  background: rgba(37, 211, 102, .14);
  color: var(--fb-wa-green-dark);
}

.fb-wa__icon svg {
  width: 17px;
  height: 17px;
}

.fb-wa__label {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.fb-wa__label strong {
  color: var(--fb-wa-ink);
  font-size: .9rem;
  font-weight: 600;
  line-height: 1.3;
}

.fb-wa__label span {
  color: var(--fb-wa-muted);
  font-size: .78rem;
  line-height: 1.35;
}

.fb-wa__hint {
  margin: 12px 0 0;
  padding-top: 11px;
  border-top: 1px solid #eef2f6;
  color: var(--fb-wa-muted);
  font-size: .74rem;
  line-height: 1.45;
}

/* ---------------------------------------------------------------- Schaltfläche */

.fb-wa__toggle {
  /* Theme-Regeln fuer button setzen display:block und eigene Masse */
  display: inline-flex !important;
  position: relative;
  align-items: center;
  justify-content: center;
  width: 56px !important;
  height: 56px !important;
  min-width: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: var(--fb-wa-green) !important;
  color: #fff !important;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(37, 211, 102, .38);
  transition: background-color .25s var(--fb-wa-ease), transform .25s var(--fb-wa-ease), box-shadow .25s var(--fb-wa-ease);
}

.fb-wa__toggle:hover {
  transform: scale(1.06) !important;
  background: var(--fb-wa-green-dark) !important;
  box-shadow: 0 10px 24px rgba(37, 211, 102, .46) !important;
}

.fb-wa__toggle:focus-visible {
  outline: 3px solid var(--fb-wa-ink);
  outline-offset: 3px;
}

/* Die Spannen um die Symbole selbst zentrieren – als Inline-Element
   richtet sich das SVG sonst an der Grundlinie aus und sitzt 3px zu hoch. */
.fb-wa__toggle > span {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.fb-wa__toggle svg {
  display: block;
  width: 29px;
  height: 29px;
  transition: transform .25s var(--fb-wa-ease);
}

.fb-wa__toggle .fb-wa__close {
  display: none;
}

.fb-wa.is-open .fb-wa__toggle .fb-wa__open {
  display: none;
}

.fb-wa.is-open .fb-wa__toggle .fb-wa__close {
  display: block;
}

/* Dezenter Hinweisring beim ersten Erscheinen */
.fb-wa__toggle::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--fb-wa-green);
  opacity: 0;
  animation: fb-wa-puls 3.2s var(--fb-wa-ease) 2s 3;
  pointer-events: none;
}

@keyframes fb-wa-puls {
  0% { opacity: .7; transform: scale(1); }
  70% { opacity: 0; transform: scale(1.5); }
  100% { opacity: 0; transform: scale(1.5); }
}

/* ---------------------------------------------------------------- Klein und Bewegung */

@media (max-width: 600px) {
  .fb-wa {
    right: 16px;
    bottom: 78px;
  }

  .fb-wa__toggle {
    width: 52px !important;
    height: 52px !important;
  }
}

@media print {
  .fb-wa { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .fb-wa__panel,
  .fb-wa__toggle,
  .fb-wa__choice {
    transition: none !important;
  }

  .fb-wa__toggle::after {
    animation: none;
  }
}
