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

.ns-wa-widget {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 20000;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.ns-wa-launcher {
  min-width: 178px;
  height: 56px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  background: #25d366;
  color: #fff;
  box-shadow: 0 12px 30px rgba(18, 140, 126, 0.3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  transition: background-color .2s ease, box-shadow .2s ease, transform .2s ease, opacity .18s ease;
}

.ns-wa-launcher:hover,
.ns-wa-launcher:focus-visible {
  background: #128c7e;
  box-shadow: 0 15px 34px rgba(18, 140, 126, 0.38);
  transform: translateY(-2px);
}

.ns-wa-launcher:focus-visible,
.ns-wa-close:focus-visible,
.ns-wa-submit:focus-visible,
.ns-wa-form input:focus-visible,
.ns-wa-form textarea:focus-visible {
  outline: 3px solid rgba(37, 211, 102, 0.3);
  outline-offset: 2px;
}

.ns-wa-launcher svg {
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
}

.ns-wa-panel {
  position: absolute;
  right: 0;
  bottom: 0;
  width: min(410px, calc(100vw - 32px));
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 20px;
  background: #fff;
  color: #172033;
  box-shadow: 0 24px 65px rgba(2, 16, 32, 0.24);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(.98);
  transform-origin: bottom right;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
}

.ns-wa-widget.is-open .ns-wa-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.ns-wa-widget.is-open .ns-wa-launcher {
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
}

.ns-wa-header {
  min-height: 78px;
  padding: 14px 48px 14px 16px;
  background: linear-gradient(135deg, #075e54, #128c7e);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 13px;
  position: relative;
}

.ns-wa-brand-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  display: grid;
  place-items: center;
  flex: 0 0 38px;
}

.ns-wa-brand-icon svg {
  width: 22px;
  height: 22px;
}

.ns-wa-header h2 {
  margin: 0 0 2px;
  color: inherit;
  font-size: 18px;
  line-height: 1.25;
  font-weight: 700;
}

.ns-wa-header p {
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 12.5px;
  line-height: 1.45;
}

.ns-wa-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font: 300 27px/30px Arial, sans-serif;
}

.ns-wa-close:hover {
  background: rgba(255, 255, 255, 0.14);
}

.ns-wa-form {
  padding: 16px;
}

.ns-wa-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
}

.ns-wa-field {
  min-width: 0;
}

.ns-wa-field-wide {
  grid-column: 1 / -1;
}

.ns-wa-form label {
  display: block;
  margin: 0 0 4px;
  color: #263348;
  font-size: 12px;
  line-height: 1.3;
  font-weight: 650;
}

.ns-wa-form input,
.ns-wa-form textarea {
  display: block;
  width: 100%;
  margin: 0;
  border: 1px solid #d5dbe5;
  border-radius: 9px;
  background: #fff;
  color: #172033;
  font: inherit;
  font-size: 14px;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.ns-wa-form input {
  height: 42px;
  padding: 0 12px;
}

.ns-wa-form textarea {
  min-height: 68px;
  max-height: 120px;
  padding: 9px 12px;
  line-height: 1.4;
  resize: vertical;
}

.ns-wa-form input::placeholder,
.ns-wa-form textarea::placeholder {
  color: #8791a1;
}

.ns-wa-form input:focus,
.ns-wa-form textarea:focus {
  border-color: #128c7e;
  box-shadow: 0 0 0 3px rgba(18, 140, 126, 0.1);
}

.ns-wa-form .ns-wa-honeypot {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
}

.ns-wa-error {
  min-height: 16px;
  margin: 7px 0 3px;
  color: #b42318;
  font-size: 12.5px;
  line-height: 1.4;
}

.ns-wa-submit {
  width: 100%;
  height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 10px;
  background: #25d366;
  color: #fff;
  box-shadow: 0 8px 20px rgba(18, 140, 126, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  transition: background-color .18s ease, transform .18s ease;
}

.ns-wa-submit:hover {
  background: #128c7e;
  transform: translateY(-1px);
}

.ns-wa-submit:disabled {
  cursor: wait;
  opacity: .7;
  transform: none;
}

.ns-wa-submit svg {
  width: 18px;
  height: 18px;
}

.ns-wa-privacy {
  margin: 7px 2px 0;
  color: #6d7787;
  font-size: 10.5px;
  line-height: 1.45;
  text-align: center;
}

.ns-wa-privacy a {
  color: #075e54;
  text-decoration: underline;
}

@media (max-width: 640px) {
  .ns-wa-widget {
    right: 16px;
    bottom: 16px;
  }

  .ns-wa-launcher {
    width: 56px;
    min-width: 56px;
    padding: 0;
  }

  .ns-wa-launcher span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .ns-wa-panel {
    position: fixed;
    right: 0;
    bottom: 0;
    width: 100%;
    max-height: min(88dvh, 560px);
    border-width: 1px 0 0;
    border-radius: 22px 22px 0 0;
    overflow-y: auto;
    padding-bottom: env(safe-area-inset-bottom);
    transform: translateY(24px);
    transform-origin: bottom center;
  }

  .ns-wa-widget.is-open .ns-wa-panel {
    transform: translateY(0);
  }

}

@media (max-width: 360px) {
  .ns-wa-fields {
    grid-template-columns: 1fr;
  }

  .ns-wa-field-wide {
    grid-column: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ns-wa-launcher,
  .ns-wa-panel,
  .ns-wa-submit {
    transition: none;
  }
}
