.bm-support,
.bm-support * {
  box-sizing: border-box;
}

.bm-support {
  --bm-support-primary: #03a9f4;
  --bm-support-primary-dark: #0787c8;
  --bm-support-whatsapp: #25d366;
  --bm-support-text: #172b4d;
  --bm-support-muted: #667085;
  --bm-support-border: #dfe4ea;
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 2147483000;
  font-family: "Poppins", Arial, sans-serif;
}

.bm-support__launcher {
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  margin-left: auto;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, var(--bm-support-primary), var(--bm-support-primary-dark));
  box-shadow: 0 8px 28px rgba(7, 135, 200, 0.34);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.bm-support__launcher:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(7, 135, 200, 0.4);
}

.bm-support__launcher:focus-visible,
.bm-support__close:focus-visible,
.bm-support__send:focus-visible,
.bm-support select:focus-visible,
.bm-support textarea:focus-visible {
  outline: 3px solid rgba(3, 169, 244, 0.28);
  outline-offset: 2px;
}

.bm-support__launcher-icon,
.bm-support__launcher svg {
  width: 29px;
  height: 29px;
}

.bm-support svg {
  display: block;
  fill: currentColor;
}

.bm-support__icon-close {
  display: none !important;
}

.bm-support.is-open .bm-support__icon-chat {
  display: none;
}

.bm-support.is-open .bm-support__icon-close {
  display: block !important;
}

.bm-support__panel {
  position: absolute;
  right: 0;
  bottom: 76px;
  width: min(370px, calc(100vw - 32px));
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 55px rgba(15, 23, 42, 0.22);
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px) scale(0.98);
  transform-origin: bottom right;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

.bm-support.is-open .bm-support__panel {
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
}

.bm-support__header {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 86px;
  padding: 17px 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--bm-support-primary-dark), var(--bm-support-primary));
}

.bm-support__avatar {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.17);
}

.bm-support__avatar svg {
  width: 27px;
  height: 27px;
}

.bm-support__heading {
  min-width: 0;
  flex: 1;
}

.bm-support__heading h2,
.bm-support__heading p {
  margin: 0;
  color: inherit;
}

.bm-support__heading h2 {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
}

.bm-support__heading p {
  margin-top: 3px;
  font-size: 12px;
  line-height: 1.5;
  opacity: 0.9;
}

.bm-support__close {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: transparent;
  cursor: pointer;
  transition: background 0.18s ease;
}

.bm-support__close:hover {
  background: rgba(255, 255, 255, 0.16);
}

.bm-support__close svg {
  width: 21px;
  height: 21px;
}

.bm-support__form {
  display: grid;
  gap: 17px;
  padding: 20px;
}

.bm-support__field {
  display: grid;
  gap: 7px;
}

.bm-support__field label {
  margin: 0;
  color: var(--bm-support-text);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}

.bm-support select,
.bm-support textarea {
  width: 100%;
  margin: 0;
  border: 1px solid var(--bm-support-border);
  border-radius: 10px;
  color: var(--bm-support-text);
  background: #fff;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.bm-support select {
  height: 46px;
  padding: 0 40px 0 13px;
}

.bm-support textarea {
  position: relative;
  z-index: 2;
  min-height: 116px;
  max-height: 220px;
  padding: 12px 13px;
  resize: vertical;
  cursor: text;
  pointer-events: auto !important;
  touch-action: manipulation;
  -webkit-user-select: text;
  user-select: text;
  -webkit-appearance: none;
  appearance: none;
}

.bm-support select:focus,
.bm-support textarea:focus {
  border-color: var(--bm-support-primary);
  box-shadow: 0 0 0 3px rgba(3, 169, 244, 0.12);
}

.bm-support select.is-invalid,
.bm-support textarea.is-invalid {
  border-color: #e5484d;
}

.bm-support__field-meta {
  min-height: 18px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.bm-support__field-meta > span {
  margin-left: auto;
  color: var(--bm-support-muted);
  font-size: 11px;
}

.bm-support__error {
  min-height: 0;
  margin: 0;
  color: #d92d20;
  font-size: 11px;
  line-height: 1.4;
}

.bm-support__send {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 11px 18px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: var(--bm-support-whatsapp);
  box-shadow: 0 8px 20px rgba(37, 211, 102, 0.23);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  transition: filter 0.18s ease, transform 0.18s ease;
}

.bm-support__send:hover {
  filter: brightness(0.94);
  transform: translateY(-1px);
}

.bm-support__send svg {
  width: 21px;
  height: 21px;
}

@media (max-width: 575.98px) {
  .bm-support {
    right: 12px;
    bottom: 12px;
  }

  .bm-support__launcher {
    width: 56px;
    height: 56px;
  }

  .bm-support__panel {
    position: fixed;
    right: 12px;
    bottom: 80px;
    left: 12px;
    width: auto;
    max-height: calc(100dvh - 96px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .bm-support__header {
    min-height: 78px;
    padding: 14px 16px;
  }

  .bm-support__form {
    gap: 14px;
    padding: 16px;
  }

  .bm-support textarea {
    min-height: 104px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bm-support__panel,
  .bm-support__launcher,
  .bm-support__send {
    transition: none;
  }
}
