.onestich-chatbot {
  position: fixed;
  right: 18px;
  bottom: 94px;
  z-index: 9998;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.onestich-chatbot-toggle {
  width: 184px;
  min-height: 76px;
  border: 2px solid #8b5613;
  border-radius: 999px;
  background: linear-gradient(135deg, #fff8ee 0%, #e0b47b 100%);
  color: #080604;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 9px 16px 9px 10px;
  cursor: pointer;
  box-shadow:
    0 18px 42px rgba(0, 0, 0, .42),
    0 0 0 5px rgba(255, 255, 255, .92),
    0 0 0 7px rgba(139, 86, 19, .24);
  position: relative;
  overflow: visible;
  transition: transform .18s ease, box-shadow .18s ease;
}

.onestich-chatbot-toggle:hover,
.onestich-chatbot-toggle:focus-visible {
  transform: translateY(-2px) scale(1.02);
  box-shadow:
    0 24px 54px rgba(0, 0, 0, .48),
    0 0 0 5px rgba(255, 255, 255, 1),
    0 0 0 8px rgba(139, 86, 19, .36);
  outline: none;
}

.onestich-chatbot-toggle::after {
  content: "";
  position: absolute;
  right: 10px;
  bottom: -7px;
  width: 16px;
  height: 16px;
  background: #e0b47b;
  border-right: 2px solid #8b5613;
  border-bottom: 2px solid #8b5613;
  transform: rotate(45deg);
  border-bottom-right-radius: 4px;
}

.onestich-chatbot-toggle-icon {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(8, 6, 4, .2);
  border-radius: 999px;
  background: #090807;
  box-shadow: inset 0 0 0 2px rgba(217, 176, 140, .18);
}

.onestich-chatbot-toggle-icon img {
  position: absolute;
  left: 50%;
  top: 100%;
  width: 178px;
  height: 178px;
  max-width: none;
  object-fit: contain;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.onestich-chatbot-toggle-label {
  display: grid;
  justify-items: start;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: .95;
  color: #080604;
  text-align: left;
}

.onestich-chatbot-toggle-label strong,
.onestich-chatbot-toggle-label em {
  display: block;
  font-style: normal;
  white-space: nowrap;
}

.onestich-chatbot-toggle-label em {
  color: #5b350c;
  font-size: 21px;
}

.onestich-chatbot-window {
  position: absolute;
  right: 0;
  bottom: 74px;
  width: min(380px, calc(100vw - 28px));
  max-height: min(620px, calc(100vh - 110px));
  display: grid;
  grid-template-rows: auto 1fr auto;
  border: 1px solid rgba(8, 6, 4, .16);
  background: #ffffff !important;
  background-color: #ffffff !important;
  color: #080604 !important;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .42);
  overflow: hidden;
  opacity: 1 !important;
  isolation: isolate;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

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

.onestich-chatbot-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid rgba(8, 6, 4, .12);
  background: #ffffff !important;
  background-color: #ffffff !important;
}

.onestich-chatbot-title {
  display: grid;
  gap: 2px;
}

.onestich-chatbot-title strong {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 24px;
  font-weight: 500;
  line-height: 1;
}

.onestich-chatbot-title span {
  color: rgba(8, 6, 4, .72);
  font-size: 12px;
}

.onestich-chatbot-close {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(8, 6, 4, .18);
  border-radius: 999px;
  background: transparent;
  color: #080604;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.onestich-chatbot-messages {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 260px;
  overflow: auto;
  padding: 16px;
  background: #ffffff !important;
  background-color: #ffffff !important;
}

.onestich-chatbot-message {
  max-width: 88%;
  border: 1px solid rgba(8, 6, 4, .14);
  color: #080604 !important;
  padding: 11px 12px;
  line-height: 1.45;
  font-size: 14px;
  white-space: pre-wrap;
  opacity: 1 !important;
}

.onestich-chatbot-message a {
  color: #8a5a24;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.onestich-chatbot-message.is-bot {
  justify-self: start;
  background: #f6f1ea !important;
  background-color: #f6f1ea !important;
}

.onestich-chatbot-message.is-user {
  justify-self: end;
  background: #eadbc4 !important;
  background-color: #eadbc4 !important;
  border-color: rgba(188, 143, 87, .42);
}

.onestich-chatbot-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 16px 12px;
  background: #ffffff !important;
  background-color: #ffffff !important;
}

.onestich-chatbot-quick button {
  border: 1px solid rgba(8, 6, 4, .18);
  background: #ffffff;
  color: #080604;
  padding: 7px 9px;
  cursor: pointer;
  font-size: 12px;
}

.onestich-chatbot-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid rgba(8, 6, 4, .12);
  background: #ffffff !important;
  background-color: #ffffff !important;
}

.onestich-chatbot-form textarea {
  min-height: 46px;
  max-height: 110px;
  resize: vertical;
  border: 1px solid rgba(8, 6, 4, .18);
  background: #ffffff;
  color: #080604;
  padding: 12px;
  font: inherit;
  font-size: 14px;
}

.onestich-chatbot-form textarea:focus {
  outline: 2px solid #d9b08c;
  outline-offset: 1px;
}

.onestich-chatbot-form button {
  min-width: 46px;
  border: 1px solid #d9b08c;
  background: #d9b08c;
  color: #080604;
  cursor: pointer;
  font-weight: 700;
}

.onestich-chatbot-disclaimer {
  grid-column: 1 / -1;
  margin: 0;
  color: rgba(8, 6, 4, .68);
  font-size: 11px;
  line-height: 1.35;
}

@media (max-width: 520px) {
  .onestich-chatbot {
    right: 10px;
    bottom: 18px;
  }

  .onestich-chatbot-toggle {
    width: 154px;
    min-height: 62px;
    padding: 7px 12px 7px 7px;
  }

  .onestich-chatbot-toggle-icon {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
  }

  .onestich-chatbot-toggle-icon img {
    width: 148px;
    height: 148px;
  }

  .onestich-chatbot-toggle-label {
    font-size: 16px;
  }

  .onestich-chatbot-toggle-label em {
    font-size: 18px;
  }

  .onestich-chatbot-window {
    right: -2px;
    bottom: 66px;
    width: calc(100vw - 24px);
    max-height: calc(100vh - 96px);
  }
}
