.pix-widget {
  position: relative;
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
  min-width: 0;
  max-width: 100%;
  margin-inline-start: 10px;
  align-self: center;
  z-index: 30;
  overflow: visible;
  font-family: "Poppins", Georgia, sans-serif;
  color: #3f352c;
}

.pix-widget.is-open {
  flex: 0 1 auto;
  width: min(300px, 100%);
  height: auto;
  align-self: flex-start;
}

@media (min-width: 1101px) {
  .header:has(.pix-widget.is-open) {
    align-items: flex-start;
  }
}

body > .pix-widget {
  position: fixed;
  top: 12px;
  right: 12px;
  margin-inline-start: 0;
  z-index: 9000;
}

.pix-panel {
  position: relative;
  z-index: 2;
  margin-bottom: 8px;
  padding: 12px;
  border-radius: 18px;
  background: #fffaf3;
  border: 1px solid rgba(201, 168, 106, 0.55);
  box-shadow: 0 12px 32px rgba(63, 53, 44, 0.16);
}

.pix-panel[hidden] {
  display: none;
}

.pix-panel-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.pix-hello {
  margin: 0;
  font-size: 14px;
  line-height: 1.35;
}

.pix-close,
.pix-send,
.pix-mic,
.pix-voice-opt {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.pix-close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 18px;
  line-height: 1;
}

.pix-close:hover,
.pix-close:focus-visible {
  outline: 2px solid rgba(180, 139, 67, 0.45);
}

.pix-reply {
  min-height: 1.3em;
  margin: 10px 0;
  font-size: 14px;
  line-height: 1.4;
}

.pix-form {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.pix-form input {
  flex: 1 1 100%;
  min-width: 0;
  border: 1px solid rgba(201, 168, 106, 0.8);
  border-radius: 12px;
  padding: 8px 10px;
  font: inherit;
  font-size: 14px;
  background: #fff;
}

.pix-send,
.pix-mic {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: #c9a86a;
  font-size: 16px;
}

.pix-mic.is-listening {
  background: #c45c4a;
  color: #fff;
}

.pix-voice {
  display: flex;
  flex: 0 0 auto;
  height: 36px;
  border: 1px solid rgba(201, 168, 106, 0.8);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.pix-voice-opt {
  min-width: 26px;
  padding: 0 5px;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
}

.pix-voice-opt + .pix-voice-opt {
  border-left: 1px solid rgba(201, 168, 106, 0.45);
}

.pix-voice-opt.is-on {
  background: #c9a86a;
  color: #fff;
}

.pix-bubble {
  position: absolute;
  z-index: 4;
  inset-inline-end: 0;
  bottom: calc(100% + 10px);
  width: max-content;
  max-width: min(220px, calc(100vw - 96px));
  margin: 0;
  padding: 8px 10px;
  border: 2px solid #3f352c;
  border-radius: 16px;
  background: #fffef8;
  box-shadow: 3px 3px 0 #3f352c;
  color: #3f352c;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.pix-bubble[hidden] {
  display: none;
}

.pix-bubble::after {
  content: "";
  position: absolute;
  inset-inline-end: 16px;
  bottom: -7px;
  width: 12px;
  height: 12px;
  background: #fffef8;
  border-right: 2px solid #3f352c;
  border-bottom: 2px solid #3f352c;
  transform: rotate(45deg);
}

.pix-widget.is-open .pix-bubble {
  display: none;
}

.pix-launcher {
  position: relative;
  z-index: 1;
  width: 64px;
  height: 64px;
  margin-inline-start: auto;
  margin-inline-end: 0;
  padding: 0;
  background: transparent;
  border: 0;
  overflow: visible;
  cursor: pointer;
  transition: width .4s ease, height .4s ease;
}

.pix-widget.is-open .pix-launcher {
  width: 240px;
  height: 240px;
  cursor: grab;
}

.pix-launcher model-viewer {
  width: 100%;
  height: 100%;
  display: block;
  position: absolute;
  inset: 0;
  background: transparent;
  opacity: 1;
  filter: none;
  backdrop-filter: none;
  --poster-color: transparent;
}

html[dir="rtl"] body > .pix-widget {
  right: auto;
  left: 12px;
}

@media (max-width: 1100px) {
  .header .pix-widget {
    align-self: flex-end;
    margin-top: 6px;
    margin-inline-start: 0;
  }

  .pix-widget.is-open {
    width: min(300px, 100%);
  }

  .pix-bubble {
    top: 50%;
    bottom: auto;
    inset-inline-end: calc(100% + 8px);
    transform: translateY(-50%);
  }

  .pix-bubble::after {
    top: 50%;
    bottom: auto;
    inset-inline-end: -7px;
    transform: translateY(-50%) rotate(-45deg);
  }
}
