.guided-chat-root {
  --guided-ink: #27312e;
  --guided-muted: #66716b;
  position: fixed;
  z-index: 20;
  left: 50%;
  bottom: max(8px, env(safe-area-inset-bottom));
  width: min(360px, calc(100vw - 24px));
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 7px;
  padding: 0;
  background: transparent !important;
  color: var(--guided-ink);
  pointer-events: none;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-tap-highlight-color: transparent;
}

.guided-chat-root[hidden] {
  display: none !important;
}

.guided-chat-root *,
.guided-chat-root *::before,
.guided-chat-root *::after {
  box-sizing: border-box;
}

.guided-chat-reply {
  position: relative;
  align-self: center;
  width: fit-content;
  max-width: 100%;
  max-height: 100px;
  overflow: auto;
  padding: 2px 28px 5px 4px;
  color: #fffdf7;
  font-size: 14px;
  line-height: 1.45;
  text-shadow: 0 1px 3px rgba(10, 18, 14, .95), 0 0 8px rgba(10, 18, 14, .8);
  overscroll-behavior: contain;
  pointer-events: auto;
}

.guided-chat-reply[hidden],
.guided-chat-status[hidden],
.guided-chat-retry[hidden] {
  display: none;
}

.guided-chat-reply-text {
  max-height: 92px;
  overflow: auto;
  overflow-x: hidden;
  overflow-wrap: anywhere;
  scrollbar-width: thin;
}

.guided-chat-dismiss {
  position: absolute;
  top: 0;
  right: 0;
  width: 25px;
  height: 25px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #fffdf7;
  font: inherit;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.guided-chat-dismiss svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.guided-chat-form {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 36px;
  padding: 2px 3px 2px 12px;
  border: 1px solid rgba(58, 72, 64, .16);
  border-radius: 999px;
  background: #f7f7f2;
  box-shadow: 0 5px 20px rgba(15, 22, 18, .2);
  pointer-events: auto;
}

.guided-chat-input {
  display: block;
  min-width: 0;
  flex: 1 1 auto;
  height: 30px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #27312e;
  font-family: inherit;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.3;
  text-overflow: ellipsis;
}

.guided-chat-input::placeholder {
  color: #777c79;
  opacity: 1;
}

.guided-chat-development {
  flex: 0 0 auto;
  color: #60764c;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
}

.guided-chat-input:focus-visible {
  outline: 2px solid #60796b;
  outline-offset: 3px;
  border-radius: 4px;
}

.guided-chat-input:disabled {
  opacity: .72;
}

.guided-chat-send {
  display: grid;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #344d41;
  color: #fffdf7;
  cursor: pointer;
  transition: transform 140ms ease, opacity 140ms ease;
}

.guided-chat-send:hover:not(:disabled) {
  transform: translateY(-1px);
}

.guided-chat-send:focus-visible,
.guided-chat-dismiss:focus-visible,
.guided-chat-retry:focus-visible {
  outline: 2px solid #91a998;
  outline-offset: 2px;
}

.guided-chat-send:disabled {
  opacity: .5;
  cursor: wait;
}

.guided-chat-send svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.guided-chat-retry-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 0;
  color: #fffdf7;
  font-size: 12px;
  line-height: 1.35;
  text-shadow: 0 1px 4px rgba(10, 18, 14, .95);
  pointer-events: none;
}

.guided-chat-status {
  max-width: 100%;
  text-align: center;
}

.guided-chat-retry {
  padding: 2px 9px;
  border: 1px solid rgba(255, 253, 247, .65);
  border-radius: 999px;
  background: rgba(34, 48, 40, .8);
  color: #fffdf7;
  font: inherit;
  text-shadow: none;
  cursor: pointer;
  pointer-events: auto;
}

.guided-chat-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 900px) {
  .guided-chat-form {
    padding-left: 10px;
    gap: 5px;
  }

  .guided-chat-reply {
    align-self: flex-start;
    width: min(360px, calc(100vw - 24px));
    max-width: none;
  }

  .guided-chat-input {
    font-size: 16px;
  }
}

@media (max-width: 760px) {
  .guided-chat-reply {
    margin-bottom: 40px;
  }
}

@media (max-height: 500px) {
  .guided-chat-root {
    gap: 4px;
  }

  .guided-chat-reply {
    max-height: 96px;
    font-size: 13px;
  }

  .guided-chat-reply-text {
    max-height: 84px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .guided-chat-send {
    transition: none;
  }
}
