@import url("base.css?v=2");
@import url("prompt.css?v=13");

html,
body {
  margin: 0;
  min-height: 100%;
  background: #050505;
}

.chat-page-body {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 18px;
  color: #fff;
  overflow-x: hidden;
  overflow-y: auto;
  background:
    radial-gradient(circle at top, rgba(155, 194, 255, 0.08), transparent 28%),
    #050505;
}

.chat-page-shell {
  width: min(100%, 960px);
  min-height: min(88dvh, 920px);
  display: grid;
}

.chat-overlay--page {
  position: relative;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto auto;
  left: auto;
  right: auto;
  bottom: auto;
  height: min(88dvh, 920px);
  min-height: min(88dvh, 920px);
  width: 100%;
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.chat-page-subtitle {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
  line-height: 1.4;
}

.chat-page-intents {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  padding: 8px 14px 10px;
}

.chat-page-intent {
  max-width: min(100%, 260px);
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font: inherit;
  line-height: 1.25;
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease, transform 140ms ease;
}


.chat-page-intent:hover,
.chat-page-intent:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
  outline: none;
}

.chat-page-status {
  min-height: 20px;
  padding: 0 14px 14px;
  color: rgba(255, 255, 255, 0.64);
  font-size: 12px;
}

.chat-page-status.is-error {
  color: #ffb0b0;
}

.chat-page-status.is-ok {
  color: #97f1b5;
}

.chat-overlay--page .chat-overlay__messages {
  grid-row: 3;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

@media (max-width: 768px) {
  .chat-overlay--page .chat-overlay__messages {
    overscroll-behavior-x: contain;
    overscroll-behavior-y: auto;
  }
}

.chat-overlay--page .chat-overlay__composer {
  grid-row: 4;
  align-items: flex-end;
  padding: 10px 12px 10px 14px;
  border-radius: 22px;
  overflow: hidden;
}

.chat-overlay--page .chat-page-status {
  grid-row: 5;
}

.chat-overlay--page .chat-overlay__composer textarea {
  flex: 1;
  min-width: 0;
  min-height: 36px;
  height: 36px;
  max-height: calc(5 * 1.4em + 12px);
  padding: 8px 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-sizing: border-box;
  color: #fff;
  font: inherit;
  line-height: 1.4;
  resize: none;
  outline: none;
  overflow-x: hidden;
  overflow-y: hidden;
  overscroll-behavior: contain;
  box-shadow: none;
  -webkit-appearance: none;
}

.chat-overlay--page .chat-overlay__composer textarea::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.chat-page-stamp {
  margin-top: 6px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

.chat-overlay--page .chat-overlay__composer button:not(.chat-mic-btn) {
  font-size: 0;
  line-height: 1;
}

.chat-overlay--page .chat-overlay__composer button:not(.chat-mic-btn)::before {
  content: "";
  display: block;
  width: 16px;
  height: 16px;
  margin: auto;
  background: center / contain no-repeat url("../img/chat-send.svg");
}

@supports (-webkit-touch-callout: none) {
  .chat-overlay--page .chat-overlay__composer textarea {
    font-size: 16px;
  }
}

@media (max-width: 768px) {
  html,
  body {
    height: auto;
    min-height: 100%;
  }

  .chat-page-body {
    padding: 10px;
    display: block;
    min-height: 100dvh;
  }

  .chat-page-shell {
    width: 100%;
    min-height: calc(100dvh - 20px);
  }

  .chat-overlay--page {
    height: calc(100dvh - 20px);
    min-height: calc(100dvh - 20px);
    border-radius: 18px;
  }

  .chat-overlay--page .chat-overlay__composer {
    padding: 9px 10px 9px 12px;
    border-radius: 20px;
  }

  .chat-overlay--page .chat-overlay__composer textarea {
    min-height: 34px;
    height: 34px;
    max-height: calc(5 * 1.4em + 10px);
    padding: 7px 0;
  }
}
