*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  display: flex;
  justify-content: center;
}

body {
  position: relative;
  width: 90rem;
  max-width: 100%;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1.25rem;
  line-height: 1.5;
  padding: 3rem 1rem;
  background-color: var(--chat-secondary-color);
}

button,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

p {
  margin-bottom: 1.5rem;
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.75rem;
}

.skip-link {
  position: absolute;
  display: inline-block;
  padding: .375rem .75rem;
  line-height: 1;
  font-size: 1.25rem;
  background-color: var(--chat-bubble-user-color);
  color: white;
  transform: translateY(0);
  transition: transform 250ms ease-in;
}

.skip-link:not(:focus) {
  transform: translateY(-2rem);
}

.nav {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 2.5rem;
  padding:  1.5rem .25rem;
  background-color: azure;
}

.nav__list {
  display: flex;
  gap: 1rem;
  list-style: none;
}

.main {
  margin-bottom: 2.5rem;
  padding: 1.5rem .25rem;
}

footer {
  text-align: center;
  font-size: 0.8rem;
  color: #444;
}

@media (min-width: 30em) {
  .nav,
  .main {
    padding: 1.5rem 1rem;
  }
}

 :root {
   --chat-primary-color: #e3efba;
   --chat-secondary-color: #f2f2f2;
   --chat-interactive-color: rebeccapurple;
   --chat-dark-color: #1b1b1b;
   --chat-light-color: #fff;
   --chat-destructive-color: #a90606;
   --chat-bubble-user-color: #a90606;
   --chat-bubble-agent-color: #5EA319;
   --chat-inactive-color: #929292;
   --chat-subdued-color: #737373;
}


.no-js .chat__trigger,
.no-js .chat__panel,
.no-js .skip-to-chat {
  display: none !important;
}

.chat__trigger {
  position: fixed;
  bottom: 0;
  right: 0;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: .5rem;
  border: 3px solid var(--chat-bubble-user-color);
  padding: .5rem 4rem .5rem .375rem;
  height: 2.5rem;
  width: 100%;
  color: var(--chat-light-color);
  background-color: var(--chat-bubble-user-color);
  z-index: 10;
}

.chat__badge {
  position: absolute;
  top: -1rem;
  right: .5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 1px solid var(--chat-light-color);
  border-radius: 50%;
  height: 1.75rem;
  width: 1.75rem;
  font-size: .875rem;
  font-weight: bold;
  color: var(--chat-light-color);
  background-color: var(--chat-destructive-color);
}

.chat__trigger::before {
  content: "";
  position: absolute;
  top: .75rem;
  right: 3rem;
  border-top: 3px solid var(--chat-light-color);
  border-left: 3px solid var(--chat-light-color);
  height: 1rem;
  width: 1rem;
  transform: rotate(45deg);
  transition: border-color 300ms ease-in;
}

.chat__trigger:focus-visible {
  color: var(--chat-bubble-user-color);
  background-color: var(--chat-light-color);
  transition: color 300ms ease-in, background-color 300ms ease-in;
}

.chat__trigger:focus-visible::before {
  border-color: var(--chat-bubble-user-color);
}

.chat__trigger:focus-visible path {
  stroke: var(--chat-bubble-user-color);
  fill: var(--chat-bubble-user-color);
}

.chat__trigger-icon path {
  stroke: var(--chat-light-color);
  fill: var(--chat-light-color);
  transition: stroke 300ms ease-in, fill 300ms ease-in;
}

.chat__trigger-label {
  margin-right: 1rem;
}

.chat__trigger-icon {
  display: none;
}

@media (min-width: 40em) {
  .chat__trigger {
    bottom: 1rem;
    right: 1rem;
    flex-direction: column;
    gap: .2rem;
    border-radius: 50%;
    padding: .375rem;
    height: 5rem;
    width: 5rem;
    box-shadow: -1px 1px 5px 4px rgba(46, 44, 48, 0.25);
  }

  .chat__trigger:focus-visible {
    outline: 3px solid var(--chat-bubble-user-color);
    outline-offset: 2px;
  }

  .chat__trigger::before {
    display: none;
  }

  .chat__trigger-label {
    margin-right: 0;
  }

  .chat__trigger-icon {
    display: block;
  }

  .chat__badge {
    top: -.5rem;
    left: 0;
  }
}


/* End of section 3 */


/* section 4 */



.visually-hidden {
  position: absolute;
  height: 1px;
  width: 1px;
  overflow: hidden;
  white-space: nowrap;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
}

.chat__panel {
  position: fixed;
  bottom: 0;
  right: 0;
  height: 100%;
  width: 100%;
  max-width: 22.5rem;
  z-index: 20;
  max-height: 40rem;
  inset-inline-start: unset;
}

.chat__panel[open] {
  display: flex;
  flex-direction: column;
}

.chat__upper {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--chat-dark-color);
  padding: .25rem .5rem;
  background-color: var(--chat-primary-color);
  display: none; /* CUSTOM */
}

.chat__delete-btn,
.chat__close-btn {
  height: 2.25rem;
  width: 2.25rem;
}

.chat__delete-btn {
  display: flex;
  justify-content: center;
  align-items: center;
  border: 2 px solid var(--chat-destructive-color);
  border-radius: 50%;
  background-color: var(--chat-destructive-color);
}

.chat__delete-btn svg,
.chat__delete-btn path {
  fill: var(--chat-light-color);
  stroke: var(--chat-light-color);
  color: var(--chat-light-color);
}

.chat__close-btn {
  position: relative;
  border: 2px solid var(--chat-bubble-user-color);
  border-radius: 4px;
  background-color: var(--chat-light-color);
}

.chat__delete-btn:focus-visible,
.chat__close-btn:focus-visible,
.chat__submit:focus-visible,
.chat__confirm-btn:focus-visible,
.chat__option-btn:focus-visible,
.chat__quick-response-btn:focus-visible,
.chat__thumb-up:focus-visible,
.chat__thumb-down:focus-visible {
  outline: 1px solid var(--chat-bubble-user-color);
  outline-offset: 2px;
  /*background-color: var(--chat-bubble-user-color);*/
}

.chat__delete-btn:focus-visible svg,
.chat__close-btn:focus-visible::before,
.chat__submit:focus-visible svg {
    /*
  stroke: var(--chat-light-color);
  fill: var(--chat-light-color);
  color: var(--chat-light-color);
  border-color: var(--chat-light-color);
  */
}

.chat__delete-btn,
.chat__close-btn,
.chat__submit,
.chat__delete-btn svg,
.chat__close-btn::before,
.chat__submit svg {
  transition: all 300ms ease-in;
}

.chat__delete-btn {
  order: 3;
  padding: .25rem;
}

.chat__delete-btn svg {
  height: 1.25rem;
  width: 1.25rem;
}

.chat__title {
  order: 2;
  margin-bottom: .5rem;
  font-size: 1.875rem;
}

.chat__close-btn {
  order: 1;
}

.chat__close-btn::before {
  content: "";
  position: absolute;
  bottom: .25rem;
  left: .25rem;
  border: 2px solid var(--chat-bubble-user-color);
  width: calc(100% - .5rem);
  height: 6px;
}

.chat__window {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  padding: .75rem;
  height: 90%;
  overflow-y: auto;
}

.chat__delete-btn[aria-expanded="false"] + .chat__confirm-panel {
  display: none;
}

.chat__confirm-panel {
  flex-basis: 100%;
  order: 4;
  border-top: 2px var(--chat-dark-color) solid;
  padding: .75rem .5rem;
  text-align: center;
}

.chat__confirm-btn {
  margin: 0 .25rem;
}

.chat__group {
  display: flex;
  flex-direction: column;
}

.chat__bubbles {
  min-height: 100%;
}

.chat__question,
.chat__response {
  position: relative;
  /*display: inline-flex;*/
  border-radius: 8px;
  padding: .5rem .75rem;
  max-width: 82.5%;
  font-size: 1.25rem;
  margin-left: 100px;
}

.noelcome {
  margin-top:-100px;
}

.chat__question {
  align-self: flex-end;
  border: 1px solid var(--chat-bubble-user-color);
  background-color: var(--chat-bubble-user-color);
  color: var(--chat-light-color);      
}     

.chat__response {
  /*background-color: var(--chat-bubble-user-color);*/
  color: #000; /*var(--chat-light-color);*/
  background: #fff;
  border: 2px solid var(--chat-bubble-user-color);
  margin-bottom: 2rem;
}

.chat__thumbs,
.chat__options,
.chat__option-btn,
.chat__quick-response-btn
.chat__response {
  scroll-margin: 1rem;
}

.chat__question::before,
.chat__response::before {
  content: '';
  position: absolute;
  bottom: 8px;
  margin-top: -6px;
  border: 12px solid transparent;
  border-bottom: 0;
  width: 0;
  height: 0;
}

.chat__question::before {
  right: 0;
  margin-right: -12px;
  border-left-color: var(--chat-bubble-user-color);
  border-right: 0;
}

.chat__response::before {
  left: 0;
  margin-left: -12px;
  border-right-color: var(--chat-bubble-user-color);
  border-left: 0;
}

.chat__time,
.chat__name-assistant,
.chat__name-user {
  margin-top: 1rem;
  display: block;
  font-size: .875rem;
  color: var(--chat-subdued-color);
  margin-left: 10px;
}

.chat__time,
.chat__name-user {
  text-align: right;
}

.chat__name-user {
    display: none; /* CUSTOM */
}

.chat__name-assistant {
  position: relative;
  top: 120px;
}

h2.chat__time {
  text-align: center;
  margin-bottom: 1rem;
}

.chat__window-title {
  display: none;
}

.chat__options {
  display: flex;
  gap:.75rem;
}

.chat__option-btn,
.chat__quick-response-btn,
.chat__confirm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--chat-bubble-user-color);
  border-radius: 6px;
  padding: .25rem .5rem;
  font-size: 1.25rem;
  color: var(--chat-light-color);
  background-color: var(--chat-bubble-user-color);
}

.chat__option-btn {
  flex-grow: 1;
}

.chat__thumbs {
  border: none;
  display: flex;
  gap: .75rem;
}

.chat__thumb-up > svg,
.chat__thumb-down > svg {
  fill: var(--chat-light-color);
  stroke: var(--chat-dark-color);
  stroke-width: 2px;
  pointer-events: none;
}

.chat__thumb-up,
.chat__thumb-down {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  flex-grow: 1;
  margin-bottom: .5rem;
  border: 2px solid var(--chat-bubble-user-color);
  border-radius: 6px;
  padding: .25rem;
  background-color: var(--chat-light-color);
  color: var(--chat-dark-color);
}

.chat__thumb-down > svg {
  transform: rotateZ(180deg);
  margin-top: 2px;
}

.chat__thumb-up > svg {
  margin-bottom: 2px;
}

.chat__thumb-up[aria-pressed="true"] svg,
.chat__thumb-down[aria-pressed="true"] svg {
  fill: var(--chat-bubble-user-color);
}

.chat__gif {
  margin-bottom: .75rem;
}

.chat__typing-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: .5rem;
  border-radius: 8px;
  padding: .75rem;
  width: 3rem;
  height: 2rem;
  font-size: 1.25rem;
  color: var(--chat-light-color);
  background-color: var(--chat-inactive-color);
  border: 3px solid var(--chat-inactive-color);
}

.chat__typing-icon::before {
  content: '';
  position: absolute;
  bottom: 8px;
  left: -24px;
  border: 12px solid transparent;
  border-right-color: grey;
  border-bottom: 0;
  width: 0;
  height: 0;
}

.chat__indicator-circle,
.chat__indicator-circle::before,
.chat__indicator-circle::after {
  content: "";
  width: .375rem;
  height: .375rem;
  border-radius: 50%;
  background-color: var(--chat-light-color);
}

.chat__indicator-circle {
  position: relative;
  animation: pulse 1000ms infinite ease-in-out;
}

.chat__indicator-circle::before {
  position: absolute;
  left: -.75rem;
  animation: pulse 1000ms infinite ease-in-out 250ms;
}

.chat__indicator-circle::after {
  position: absolute;
  right: -.75rem;
  animation: pulse 1000ms infinite ease-in-out 500ms;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(.75);
    opacity: .75;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }

}

.chat__lower {
  /* border-top: 2px solid var(--chat-dark-color);*/
  margin-top: 1rem;
  padding: .25rem .5rem .5rem;
  width: 100%;
  /* background-color: var(--chat-primary-color); */
}

.chat__input-label {
  flex: 2 1 auto;
}

.chat__input-wrapper {
  position: relative;
}

.chat__input {
  border: 2px solid var(--chat-bubble-user-color);
  border-radius: 4px;
  padding: .7rem 1rem .2rem 1rem;
  min-height: 1.75lh;
  max-height: 5lh;
  inline-size: 100%;
  resize: none;
  field-sizing: content;
}

.chat__input:focus-visible {
  outline: 1px solid var(--chat-bubble-user-color);
  outline-offset: 0px;
}

.chat__submit {
  position: absolute;
  bottom: .5rem;
  right: .8rem;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 1px solid var(--chat-light-color);
  border-radius: 50%;
  height: 2.25rem;
  width: 2.25rem;
  color: var(--chat-bubble-user-color);
  background-color: var(--chat-light-color);
  z-index: 20;
}

.chat__submit svg {
  height: 1.5rem;
  width: 1.5rem;
}

@media (min-width: 25em) {
  .chat__panel {
    right: 4px
  }
}

code {
    text-wrap: auto;
}

ul, ol {
    list-style-position: inside;
}

pre code.hljs {
    margin-bottom: 2rem;
}

.assistant-avatar {
  width: 90px;
  float: left;
}