/* ==========================================================================
   SM Hörakustik – WhatsApp-Kontaktknopf
   Ruhig, hochwertig: weiße Pille im CI-Braun, WhatsApp-Grün nur im Logo-Kreis.
   Abstand nach unten setzt das JS (--sm-wa-bottom): Sticky-Leiste, Cookie-Reiter.
   ========================================================================== */

.sm-wa{
  --sm-wa-gruen:#25D366;
  position:fixed; z-index:990;
  right:max(20px, env(safe-area-inset-right, 0px));
  bottom:var(--sm-wa-bottom, 24px);
  display:flex; flex-direction:column; align-items:flex-end;
  transition:opacity .2s ease, transform .2s ease, visibility 0s linear 0s;
}
/* Weicht aus: Cookie-Banner offen, Formularfeld im Fokus, wichtiges Element darunter */
.sm-wa.is-weg{ opacity:0; visibility:hidden; transform:translateY(8px); pointer-events:none;
  transition:opacity .2s ease, transform .2s ease, visibility 0s linear .2s; }

/* Spezifität bewusst erhöht: Elementors globale Linkfarbe würde sonst gewinnen */
.sm-wa a.sm-wa__btn{
  display:inline-flex; align-items:center; gap:12px;
  min-height:56px; padding:6px 22px 6px 6px;
  background:#FFFFFF; color:#5A3525; border:1px solid #E3D7D0; border-radius:999px;
  box-shadow:0 6px 22px rgba(46,26,18,.14);
  font-size:17px; font-weight:600; line-height:1.2; text-decoration:none;
  transition:box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}
.sm-wa a.sm-wa__btn:hover{ color:#5A3525; border-color:#C9B8AE; box-shadow:0 8px 26px rgba(46,26,18,.2); transform:translateY(-1px); }
.sm-wa a.sm-wa__btn:focus-visible{ outline:3px solid #D25522; outline-offset:3px; }
.sm-wa__circle{
  flex:none; width:44px; height:44px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  background:var(--sm-wa-gruen); color:#FFFFFF;
  box-shadow:inset 0 0 0 1px rgba(0,0,0,.08);
}
.sm-wa__icon{ width:24px; height:24px; display:block; }

/* Handy: kompakter runder Knopf, Text bleibt für Screenreader im aria-label */
@media (max-width:767px){
  .sm-wa{ right:max(14px, env(safe-area-inset-right, 0px)); }
  .sm-wa a.sm-wa__btn{ padding:0; gap:0; border:0; background:transparent; min-height:0;
    box-shadow:0 6px 18px rgba(46,26,18,.22); border-radius:50%; }
  .sm-wa__circle{ width:56px; height:56px; box-shadow:inset 0 0 0 1px rgba(0,0,0,.1); }
  .sm-wa__icon{ width:28px; height:28px; }
  .sm-wa__label{ position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
}

/* Einmaliger Hinweis (Sprechblase) – erscheint einmal pro Sitzung, schließbar */
.sm-wa__bubble{
  position:relative; margin:0 0 12px; width:min(290px, calc(100vw - 32px));
  background:#FFFFFF; color:#5A3525; border:1px solid #E3D7D0; border-radius:14px;
  box-shadow:0 8px 26px rgba(46,26,18,.16); padding:14px 44px 14px 16px;
  animation:sm-wa-ein .25s ease both;
}
.sm-wa__bubble[hidden]{ display:none; }
.sm-wa__bubble::after{ content:""; position:absolute; right:26px; bottom:-7px; width:12px; height:12px;
  background:#FFFFFF; border-right:1px solid #E3D7D0; border-bottom:1px solid #E3D7D0; transform:rotate(45deg); }
.sm-wa__bubble-text{ margin:0; font-size:16px; line-height:1.4; font-weight:600; max-width:none; }
.sm-wa__bubble-text span{ display:block; margin-top:4px; font-size:14px; font-weight:400; color:#6B5347; }
/* Elementor-Kit stylt jedes <button> – hier vollständig zurücksetzen */
.sm-wa button.sm-wa__bubble-close{
  position:absolute !important; top:4px !important; right:4px !important;
  width:40px !important; height:40px !important; min-height:0 !important; padding:8px !important; margin:0 !important;
  border:0 !important; border-radius:50% !important; background:transparent !important; color:#6B5347 !important;
  box-shadow:none !important; cursor:pointer; display:flex !important; align-items:center; justify-content:center;
}
.sm-wa button.sm-wa__bubble-close:hover{ background:#F7F3F1 !important; color:#5A3525 !important; }
.sm-wa button.sm-wa__bubble-close:focus-visible{ outline:3px solid #D25522 !important; outline-offset:1px; }
.sm-wa button.sm-wa__bubble-close svg{ width:18px; height:18px; display:block; }
@keyframes sm-wa-ein{ from{ opacity:0; transform:translateY(6px); } to{ opacity:1; transform:none; } }

/* Zusatzlink unter dem Formular – sekundär, Formular bleibt die Hauptaktion */
.sm-wa-inline{ margin:18px 0 0; font-size:16px; line-height:1.5; color:#6B5347; max-width:none; }
.sm-wa-inline a{ display:inline-flex; align-items:center; gap:8px; min-height:44px;
  color:#5A3525; font-weight:600; text-decoration:underline; text-underline-offset:3px; }
.sm-wa-inline a:hover{ color:#A63E15; }
.sm-wa-inline .sm-wa__icon{ width:22px; height:22px; color:#1DA851; flex:none; }
.sm-wa-inline__hint{ display:block; font-size:14px; color:#8A7268; }

@media (prefers-reduced-motion:reduce){
  .sm-wa, .sm-wa.is-weg, .sm-wa a.sm-wa__btn{ transition:none; transform:none; }
  .sm-wa__bubble{ animation:none; }
}
@media print{ .sm-wa, .sm-wa-inline{ display:none !important; } }
