/* =====================================
   WhatsApp FAB + Modal (Design)
   ===================================== */

:root {
  --wa-green: #25D366;
  --wa-green-hover: #1ebe57;
  --wa-text: #1a1a1a;
  --wa-muted: #6b7280;
  --wa-border: #e5e7eb;
}

/* Legacy-Reste aus Elementor ausblenden */
#contact-modal,
#contact-trigger {
  display: none !important;
}

/* ---------- FAB ---------- */
.wa-fab {
  position: fixed;
  right: 20px;
  bottom: 24px;
  z-index: 99990;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 8px 8px;
  border: 1px solid var(--wa-border);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  font-family: "Lato", sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--wa-text);
  line-height: 1.2;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(12px);
  transition:
    opacity 0.35s ease,
    transform 0.35s ease,
    visibility 0.35s ease,
    box-shadow 0.2s ease;
}

.wa-fab.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.wa-fab.is-visible:hover,
.wa-fab.is-visible:focus {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.16);
  transform: translateY(-1px);
  outline: none;
  background: #fff;
  color: var(--wa-text);
  border: 1px solid var(--wa-border);
  text-decoration: none;
}

.wa-fab__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--wa-green);
  flex-shrink: 0;
}

.wa-fab__icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

.wa-fab__label {
  white-space: nowrap;
}

.wa-fab__arrow {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.wa-fab__arrow svg {
  width: 14px;
  height: 14px;
  display: block;
}

@media (max-width: 640px) {
  .wa-fab {
    right: 12px;
    bottom: max(16px, env(safe-area-inset-bottom, 16px));
    padding: 7px 12px 7px 7px;
    font-size: 13px;
    gap: 8px;
  }

  .wa-fab__icon {
    width: 28px;
    height: 28px;
  }

  .wa-fab__icon svg {
    width: 16px;
    height: 16px;
  }
}

/* ---------- Modal ---------- */
.wa-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 20px;
  pointer-events: none;
}

.wa-modal[aria-hidden="true"] .wa-modal__backdrop {
  opacity: 0;
  pointer-events: none;
}

.wa-modal[aria-hidden="true"] .wa-modal__panel {
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
}

.wa-modal[aria-hidden="false"] {
  pointer-events: auto;
}

.wa-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  transition: opacity 0.25s ease;
}

.wa-modal__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 380px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  padding: 2rem 1.5rem 1.5rem;
  text-align: center;
  transform: translateY(0);
  opacity: 1;
  transition: transform 0.28s ease, opacity 0.28s ease;
}

/* Mobile: zentriert */
@media (max-width: 640px) {
  .wa-modal {
    align-items: center;
    justify-content: center;
    padding: 12px;
  }

  .wa-modal__panel {
    max-width: 100%;
  }
}

.wa-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #9ca3af;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.wa-modal__close:hover,
.wa-modal__close:focus {
  background-color: #f3f4f6;
  color: #4b5563;
  text-decoration: none;
  border: none;
  outline: none;
}

.wa-modal__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: var(--wa-green);
}

.wa-modal__icon svg {
  width: 34px;
  height: 34px;
  display: block;
}

.wa-modal__panel h4 {
  font-family: "Lato", sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--wa-text);
  margin: 0 0 0.5rem;
  padding: 0;
  line-height: 1.3;
}

.wa-modal__hint {
  margin: 0 0 1.5rem;
  color: var(--wa-muted);
  line-height: 1.45;
  font-size: 15px;
  font-family: "Lato", sans-serif;
}

.wa-modal__actions {
  display: flex;
  flex-direction: column;
}

.wa-modal__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-family: "Lato", sans-serif;
  font-size: 15px;
  font-weight: 600;
  padding: 14px 20px;
  text-decoration: none;
  border-radius: 8px;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.wa-modal__btn svg {
  width: 18px;
  height: 18px;
  display: block;
  flex-shrink: 0;
}

.wa-modal a.wa-modal__btn--wa {
  color: #fff !important;
  background-color: var(--wa-green);
  border: 1px solid var(--wa-green);
}

.wa-modal a.wa-modal__btn--wa span {
  color: #fff !important;
}

.wa-modal a.wa-modal__btn--wa:hover,
.wa-modal a.wa-modal__btn--wa:focus {
  background-color: var(--wa-green-hover);
  border-color: var(--wa-green-hover);
  color: #fff !important;
  text-decoration: none;
  outline: none;
}

.wa-modal a.wa-modal__btn--wa:hover span,
.wa-modal a.wa-modal__btn--wa:focus span {
  color: #fff !important;
}

.wa-modal__btn--mail {
  color: var(--wa-text);
  background-color: #fff;
  border: 1px solid var(--wa-border);
  font-weight: 500;
}

.wa-modal__btn--mail:hover,
.wa-modal__btn--mail:focus {
  background-color: #f9fafb;
  border-color: #d1d5db;
  color: var(--wa-text);
  text-decoration: none;
  outline: none;
}

.wa-modal__divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 1.1rem 0;
  color: var(--wa-muted);
  font-size: 13px;
  font-family: "Lato", sans-serif;
}

.wa-modal__divider::before,
.wa-modal__divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--wa-border);
}

.wa-modal__divider span {
  white-space: nowrap;
}

.wa-modal__response {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 1.25rem 0 0;
  color: var(--wa-muted);
  font-size: 13px;
  font-family: "Lato", sans-serif;
  line-height: 1.35;
}

.wa-modal__response svg {
  flex-shrink: 0;
  color: #9ca3af;
}

@media (max-width: 640px) {
  .wa-modal__panel {
    padding: 1.75rem 1.25rem 1.25rem;
  }

  .wa-modal__panel h4 {
    font-size: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wa-modal__panel,
  .wa-modal__backdrop,
  .wa-fab {
    transition: none !important;
  }

  .wa-modal[aria-hidden="true"] .wa-modal__panel {
    transform: none !important;
  }

  .wa-fab:not(.is-visible) {
    transform: none !important;
  }
}
