// vf-chatbot-modal.scss
.vf-chatbot-modal-container {
  position: fixed;
  bottom: inherit;
  right: inherit;
  width: 92%;
  max-width: 400px;
  display: none;
  opacity: 0;
  // transform: translateY(20px);
  // transition: opacity 0.3s ease, transform 0.3s ease;
  background-color: var(--vf-color--neutral--0);
  border-radius: $vf-radius--sm;
  border-bottom-right-radius: 0px;
  box-shadow: 0px 5px 15px 0px rgba(0, 0, 0, 0.35);

  &--active {
    display: flex;
    flex-direction: column;
    opacity: 1;
    // transform: translateY(0);
  }

  &--inactive {
    display: none;
  }

  @media (max-width: 480px) {
    border-radius: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    min-width: 100vw !important;
    min-height: 100vh !important;
    min-height: 100dvh !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    max-height: 100dvh !important;
  }
}

.vf-chatbot-modal {
  display: flex;
  justify-content: end;
  flex-direction: column;
  height: 60vh;
  border-bottom-left-radius: $vf-radius--sm;
  border-bottom-right-radius: 0px;

  @media (max-width: 480px) {
    width: 100vw !important;
    height: 93vh !important;
    height: 93dvh !important;
    min-width: 100vw !important;
    min-height: 93vh !important;
    min-height: 93dvh !important;
    max-width: 100vw !important;
    max-height: 93vh !important;
    max-height: 93dvh !important;
    border-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
  }
  
  @media (max-height: 1050px) {
    height: 70vh;
  }

  &__header {
    color: var(--vf-color--neutral--900);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 8px;
    min-height: 48px;
  }

  &__header-left {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  &__content {
    display: contents;
  }

  &__input-container {
    display: flex;
    flex-direction: column;
    margin: 0 auto;
    width: 100%;
    border-top: 2px solid var(--vf-color--grey);
  }

  &__input-wrapper {
    display: flex;
    align-items: flex-end;
    label {
      visibility: hidden;
      position: absolute;
      border: 0;
      padding: 0;
      margin: 0;
      height: 1px;
      width: 1px;
      overflow: hidden;
    }
  }

  &__input {
    @include set-type(text-body--3);
    margin-bottom: 0;
    align-content: center;
    width: 100%;
    line-height: 2.1;
    border: none;
    resize: none;
    background: var(--vf-color--neutral--0);
    box-shadow: none !important;
    // /* When typing (not showing placeholder) */
    &:not(:placeholder-shown) {
      color: var(--vf-color__text--primary); /* Text color when typing */
    }

    // When content exceeds 5 rows, show scrollbar
    &--scrollable {
      overflow-y: auto;
    }
  }

  &__send-button {
    height: fit-content;
    background: #3a77bc;
    border: none;
    padding-inline: 0px;
    cursor: pointer;
    img {
      height: 45px !important;
      max-width: fit-content !important;
    }
  }

  &__messages {
    margin: 0 auto;
    flex-direction: column;
    overflow-y: auto;
    padding: 0 1.5rem;
    width: 88%;
  }

  &__messages-no-scrollbar {
    @extend .vf-chatbot-modal__messages;
    width: 89%;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE 10+ */
  }

  &__messages-no-scrollbar::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
  }
  &__disclaimer {
    p {
    font-size: 14px;
    }
    .vf-button--dismiss {
      padding: 10px;
    }
  }

  &__footnote {
    @include set-type(text-body--5);
    margin: 0 auto;
    text-align: center;
  }

  &__header-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  &__minimize,
  &__close {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: background 0.2s;
  }
}
