.sendero-chatbot {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 80;
  font-family: "Playfair Display", Georgia, serif;
}

.sendero-chatbot,
.sendero-chatbot * {
  box-sizing: border-box;
}

.sendero-chatbot__launcher {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 18px;
  border: 1px solid rgba(131, 86, 43, .22);
  border-radius: 999px;
  color: #fffaf0;
  background: linear-gradient(180deg, #c99343, #9f6427);
  box-shadow: 0 18px 42px rgba(62, 42, 24, .22), inset 0 1px 0 rgba(255, 255, 255, .38);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: .01em;
  cursor: pointer;
}

.sendero-chatbot__spark {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #fff3bd;
  box-shadow: 0 0 0 5px rgba(255, 243, 189, .22), 0 0 18px rgba(255, 243, 189, .85);
}

.sendero-chatbot__panel {
  position: absolute;
  right: 0;
  bottom: 66px;
  display: grid;
  grid-template-rows: auto auto minmax(160px, 1fr) auto auto auto;
  width: min(390px, calc(100vw - 28px));
  max-height: min(690px, calc(100svh - 104px));
  overflow: hidden;
  border: 1px solid rgba(109, 77, 43, .18);
  border-radius: 20px;
  background: rgba(255, 251, 243, .96);
  box-shadow: 0 26px 70px rgba(48, 34, 20, .24);
  backdrop-filter: blur(12px);
}

.sendero-chatbot__panel[hidden] {
  display: none;
}

.sendero-chatbot__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 18px 14px;
  color: #fffaf0;
  background:
    linear-gradient(135deg, rgba(90, 57, 38, .95), rgba(135, 92, 50, .92)),
    radial-gradient(circle at 20% 0, rgba(255, 224, 151, .28), transparent 40%);
}

.sendero-chatbot__header p,
.sendero-chatbot__header h2 {
  margin: 0;
}

.sendero-chatbot__header p {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .11em;
  text-transform: uppercase;
  opacity: .78;
  font-family: Inter, system-ui, sans-serif;
}

.sendero-chatbot__header h2 {
  margin-top: 4px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 24px;
  line-height: 1.1;
}

.sendero-chatbot__close {
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 250, 240, .35);
  border-radius: 999px;
  color: #fffaf0;
  background: rgba(255, 255, 255, .12);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.sendero-chatbot__messages {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  padding: 16px;
  overflow-y: auto;
}

.sendero-chatbot__messages[hidden],
.sendero-chatbot__pinned[hidden],
.sendero-chatbot__options[hidden],
.sendero-chatbot__input[hidden],
.sendero-chatbot__restart[hidden] {
  display: none;
}

.sendero-chatbot__start {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 0;
  padding: 18px 16px 16px;
  overflow-y: auto;
}

.sendero-chatbot__start[hidden] {
  display: none;
}

.sendero-chatbot__start p,
.sendero-chatbot__start h3 {
  margin: 0;
}

.sendero-chatbot__start p:first-child {
  color: #8b643d;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-family: Inter, system-ui, sans-serif;
}

.sendero-chatbot__start h3 {
  color: #5a3727;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 28px;
  line-height: 1.12;
}

.sendero-chatbot__start p:not(:first-child) {
  color: #435044;
  font-size: 14px;
  line-height: 1.58;
}

.sendero-chatbot__start label {
  display: grid;
  gap: 6px;
  color: #4c3a2e;
  font-size: 12px;
  font-weight: 700;
  font-family: Inter, system-ui, sans-serif;
}

.sendero-chatbot__start input {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(128, 86, 47, .22);
  border-radius: 12px;
  color: #29332e;
  background: #fffdf8;
  font-family: Inter, system-ui, sans-serif;
  font-size: 14px;
}

.sendero-chatbot__start button {
  min-height: 40px;
  border: 0;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 750;
  cursor: pointer;
}

.sendero-chatbot__start button[type="submit"] {
  color: #fffaf0;
  background: #a96e2d;
}

.sendero-chatbot__start button[type="button"] {
  color: #5a3d2c;
  background: rgba(255, 255, 255, .82);
  border: 1px solid rgba(128, 86, 47, .16);
}

.sendero-chatbot__message,
.sendero-chatbot__card {
  max-width: 92%;
  padding: 12px 14px;
  border-radius: 16px;
  font-size: 15px;
  line-height: 1.55;
}

.sendero-chatbot__message--bot,
.sendero-chatbot__card {
  align-self: flex-start;
  color: #334036;
  background: #fff;
  border: 1px solid rgba(128, 86, 47, .14);
}

.sendero-chatbot__message--user {
  align-self: flex-end;
  color: #fffaf0;
  background: #6b4a34;
}

.sendero-chatbot__message p {
  margin: 0;
}

.sendero-chatbot__message p + p {
  margin-top: 8px;
}

.sendero-chatbot__message strong {
  color: #5a3727;
  font-weight: 800;
}

.sendero-chatbot__bullet::before {
  content: "- ";
}

.sendero-chatbot__pinned {
  margin: 0;
  padding: 9px 18px;
  border-top: 1px solid rgba(128, 86, 47, .12);
  border-bottom: 1px solid rgba(128, 86, 47, .12);
  color: #6a594c;
  background: rgba(255, 250, 240, .86);
  font-size: 11px;
  line-height: 1.35;
  text-align: center;
}

.sendero-chatbot__typing {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  align-self: flex-start;
  max-width: 92%;
  padding: 10px 13px;
  border: 1px solid rgba(128, 86, 47, .14);
  border-radius: 16px;
  color: #5d4a3c;
  background: #fff;
  font-size: 13px;
  line-height: 1.2;
}

.sendero-chatbot__typing i {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: #b77731;
  opacity: .35;
  animation: senderoTyping 1.05s infinite ease-in-out;
}

.sendero-chatbot__typing i:nth-child(3) {
  animation-delay: .16s;
}

.sendero-chatbot__typing i:nth-child(4) {
  animation-delay: .32s;
}

@keyframes senderoTyping {
  0%,
  80%,
  100% {
    transform: translateY(0);
    opacity: .35;
  }

  40% {
    transform: translateY(-3px);
    opacity: 1;
  }
}

.sendero-chatbot__card h3,
.sendero-chatbot__card p {
  margin: 0;
}

.sendero-chatbot__card h3 {
  color: #5a3727;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 20px;
  line-height: 1.18;
}

.sendero-chatbot__card p {
  margin-top: 8px;
}

.sendero-chatbot__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.sendero-chatbot__link,
.sendero-chatbot__lead button,
.sendero-chatbot__input button,
.sendero-chatbot__restart {
  border: 0;
  border-radius: 999px;
  color: #fffaf0;
  background: #a96e2d;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.sendero-chatbot__link {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 13px;
}

.sendero-chatbot__options {
  display: flex;
  gap: 8px;
  padding: 0 16px 12px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.sendero-chatbot__option {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(128, 86, 47, .18);
  border-radius: 999px;
  color: #4d392d;
  background: rgba(255, 255, 255, .82);
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}

.sendero-chatbot__option:disabled,
.sendero-chatbot__input button:disabled {
  cursor: wait;
  opacity: .55;
}

.sendero-chatbot__lead {
  display: grid;
  gap: 10px;
  padding: 0 16px 14px;
}

.sendero-chatbot__lead[hidden] {
  display: none;
}

.sendero-chatbot__lead label {
  display: grid;
  gap: 6px;
  color: #4c3a2e;
  font-size: 12px;
  font-weight: 700;
  font-family: Inter, system-ui, sans-serif;
}

.sendero-chatbot__lead input,
.sendero-chatbot__input input {
  width: 100%;
  min-height: 40px;
  border: 1px solid rgba(128, 86, 47, .22);
  border-radius: 12px;
  color: #29332e;
  background: #fffdf8;
  font-family: Inter, system-ui, sans-serif;
  font-size: 14px;
}

.sendero-chatbot__lead input {
  padding: 0 12px;
}

.sendero-chatbot__consent {
  grid-template-columns: 18px 1fr;
  align-items: start;
  font-weight: 500 !important;
  line-height: 1.45;
}

.sendero-chatbot__consent input {
  min-height: 18px;
  height: 18px;
  margin: 2px 0 0;
}

.sendero-chatbot__lead button {
  min-height: 40px;
  padding: 0 14px;
}

.sendero-chatbot__input {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 0 16px 12px;
}

.sendero-chatbot__input input {
  padding: 0 12px;
}

.sendero-chatbot__input button {
  min-width: 72px;
  min-height: 40px;
  padding: 0 14px;
}

.sendero-chatbot__restart {
  margin: 0 16px 16px;
  min-height: 34px;
  color: #5a3d2c;
  background: rgba(255, 255, 255, .78);
  border: 1px solid rgba(128, 86, 47, .16);
}

@media (max-width: 640px) {
  .sendero-chatbot {
    right: 14px;
    bottom: 14px;
  }

  .sendero-chatbot__launcher {
    min-height: 40px;
    padding: 0 12px;
    font-size: 12px;
  }

  .sendero-chatbot__spark {
    width: 10px;
    height: 10px;
    box-shadow: 0 0 0 4px rgba(255, 243, 189, .20), 0 0 14px rgba(255, 243, 189, .76);
  }

  .sendero-chatbot__panel {
    position: fixed;
    inset: auto 10px 72px 10px;
    width: auto;
    max-height: calc(100svh - 92px);
    border-radius: 18px;
  }

  .sendero-chatbot__header {
    padding: 16px;
  }

  .sendero-chatbot__header h2 {
    font-size: 22px;
  }

  .sendero-chatbot__message,
  .sendero-chatbot__card {
    max-width: 100%;
    font-size: 13px;
  }

  .sendero-chatbot__input {
    grid-template-columns: 1fr;
  }

  .sendero-chatbot__input button {
    width: 100%;
  }
}
