.bl-wa-widget,
.bl-wa-widget * {
  box-sizing: border-box;
}

.bl-wa-widget {
  position: fixed;
  bottom: var(--bl-wa-bottom, 28px);
  z-index: var(--bl-wa-z, 99999);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

.bl-wa-pos-right { right: var(--bl-wa-side, 28px); }
.bl-wa-pos-left  { left: var(--bl-wa-side, 28px); align-items: flex-start; }

.bl-wa-hint {
  position: relative;
  width: min(330px, calc(100vw - 40px));
  padding: 17px 44px 16px 18px;
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 18px;
  background: var(--bl-wa-bubble, #fff);
  color: var(--bl-wa-text, #0f172a);
  box-shadow: 0 18px 50px rgba(15, 23, 42, .16), 0 4px 14px rgba(15, 23, 42, .08);
  opacity: 0;
  transform: translateY(8px) scale(.98);
  animation: blWaEnter .45s cubic-bezier(.2,.75,.25,1) .35s forwards;
}

.bl-wa-hint::after {
  content: "";
  position: absolute;
  bottom: -7px;
  width: 14px;
  height: 14px;
  background: var(--bl-wa-bubble, #fff);
  transform: rotate(45deg);
  border-right: 1px solid rgba(15, 23, 42, .08);
  border-bottom: 1px solid rgba(15, 23, 42, .08);
}

.bl-wa-pos-right .bl-wa-hint::after { right: 32px; }
.bl-wa-pos-left .bl-wa-hint::after { left: 32px; }

.bl-wa-headline {
  display: block;
  margin-bottom: 5px;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 800;
  letter-spacing: -.01em;
}

.bl-wa-copy {
  display: block;
  font-size: 13px;
  line-height: 1.5;
  color: color-mix(in srgb, var(--bl-wa-text, #0f172a) 78%, transparent);
}

.bl-wa-mini {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 9px;
  font-size: 11px;
  font-weight: 700;
  color: #168a46;
}

.bl-wa-mini::before {
  content: "✓";
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(37, 211, 102, .12);
}

.bl-wa-hint-close {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: rgba(15, 23, 42, .05);
  color: rgba(15, 23, 42, .55);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}

.bl-wa-hint-close:hover {
  background: rgba(15, 23, 42, .09);
  color: rgba(15, 23, 42, .9);
  transform: rotate(4deg);
}

.bl-wa-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 60px;
  padding: 7px 18px 7px 7px;
  border-radius: 999px;
  background: var(--bl-wa-brand, #25D366);
  color: #fff !important;
  text-decoration: none !important;
  box-shadow: 0 14px 34px rgba(22, 138, 70, .28), 0 4px 12px rgba(15, 23, 42, .14);
  transition: transform .22s ease, box-shadow .22s ease, filter .22s ease;
  isolation: isolate;
}

.bl-wa-button:hover,
.bl-wa-button:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 18px 42px rgba(22, 138, 70, .34), 0 6px 16px rgba(15, 23, 42, .16);
  filter: saturate(1.04);
  color: #fff !important;
}

.bl-wa-button:focus-visible {
  outline: 3px solid rgba(37, 211, 102, .28);
  outline-offset: 4px;
}

.bl-wa-icon-wrap {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: 50%;
  background: rgba(255,255,255,.16);
}

.bl-wa-icon {
  width: 28px;
  height: 28px;
}

.bl-wa-label {
  margin-left: 10px;
  font-size: 14px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: .01em;
}

.bl-wa-pulse-enabled .bl-wa-button::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: var(--bl-wa-brand, #25D366);
  opacity: .28;
  animation: blWaPulse 2.6s ease-out infinite;
}

.bl-wa-widget.bl-wa-hint-closed .bl-wa-hint { display: none; }

@keyframes blWaPulse {
  0%, 45% { transform: scale(1); opacity: .24; }
  75%, 100% { transform: scale(1.18); opacity: 0; }
}

@keyframes blWaEnter {
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 767px) {
  .bl-wa-widget {
    bottom: calc(var(--bl-wa-mobile-bottom, 18px) + env(safe-area-inset-bottom));
  }
  .bl-wa-pos-right { right: var(--bl-wa-mobile-side, 16px); }
  .bl-wa-pos-left { left: var(--bl-wa-mobile-side, 16px); }
  .bl-wa-hint { width: min(300px, calc(100vw - 32px)); padding: 15px 42px 14px 16px; }
  .bl-wa-copy { font-size: 12.5px; }
  .bl-wa-button { min-height: 56px; padding: 6px 16px 6px 6px; }
  .bl-wa-icon-wrap { width: 44px; height: 44px; flex-basis: 44px; }
}

@media (max-width: 420px) {
  .bl-wa-hint { width: min(285px, calc(100vw - 24px)); }
  .bl-wa-label { display: none; }
  .bl-wa-button { width: 58px; height: 58px; min-height: 58px; padding: 6px; justify-content: center; }
  .bl-wa-icon-wrap { width: 46px; height: 46px; }
}

@media (max-width: 767px) {
  .bl-wa-hide-mobile { display: none !important; }
}

@media (min-width: 768px) {
  .bl-wa-hide-desktop { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  .bl-wa-hint,
  .bl-wa-pulse-enabled .bl-wa-button::before {
    animation: none !important;
    opacity: 1;
    transform: none;
  }
  .bl-wa-button { transition: none; }
}
