/* Floating WhatsApp chat (inc/nt-whatsapp.php) */
.nt-wa {
  --wa: #25D366;
  --wa-dark: #128C4B;
  position: fixed;
  right: max(20px, env(safe-area-inset-right, 0px));
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  z-index: 9000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
}

.nt-wa button.nt-wa__btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 56px;
  padding: 0 22px 0 16px;
  border: 0;
  border-radius: 999px;
  background: var(--wa);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(18, 140, 75, .35);
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
}
.nt-wa button.nt-wa__btn:hover { background: var(--wa-dark); transform: translateY(-2px); box-shadow: 0 16px 36px rgba(18, 140, 75, .45); }
.nt-wa__btn:focus-visible, .nt-wa__start:focus-visible, .nt-wa__close:focus-visible { outline: 3px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 6px var(--wa-dark); }
.nt-wa__btn svg { width: 28px; height: 28px; flex: none; }

/* Gentle pulse ring until the visitor opens the chat once */
.nt-wa:not(.is-seen) .nt-wa__btn { animation: nt-wa-pulse 2.6s ease-out 3s 3; }
@keyframes nt-wa-pulse {
  0%   { box-shadow: 0 12px 30px rgba(18, 140, 75, .35), 0 0 0 0 rgba(37, 211, 102, .55); }
  70%  { box-shadow: 0 12px 30px rgba(18, 140, 75, .35), 0 0 0 16px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 12px 30px rgba(18, 140, 75, .35), 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* Card */
.nt-wa__card {
  width: min(340px, calc(100vw - 40px));
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .22);
  transform-origin: bottom right;
  animation: nt-wa-in .28s cubic-bezier(.2, .8, .2, 1);
}
.nt-wa__card[hidden] { display: none; }
@keyframes nt-wa-in { from { opacity: 0; transform: translateY(10px) scale(.96); } to { opacity: 1; transform: none; } }

.nt-wa__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 16px 18px 18px;
  background: linear-gradient(135deg, #0B0303 0%, #3A0807 100%);
  color: #fff;
}
.nt-wa__avatar {
  display: grid; place-items: center;
  width: 44px; height: 44px; flex: none;
  border-radius: 50%;
  background: var(--wa);
  color: #fff;
}
.nt-wa__avatar svg { width: 26px; height: 26px; }
.nt-wa__title { font-size: 16px; font-weight: 700; line-height: 1.3; }
.nt-wa__sub { margin-top: 2px; font-size: 12.5px; line-height: 1.4; color: rgba(255, 255, 255, .7); }
.nt-wa button.nt-wa__close {
  margin-left: auto; align-self: flex-start;
  width: 32px; height: 32px; flex: none;
  border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  color: #fff; font-size: 22px; line-height: 1;
  cursor: pointer;
}
.nt-wa button.nt-wa__close:hover { background: rgba(255, 255, 255, .2); }

.nt-wa__body {
  padding: 22px 18px 6px;
  background: #F4F6F6;
}
.nt-wa__bubble {
  position: relative;
  margin: 0;
  max-width: 92%;
  padding: 12px 14px;
  border-radius: 4px 14px 14px 14px;
  background: #fff;
  color: #1A1A1A;
  font-size: 14px;
  line-height: 1.55;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .06);
}

.nt-wa__start {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin: 16px 18px 8px;
  padding: 13px 18px;
  border-radius: 999px;
  background: var(--wa);
  color: #fff !important;
  font-size: 15px; font-weight: 600;
  text-decoration: none !important;
  transition: background .2s ease;
}
.nt-wa__start:hover { background: var(--wa-dark); }
.nt-wa__start svg { width: 22px; height: 22px; }
.nt-wa__num { padding: 0 18px 16px; text-align: center; font-size: 12.5px; color: #6B6B6B; }

/* Phones: icon-only button */
@media (max-width: 767px) {
  .nt-wa { right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
  .nt-wa button.nt-wa__btn { width: 56px; padding: 0; justify-content: center; }
  .nt-wa__label { display: none; }
}

/* Keep out of the way while the mobile menu is open */
body:has(.nt-hdr.is-menu-open) .nt-wa { display: none; }

@media (prefers-reduced-motion: reduce) {
  .nt-wa__btn, .nt-wa__card { animation: none !important; transition: none; }
}
@media print { .nt-wa { display: none; } }
