/* Build Setu WhatsApp support v1. Scoped to the one support link only. */
#bswa-support-v1 {
  --bswa-base-bottom: 12px;
  box-sizing: border-box;
  position: fixed;
  inset: auto calc(12px + env(safe-area-inset-right, 0px)) var(--bswa-bottom, var(--bswa-base-bottom)) auto;
  z-index: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: auto;
  min-width: 46px;
  max-width: calc(100vw - 24px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px));
  min-height: 46px;
  height: auto;
  margin: 0 0 env(safe-area-inset-bottom, 0px);
  padding: 10px 15px;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 999px;
  background: #0b8043;
  color: #fff;
  box-shadow: 0 4px 15px rgba(5, 58, 30, .22);
  font-family: inherit;
  font-size: 13px;
  font-style: normal;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: normal;
  text-align: center;
  text-decoration: none;
  text-transform: none;
  white-space: nowrap;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .15s ease, box-shadow .15s ease;
}

#bswa-support-v1::before,
#bswa-support-v1::after {
  content: none;
}

#bswa-support-v1 > svg {
  display: block;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  margin: 0;
  padding: 0;
  border: 0;
  color: currentColor;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#bswa-support-v1 > span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

#bswa-support-v1:visited {
  color: #fff;
}

@media (hover: hover) {
  #bswa-support-v1:hover {
    background: #086c38;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 5px 18px rgba(5, 58, 30, .3);
  }
}

#bswa-support-v1:focus-visible {
  outline: 3px solid #103c78;
  outline-offset: 3px;
  box-shadow: 0 0 0 3px #fff;
}

#bswa-support-v1[hidden] {
  display: none !important;
}

/* Conservative no-JavaScript clearance for the existing mobile bottom nav. */
@media (max-width: 900px) {
  body:has(.bottom-nav) #bswa-support-v1 {
    --bswa-base-bottom: 112px;
  }
}

@media (min-width: 901px) {
  #bswa-support-v1 {
    --bswa-base-bottom: 24px;
    right: calc(24px + env(safe-area-inset-right, 0px));
    min-height: 48px;
    font-size: 14px;
  }
}

/* Native modal dialogs and fullscreen content take priority even without JS. */
html:has(dialog[open]) #bswa-support-v1,
html:has(:fullscreen) #bswa-support-v1 {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  #bswa-support-v1 {
    transition: none;
  }
}

@media print {
  #bswa-support-v1 {
    display: none !important;
  }
}
