.tria-wrap {
  position: fixed;
  width: 375px;
  right: 50px;
  bottom: 120px;
  z-index: 98;
  transition: transform .3s ease-in-out;
}

.tria-container {
  width: 100%;
  height: 580px;
  max-height: calc(100dvh - 40px - 48px - 8px - 56px - var(--headerHeight));
  box-sizing: border-box;
  border-radius: 20px;
  margin-bottom: 24px;
  overflow-x: hidden;
  overflow-y: auto;
  display: none;
}

@media (max-width: 1025.98px) {
  .tria-wrap {
    right: 16px;
  }
  .tria-container {
    max-height: calc(100dvh - 40px - 40px - 24px - var(--headerMobileHeight));
  }
  .s-sidebar-scroll:not(.s-scrolled-up) .tria-container {
    max-height: calc(100dvh - 40px - 47px - var(--headerHeight) - var(--sidebarHeight));
  }
}

.tria-container.intro {
  display: none;
  text-align: center;
  height: auto;
  color: var(--c-gray-0);
  padding: 32px;
  box-sizing: border-box;
  overflow: visible; /* allow tooltip to overflow */
}

.tria-container.intro a:not(.s-btn) {
  color: var(--c-gray-0);
  text-decoration: underline;
}

.tria-container.intro .s-tooltip {
  bottom: 1px;
}

.tria-container.intro {
  min-height: 270px !important;
}

.tria-container.intro > .s-btn {
  margin-top: 10px !important;
  margin: 10px;
}

.tria-container.chat {
  background: var(--card-bg);
  box-shadow: var(--elevation-2);
}

.tria-container.chat .tria-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  color: var(--c-gray-0);
}

.tria-container.chat .tria-header .tria-header-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tria-container .tria-header .s-tooltip {
  bottom: 0;
}

.tria-btn .s-btn-icon-only {
  width: 56px !important;
  height: 56px !important;
}

.tria-btn {
  position: absolute;
  width: 56px !important;
  height: 56px !important;
  right: 0px;
  bottom: -56px;
}

.tria-btn .tria-open-control{
  position: absolute;
  right: 0;
  bottom: 0;
  opacity: 1;
  transition: opacity 0.15s ease;
}
.tria-btn .tria-close-control{
  position: absolute;
  right: 0;
  bottom: 0;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.tria-btn.tria-close-control .tria-close-control{
  opacity: 1;
}
.tria-btn.tria-close-control .tria-open-control{
  opacity: 0;
}

#webTria {
  height: calc(100% - 56px);
  padding: 8px 12px;
}

#webTria .webchat__send-box__main {
  border-radius: 30px;
  align-items: flex-end;
}

#webTria .webchat__send-box__main form.webchat__send-box-text-box {
  padding: 12px;
}


#webTria .webchat__send-box__button {
  border-radius: 50%;
  background: #4D4D4D;
  background: linear-gradient(93.81deg, #39B54A 0%, #0D6C28 100%);
  text-align: center;
  line-height: 100%;
  height: 40px;
}

#webTria .webchat__send-box__button:hover .webchat__icon-button__shade {
  background: none;
}

#webTria .webchat__upload-button {
  background: white;
}

#webTria .webchat__upload-button svg {
  fill: #4B4B4B;
}

#webTria .webchat__send-box__button svg {
  width: 25px;
  height: 25px;
}

#webTria .webchat__bubble__content p.plain,
#webTria .webchat__row.message .markdown  {
  padding-left: 20px;
  padding-right: 20px;
}

#webTria .react-film__flipper__body {
  -webkit-box-shadow: 1px 4px 10px -4px rgba(87,87,87,1);
  -moz-box-shadow: 1px 4px 10px -4px rgba(87,87,87,1);
  box-shadow: 1px 4px 10px -4px rgba(87,87,87,1);
  font-size: 20px;
}

#webTria .webchat__-actions__carousel .react-film__flipper__body {
  font-size: 15px;
}
#webTria .react-film__filmstrip__item {
  margin-bottom: 0;
}

#webTria .ac-pushButton.style-default,
#webTria .webchat__suggested-action__button {
  background: none;
  border: 1px solid #4B4B4B;
  border-radius: 20px;
  color: #4B4B4B;
  height: auto;
  font-size: 13px;
  font-weight: 500;
}

#webTria .ac-pushButton.style-default div{
  overflow: unset !important;
  text-overflow: unset !important;
  white-space: normal !important;
}

#webTria .webchat__bubble__content ul {
  list-style-type: disc;
}

#webTria .webchat__send-box {
  display: flex;
  flex-direction: column;
  padding-top: 5px;
}

#webTria .webchat__suggested-actions__carousel {
  padding: 0 !important;
}

#webTria .webchat__suggested-actions {
  order: 2;
}

.webchat__suggested-actions__carousel ul li {
  padding-left: 0 !important;
}

.webchat__suggested-actions__carousel .react-film__flipper {
  display: none !important;
}

.webchat__basic-transcript__focus-indicator {
  border: 0 !important;
}

#webTria p {
  line-height: 150%;
  font-size: 13.5px;
  letter-spacing: 0px;
}

/* Form elements */
input.ac-input,
textarea.ac-input {
  border: 1px solid var(--input-border);
  border-radius: 25px;
  background: var(--input-bg);
  padding: 6px 18px 6px 14px;
  color: var(--input-color);
  font-size: 14px;
  line-height: 25px;
  outline: none !important;
}

input.ac-input::placeholder,
textarea.ac-input::placeholder {
  color: var(--input-placeholder-color);
  font-size: 14px;
}

.ac-input label {
  margin-bottom: 0;
}

label.ac-richTextBlock {
  margin-left: 19px;
}

.ac-selectable {
  cursor: pointer;
}

.ac-adaptiveCard > .ac-container:not(:first-child) .ac-columnSet .ac-selectable,
.ac-adaptiveCard > .ac-container:not(:first-child).ac-selectable {
  background-color: var(--cardbutton-bg) !important;
  border-radius: 20px;
  box-shadow: 0 4px 4px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.3s ease;
  margin-bottom: 8px !important;
}

.ac-textBlock {
  color: var(--primary-color) !important;
}

.ac-adaptiveCard > .ac-container:not(:first-child) .ac-columnSet .ac-selectable:hover,
.ac-adaptiveCard > .ac-container:not(:first-child).ac-selectable:hover {
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

label.attacherLabel {
  background-color: #4C4C4C;
  color: white;
  border-color: #4C4C4C;
  transition: all 0.15s ease-in-out;
}

label.attacherLabel:hover {
  background-color: #222222;
}

.ac-container[style*="background-image"] {
  background-repeat: no-repeat !important;
}

.tria-header .tria-header-content .active-agent .title {
  font-weight: bold;
  margin-bottom: 3px;
}

.tria-header .tria-header-content .active-agent .subtitle {
  font-size: 13.5px;
}

.tria-header .beta.active-agent {
  padding-top: 40px !important;
  font-size: 12px !important;
}

#webTria.active-agent {
  height: calc(100% - 80px) !important;
}

@media (max-width: 1025.98px) {
  .tria-wrap {
    transform: translateY(-16px);
  }
  .s-sidebar-scroll.s-scrolled-up .tria-wrap {
    transform: translateY(48px);
  }
}


@media (max-width: 767.98px) {
  .tria-wrap {
    width: calc(100% - 32px);
    max-width: 355px;
    right: 16px;
    transform: translateY(4px);
  }
  .s-sidebar-scroll.s-scrolled-up .tria-wrap {
    transform: translateY(64px);
  }

  .tria-container {
    /* height: 534px;
    max-height: 80dvh; */
    max-height: calc(100dvh - 40px - 40px - 8px - var(--headerMobileHeight));
    min-height: unset !important;
    overflow-y: auto;
  }
  .s-sidebar-scroll:not(.s-scrolled-up) .tria-container {
    max-height: calc(100dvh - 40px - 40px - 47px - 8px - var(--headerMobileHeight) - var(--sidebarHeight));
  }

  .tria-btn, 
  .tria-btn .s-btn-icon-only {
    width: 40px !important;
    height: 40px !important;
  }

  .tria-btn {
    bottom: -40px;
  }
}