:host {
  --wes-c-icon-color: #fff;
  --fab-bottom: 26px;
  --xsf-ai12z-zindex-isexpanded-10: 20020;
  --ai-toolbar-icon-color: #2095ae;
  --xsf-ai12z-zindex-0: 19979;
  --xsf-ai12z-zindex-10: 19989;
  --xsf-ai12z-fab-bottom: 26px;
}

.modal-overlay {
  position: absolute;
  height: 100%;
  width: 100%;
  z-index: var(--xsf-ai12z-zindex-0);
  background-color: #2e2e2e99;
}

.layout {
  pointer-events: none;
  position: fixed;
  inset: 0;
  height: 100dvh;
  width: 99dvw;
  justify-content: flex-end;
  grid-template-rows: auto 1fr auto;
  /* grid-template-columns: 0fr minmax(340px, 375px) 0fr; */
  grid-template-areas:
    "left toolbar right"
    "left main right"
    "left footer right";
  padding-top: 96px;
  /* transition: 0.3s ease-out; */
  transition-property: grid-template-columns, padding-top;
  z-index: 19979;
}

.layout.is-open .modal {
  pointer-events: auto;
}

.layout.is-expanded ai12z-bot {
  pointer-events: auto;
}

.layout.is-open.is-expanded .modal {
  border-top-left-radius: 0.75rem;
  border-top-right-radius: 0.75rem;
  --tw-shadow: 0 0 #0000;
  --tw-shadow-colored: 0 0 #0000;
  box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
  z-index: var(--xsf-ai12z-zindex-isexpanded-10);
}

.layout.is-open .user-input-fieldset {
  /* --tw-bg-opacity: 1; */
  /* background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1)); */
  background-image: none;
  padding: 0px;
  background: none;
}

.layout.is-expanded .user-input-fieldset {
  border-top-left-radius: 0.75rem;
  border-top-right-radius: 0.75rem;
}

.layout.is-open .grow-wrap > .textarea,
.layout.is-open .grow-wrap > button,
.layout.is-open .grow-wrap:after {
  /* --tw-border-opacity: 1; */
  border-color: var(--ai12zBot-v2-searchbar-open-border-color);
  /* border-color: rgb(124 122 127 / var(--tw-border-opacity, 1)); */
  /* padding-left: 16px; */
}

.layout.is-expanded .grow-wrap:after {
  display: none;
}

.layout.is-open.is-expanded .user-input {
  z-index: var(--xsf-ai12z-zindex-isexpanded-10);
}

.layout.is-open .user-input {
  z-index: var(--xsf-ai12z-zindex-10);
}

/* .layout.is-open .agent-input-icon {
  opacity: 0;
} */

.text-body2 {
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -0.12px;
  font-weight: 400;
}

.modal-toolbar-icon {
  color: var(--ai12zBot-v2-toolbar-icon-color, inherit);
  width: 1rem;
  height: 1rem;
}

.search-flex {
  flex: 1 1 0%;
}

.show-grid {
  display: grid;
}

.hide-title {
  padding: 0px;
  opacity: 0;
  height: 0px;
}

.user-msg {
  background-color: var(--ai12zBot-v2-user-bubble-background);
  color: var(--ai12zBot-v2-user-bubble-font-color);
}

.text-body4 {
  font-size: var(--ai12zBot-v2-timestamp-font-size);
  line-height: 1.5;
  letter-spacing: 0.03px;
  font-weight: 400;
  color: var(--ai12zBot-v2-timestamp-font-color);
}

.isContent {
  background: var(--ai12zBot-v2-content-background);
  padding: 10px;
}

.default-botAvatar {
  color: var(--ai12zBot-v2-default-avatar-color);
}

.searchform {
  opacity: 1;
  transform: none;
}
.user-input {
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  max-width: 840px;
  min-width: 340px;
  grid-area: footer;
}

.main {
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  max-width: 840px;
  min-width: 340px;
  margin-top: 7px;
}

.heading {
  color: var(--ai12zBot-v2-title-color);
}

.dropdown-item-button {
  display: flex;
  width: 100%;
  cursor: pointer;
  align-items: center;
  -moz-column-gap: 8px;
  column-gap: 8px;
  border-radius: 0.25rem;
  /* border-width: 2px; */
  /* border-style: solid; */
  --tw-border-opacity: 1;
  /* border-color: rgb(255 255 255 / var(--tw-border-opacity, 1)); */
  --tw-bg-opacity: 1;
  background-color: var(--ai12zBot-v2-dropdown-bgcolor);

  /* background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1)); */
  padding: 8px 24px;
  font-weight: 500;
  --tw-text-opacity: 1;
  /* color: rgb(1 118 211 / var(--tw-text-opacity, 1)); */
  color: var(--ai12zBot-v2-dropdown-font-color);
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 75ms;
}

.helptext {
  padding: 0px;
  opacity: 0;
  height: 0px;
}

.minimize-input {
  transform: translateY(calc(-100% - 4px));
}
.ai-text-caption {
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: 0.2px;
  font-weight: 400;
}
/* .user-input-fieldset, */
.fab > button {
  background: var(--ai12zBot-v2-fab-button-background);
  /* background: linear-gradient(to right, #2095ae, oklch(0.64 0.11 202.5)); */
}

.user-input-fieldset {
  background: var(--ai12zBot-v2-searchbar-background);
}
.return-text-color {
  color: rgb(255, 255, 255);
}
.ai-minimize-icon svg {
  fill: currentColor;
  height: 1em;
  width: 1em;
}

.hide-form {
  opacity: 0;
  transform: none;
}

.show-form {
  opacity: 1;
  transform: none;
}

.ai-minimize-icon {
  color: var(--wes-c-icon-color, inherit);
}

.fab {
  bottom: var(--fab-bottom, 30px);
}

.text-body1 {
  font-size: var(--ai12zBot-v2-title-font-size);
  line-height: 1.5;
  letter-spacing: -0.12px;
  font-weight: 400;
}

#message-submit {
  margin-right: 6px;
  margin-bottom: 7px;
  background-color: var(--ai12zBot-v2-searchbar-submit-bgcolor);
}

.ai-icon {
  color: var(--ai12zBot-v2-searchbar-submit-color);
  font-size: 24px;
  width: 1.5rem;
  height: 1.5rem;
}

.plus-icon {
  color: var(--ai12zBot-v2-searchbar-plus-icon-color);
  font-size: 24px;
  width: 1.5rem;
  height: 1.5rem;
}

.grow-wrap > .textarea,
.grow-wrap:after {
  min-height: 48px;
  align-content: center;
  /* border-radius: 0.5rem; */
  border-radius: 1.5rem;
  border-width: 1px;
  border-style: solid;
  /* border-color: transparent; */
  border: 1px solid var(--ai12zBot-v2-searchbar-border-color);
  --tw-bg-opacity: 1;
  background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1));
  padding: 8px 48px;
  text-indent: 2px;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -0.12px;
  font-weight: 400;
  --tw-text-opacity: 1;
  color: rgb(46 46 46 / var(--tw-text-opacity, 1));
  --tw-shadow: 0 0 #0000;
  --tw-shadow-colored: 0 0 #0000;
  box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
  --tw-ring-inset: inset;
  --tw-ring-offset-width: 0px;
  transition-property: all;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 0.15s;
}
.grow-wrap > .textarea,
.grow-wrap:after {
  grid-area: 1 / 1 / 2 / 2;
}

.modal {
  position: relative;
  grid-column: span 1 / span 1;
  grid-column-start: 2;
  grid-row: span 3 / span 3;
  grid-row-start: 1;
  display: grid;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  background-position: center;
  box-shadow:
    0 16px 32px -4px #18181829,
    0 12px 24px -4px #18181814;
  background-image: var(--ai12zBot-v2-modal-backgroundImage);
  /* background-image: linear-gradient(248.35deg, #2095ae -11.3%, #f4f4fe 16.44%, #fff 28.3% 72.47%, #ebeafe 89.69%, #c0e1eb 101.94%); */
  /* background-image: linear-gradient(248.35deg, #2095ae -11.3%, #f4f4fe 16.44%, #fff 28.3%, #e6f7fb 89.69%, #c0e1eb 101.94%); */
  /* background-image: linear-gradient(248.35deg, #86cdff -11.3%, #f4f4fe 16.44%, #fff 28.3% 72.47%, #ebeafe 89.69%, #bec6f7 101.94%); */
  background-repeat: no-repeat;
  background-size: 100vw 100vh;
  grid-template-columns: subgrid;
  grid-template-rows: subgrid;
  z-index: var(--xsf-ai12z-zindex-10);
  transition: 0.3sease-out;
  transition-property: grid-template-columns;
}

/* Add a smooth transition to opacity and transform */
.dropdown-menu {
  pointer-events: none;
  opacity: 0;
  z-index: 10;
  background-color: var(--ai12zBot-v2-dropdown-bgcolor);
  transform: translateY(-10px); /* Start from a higher position */
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}
/* When the dropdown is open, the opacity and position should change */
.dropdown-menu.show {
  pointer-events: auto;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0); /* Slide down to its normal position */
  background-color: var(--ai12zBot-v2-dropdown-bgcolor);
}

.copy-btn {
  /* width: 30%; */
  color: var(--ai12zBot-v2-copy-btn-color);
}

.thumbs-up {
  /* fill: rgb(55 65 81); */
  fill: var(--ai12zBot-v2-feedback-selected);
  width: 1.5rem;
}

.thumbs-down {
  fill: var(  --ai12zBot-v2-feedback-selected);
  width: 1.5rem;
}

.chat-thumbs-up {
  color: var(--ai12zBot-v2-feedback-color);
}
.thumbs-container {
  justify-content: flex-start;
  align-items: center;
}

.back-btn svg {
  fill: var(--ai12zBot-v2-back-button-color);
}

.dropdown-item {
  background-color: var(--ai12zBot-v2-dropdown-bgcolor);
}

button:focus-visible {
  outline: 2px solid var(--ai12zBot-v2-focus-visible-color, #0A2A43);
  outline-offset: 2px;
}

button.bot-btn-primary:focus-visible {
  outline: 2px solid var(--ai12zBot-v2-focus-visible-color-primary, var(--ai12zBot-v2-focus-visible-color, #0A2A43));
  outline-offset: 2px;
}

button.bot-btn-secondary:focus-visible {
  outline: 2px solid var(--ai12zBot-v2-focus-visible-color-secondary, var(--ai12zBot-v2-focus-visible-color, #0A2A43));
}

.bot-name {
  color: var(--ai12zBot-v2-fab-name-color, var(--ai12zBot-v2-bot-name-color));
  font-weight: var(--ai12zBot-v2-fab-font-weight, var(--ai12zBot-v2-bot-name-font-weight));
}

.ai12z-link {
  color: var(--ai12zBot-v2-link-color);
  text-decoration: underline;
}

.ai12z-link:hover {
  color: var(--ai12zBot-v2-link-hover-color);
  text-decoration: underline;
}

.toolbar {
  height: 52px;
  border: #fff;
  grid-area: toolbar;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  left: 10px;
  top: 10px;
  width: auto;
  height: auto;
  z-index: 1000;
}

.enter-tip {
  font-size: 12px;
  color: #666;
  margin-left: 10px;
}

.skip-links.hidden {
  position: absolute;
  left: -9999px; /* hide visually but still focusable */
}
.skip-links.visible {
  left: auto;
  position: static; /* or your layout */
}

/* Error message styles */
.error-message-container {
  margin-top: 0.25rem;
}

.error-msg {
  color: #dc2626;
  font-size: 0.75rem;
  display: block;
  animation: slideIn 0.2s ease-out;
}

.ai12z-form-honeypot {
	position: absolute;
	left: -10000px;
	top: auto;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 1024px) {
  .modal {
    background-size: 80vw 100vh;
  }
}

@media (min-width: 1024px) {
  .layout.is-expanded {
    grid-template-columns: 1fr minmax(340px, 80dvw) 1fr !important;
  }
}

@media (min-width: 768px) {
  .layout.is-expanded {
    -moz-column-gap: 48px;
    column-gap: 48px;
  }
}

@media (max-width: 767px) {
  .layout.is-open {
    /* padding-top: 48px !important; */
    padding-top: 0px !important;
    grid-template-columns: 0fr minmax(340px, 1fr) 0fr !important;
  }
}
@media (max-width: 767px) {
  .fab {
    right: 30px;
    bottom: var(--xsf-ai12z-fab-bottom, 26px);
  }
}
