/* TK WhatsApp – alle Regeln bleiben auf dieses Modul begrenzt. */
.tk-wa {
  --tk-wa-accent: #25d366;
  --tk-wa-header: #128c4b;
  position: fixed;
  z-index: 9000;
  bottom: max(20px, env(safe-area-inset-bottom));
  left: max(20px, env(safe-area-inset-left));
  right: max(20px, env(safe-area-inset-right));
  width: auto;
  height: 60px;
  pointer-events: none;
  font: 400 16px/1.5 Roboto, Arial, sans-serif;
  color: #f5f7f6;
  text-align: left;
}
.tk-wa[hidden], .tk-wa [hidden] { display: none !important; }
.tk-wa, .tk-wa * { box-sizing: border-box; }
.tk-wa--right .tk-wa__trigger { margin-left: auto; }
.tk-wa button {
  margin: 0; border: 0; text-transform: none; letter-spacing: 0;
  font-family: inherit; cursor: pointer; box-shadow: none;
}
.tk-wa button:focus-visible, .tk-wa a:focus-visible, .tk-wa input:focus-visible {
  outline: 3px solid #fff; outline-offset: 4px;
}
.tk-wa__icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.tk-wa__icon svg { display: block; width: 100%; height: 100%; fill: currentColor; }
.tk-wa .tk-wa__trigger,
.tk-wa .tk-wa__trigger:focus,
.tk-wa .tk-wa__trigger:active {
  pointer-events: auto;
  position: relative; display: flex; align-items: center; justify-content: center;
  width: 60px; height: 60px; padding: 12px; border-radius: 50%;
  background: var(--tk-wa-accent); color: #102a20;
  box-shadow: 0 4px 18px #0003;
}
.tk-wa__trigger .tk-wa__icon { width: 36px; height: 36px; }
.tk-wa .tk-wa__trigger:hover { background: #102a20; color: var(--tk-wa-accent); }
.tk-wa__tip {
  position: absolute; left: calc(100% + 12px); top: 50%; transform: translateY(-50%);
  white-space: nowrap; border-radius: 6px; padding: 6px 10px;
  background: #1e2228; color: #fff; font-size: 13px;
  opacity: 0; visibility: hidden; pointer-events: none;
}
.tk-wa--right .tk-wa__tip { left: auto; right: calc(100% + 12px); }
.tk-wa__trigger:hover .tk-wa__tip, .tk-wa__trigger:focus-visible .tk-wa__tip { opacity: 1; visibility: visible; }
.tk-wa[data-open="1"] .tk-wa__tip { display: none; }
.tk-wa__panel {
  position: absolute; left: 0; bottom: 80px; width: 390px;
  max-width: 100%;
  pointer-events: auto;
  max-height: calc(100dvh - 120px - env(safe-area-inset-bottom));
  border: 1px solid #ffffff12; border-radius: 28px;
  background: #19231e; box-shadow: 0 8px 32px #0005;
  isolation: isolate;
}
.tk-wa--right .tk-wa__panel { left: auto; right: 0; }
.tk-wa__header {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 22px; min-height: 76px;
  border-radius: 27px 27px 0 0; background: var(--tk-wa-header);
}
.tk-wa .tk-wa__name { margin: 0; font-size: 22px; line-height: 1.25; font-weight: 700; color: #fff; }
.tk-wa .tk-wa__close,
.tk-wa .tk-wa__close:focus,
.tk-wa .tk-wa__close:active {
  display: grid; place-items: center; flex: 0 0 40px;
  width: 40px; height: 40px; padding: 10px;
  color: #fff; background: #0c5b32; border-radius: 50%;
}
.tk-wa__close svg { display: block; width: 20px; height: 20px; }
.tk-wa .tk-wa__close:hover { background: #083f23; }
.tk-wa__body {
  padding: 20px;
  max-height: calc(100dvh - 204px - env(safe-area-inset-bottom));
  overflow: auto; overscroll-behavior: contain;
  border-radius: 0 0 27px 27px;
}
.tk-wa .tk-wa__bubble {
  position: relative; margin: 0 0 24px; padding: 17px 20px;
  border-radius: 22px; background: #4d534f; color: #fff;
  font-size: 17px; line-height: 1.5;
}
.tk-wa__bubble::before {
  content: ""; position: absolute; left: -10px; bottom: 18px;
  border-right: 14px solid #4d534f; border-top: 10px solid transparent;
}
.tk-wa__consent {
  display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 10px;
  align-items: start; color: #edf2ef; font-size: 14px; line-height: 1.45; cursor: pointer;
}
.tk-wa .tk-wa__checkbox {
  appearance: auto; -webkit-appearance: checkbox; display: block;
  width: 22px; min-width: 22px; height: 22px; margin: 3px 0 0;
  padding: 0; accent-color: var(--tk-wa-accent); cursor: pointer;
}
.tk-wa .tk-wa__consent a {
  color: #fff; font-weight: 600; text-decoration: underline;
  text-underline-offset: .18em; text-decoration-thickness: 1px;
}
.tk-wa .tk-wa__consent a:hover { color: var(--tk-wa-accent); }
.tk-wa__launch-area { position: relative; margin-top: 22px; }
.tk-wa .tk-wa__launch,
.tk-wa .tk-wa__launch:focus,
.tk-wa .tk-wa__launch:active {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  width: 100%; min-height: 58px; padding: 12px 18px;
  border: 2px solid var(--tk-wa-accent); border-radius: 32px;
  background: var(--tk-wa-accent); color: #102a20;
  font-size: 17px; line-height: 1.3; font-weight: 700;
}
.tk-wa__launch .tk-wa__icon { width: 30px; height: 34px; }
.tk-wa .tk-wa__launch:disabled { opacity: .45; cursor: not-allowed; }
.tk-wa .tk-wa__launch:not(:disabled):hover {
  background: #102a20; color: var(--tk-wa-accent);
}
.tk-wa__qr {
  position: absolute; left: 20px; top: 20px;
  width: 288px; max-width: 100%; padding: 16px 16px 10px;
  background: #fff; color: #102a20; border-radius: 16px;
  box-shadow: 0 5px 22px #0005; z-index: 2;
}
.tk-wa__qr::after {
  content: ""; position: absolute; left: 22px; bottom: -9px;
  border-top: 10px solid #fff; border-left: 9px solid transparent; border-right: 9px solid transparent;
}
.tk-wa__qr-canvas { display: flex; align-items: center; justify-content: center; min-height: 256px; }
.tk-wa__qr-canvas canvas { display: block; width: 256px; height: 256px; max-width: 100%; }
.tk-wa .tk-wa__qr-caption { margin: 6px 0 0; text-align: center; color: #102a20; font-size: 13px; }
.tk-wa .tk-wa__error { margin: 12px 0 0; color: #fff; font-size: 13px; }
.tk-wa__sr {
  position: absolute !important; width: 1px; height: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
@media (max-width: 480px) {
  .tk-wa { left: max(14px, env(safe-area-inset-left)); right: max(14px, env(safe-area-inset-right)); bottom: max(14px, env(safe-area-inset-bottom)); }
  .tk-wa__panel { width: 390px; max-width: 100%; bottom: 74px; }
  .tk-wa__header { padding: 16px 18px; min-height: 72px; }
  .tk-wa__body { padding: 18px; }
  .tk-wa__tip { display: none; }
}
@media (hover: none), (max-width: 767px) { .tk-wa__qr { display: none !important; } }
@media (prefers-reduced-motion: no-preference) {
  .tk-wa__trigger, .tk-wa__launch, .tk-wa__close { transition: background-color .2s, color .2s; }
}
