.bsc-chatbot {
  --bsc-ink: #23142f;
  --bsc-muted: #776f82;
  --bsc-brand: #7b1e6d;
  --bsc-brand-2: #ef4f87;
  --bsc-green: #23c36b;
  --bsc-bg: #fff7fb;
  --bsc-line: rgba(35, 20, 47, .12);
  --bsc-shadow: 0 26px 80px rgba(35, 20, 47, .24);
  color: var(--bsc-ink);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 999999;
  pointer-events: auto;
}

.bsc-launcher {
  align-items: center;
  background: linear-gradient(135deg, var(--bsc-brand), var(--bsc-brand-2));
  border: 0;
  border-radius: 999px;
  box-shadow: 0 18px 38px rgba(123, 30, 109, .34);
  color: #fff;
  cursor: pointer;
  display: flex;
  height: 62px;
  justify-content: center;
  position: relative;
  z-index: 1000001;
  pointer-events: auto;
  transition: transform .2s ease, box-shadow .2s ease;
  width: 62px;
}

.bsc-launcher:hover,
.bsc-launcher:focus-visible {
  box-shadow: 0 22px 44px rgba(123, 30, 109, .42);
  outline: 0;
  transform: translateY(-2px);
}

.bsc-launcher__icon {
  align-items: center;
  border: 2px solid rgba(255,255,255,.72);
  border-radius: 18px;
  display: flex;
  font-weight: 800;
  height: 34px;
  justify-content: center;
  letter-spacing: -.04em;
  width: 34px;
}

.bsc-launcher__badge {
  align-items: center;
  background: var(--bsc-green);
  border: 2px solid #fff;
  border-radius: 50%;
  display: flex;
  font-size: 12px;
  font-weight: 800;
  height: 22px;
  justify-content: center;
  position: absolute;
  right: -2px;
  top: -4px;
  width: 22px;
}

.bsc-window {
  background:
    radial-gradient(circle at 18% 0%, rgba(239, 79, 135, .18), transparent 28%),
    linear-gradient(180deg, #fff, var(--bsc-bg));
  border: 1px solid rgba(255,255,255,.82);
  border-radius: 28px;
  bottom: 78px;
  box-shadow: var(--bsc-shadow);
  display: flex;
  flex-direction: column;
  height: min(620px, calc(100vh - 120px));
  overflow: hidden;
  position: absolute;
  right: 0;
  width: min(390px, calc(100vw - 28px));
  z-index: 1000000;
}

.bsc-window[hidden] {
  display: none;
}

.bsc-header {
  align-items: center;
  background: linear-gradient(135deg, var(--bsc-brand), var(--bsc-brand-2));
  color: #fff;
  display: flex;
  justify-content: space-between;
  padding: 18px 20px;
}

.bsc-title {
  display: block;
  font-size: 17px;
  line-height: 1.2;
}

.bsc-status {
  color: rgba(255,255,255,.78);
  display: block;
  font-size: 12px;
  margin-top: 3px;
}

.bsc-close {
  align-items: center;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  display: flex;
  font-size: 22px;
  height: 34px;
  justify-content: center;
  line-height: 1;
  width: 34px;
}

.bsc-messages {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  padding: 18px 16px 12px;
  scroll-behavior: smooth;
}

.bsc-message {
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.42;
  max-width: 84%;
  padding: 11px 13px;
  word-break: break-word;
}

.bsc-message--bot {
  align-self: flex-start;
  background: #fff;
  border: 1px solid var(--bsc-line);
  border-bottom-left-radius: 6px;
}

.bsc-message--user {
  align-self: flex-end;
  background: #dcffe9;
  border-bottom-right-radius: 6px;
}

.bsc-typing {
  display: flex;
  gap: 4px;
  padding: 13px;
}

.bsc-typing span {
  animation: bsc-bounce 1s infinite ease-in-out;
  background: var(--bsc-muted);
  border-radius: 50%;
  display: block;
  height: 6px;
  opacity: .5;
  width: 6px;
}

.bsc-typing span:nth-child(2) { animation-delay: .12s; }
.bsc-typing span:nth-child(3) { animation-delay: .24s; }

.bsc-actions {
  background: rgba(255,255,255,.8);
  border-top: 1px solid var(--bsc-line);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px;
}

.bsc-chip,
.bsc-submit {
  background: #fff;
  border: 1px solid rgba(123, 30, 109, .22);
  border-radius: 999px;
  color: var(--bsc-brand);
  cursor: pointer;
  font-size: 13px;
  font-weight: 750;
  padding: 10px 13px;
  text-decoration: none;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}

.bsc-chip:hover,
.bsc-chip:focus-visible,
.bsc-submit:hover,
.bsc-submit:focus-visible {
  background: var(--bsc-brand);
  color: #fff;
  outline: 0;
  transform: translateY(-1px);
}

.bsc-chip.is-locked {
  border-style: dashed;
  color: #8a6f83;
}

.bsc-chip--whatsapp {
  background: #19b55f;
  border-color: #19b55f;
  color: #fff;
}

.bsc-form,
.bsc-step-form,
.bsc-step-actions {
  display: grid;
  gap: 7px;
  width: 100%;
}

.bsc-step-form {
  grid-template-columns: 1fr auto auto;
  align-items: start;
}

.bsc-step-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.bsc-form label {
  color: var(--bsc-muted);
  display: grid;
  font-size: 12px;
  font-weight: 700;
  gap: 5px;
  width: 100%;
}

.bsc-form input,
.bsc-form select,
.bsc-step-form input {
  background: #fff;
  border: 1px solid var(--bsc-line);
  border-radius: 12px;
  color: var(--bsc-ink);
  font: inherit;
  min-height: 36px;
  padding: 7px 10px;
  width: 100%;
}

.bsc-form--demo {
  grid-template-columns: 1fr 1fr;
}

.bsc-form--demo .bsc-consent,
.bsc-form--demo .bsc-error,
.bsc-form--demo .bsc-submit {
  grid-column: 1 / -1;
}

.bsc-form input:focus,
.bsc-form select:focus,
.bsc-step-form input:focus {
  border-color: var(--bsc-brand-2);
  box-shadow: 0 0 0 3px rgba(239, 79, 135, .16);
  outline: 0;
}

.bsc-consent {
  align-items: flex-start;
  color: var(--bsc-ink) !important;
  display: flex !important;
  flex-direction: row !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  gap: 8px !important;
}

.bsc-consent input {
  min-height: auto;
  width: auto;
}

.bsc-consent a {
  color: var(--bsc-brand);
}

.bsc-submit {
  background: linear-gradient(135deg, var(--bsc-brand), var(--bsc-brand-2));
  color: #fff;
  justify-self: start;
}

.bsc-submit:disabled {
  cursor: progress;
  opacity: .72;
}

.bsc-error {
  color: #b42318;
  font-size: 12px;
  font-weight: 700;
  grid-column: 1 / -1;
}

.bsc-privacy-link {
  color: var(--bsc-brand);
  font-size: 12px;
  font-weight: 700;
  padding: 10px 4px;
}

.bsc-hp {
  left: -9999px;
  position: absolute;
}

@keyframes bsc-bounce {
  0%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-4px); }
}

@media (max-width: 767px) {
  .bsc-chatbot {
    bottom: 16px;
    right: 14px;
  }

  .bsc-window {
    border-radius: 24px 24px 0 0;
    bottom: -16px;
    height: min(82vh, 680px);
    right: -14px;
    width: 100vw;
  }

  .bsc-launcher {
    height: 58px;
    width: 58px;
  }

  .bsc-message {
    max-width: 90%;
  }

  .bsc-form--demo {
    grid-template-columns: 1fr;
  }

  .bsc-step-form {
    grid-template-columns: 1fr;
  }
}
