/**
 * AI Search styles
 *
 * Styles for the AddSearch [addsearch] shortcode search input widget.
 */

.ai-search .adds-components-widget-search-field {
  width: 100%;
  margin: 0 auto;
}

.ai-search .addsWg-searchfield-container {
  width: 100%;
}

.ai-search .addsWg-searchfield-container-class .addsWg-searchfield {
  display: flex;
  align-items: center;
  width: 100%;
  margin: 0;
  padding: 0;
  justify-content: center;
  max-width: 100%;
}

.ai-search
  .addsWg-searchfield-container-class
  .addsWg-searchfield
  input[type="search"] {
  width: 100%;
  border-radius: 1000px;
  max-width: 717px;
}

.ai-search .addsWg-searchfield input[type="search"] {
  width: 100%;
  height: 73px;
  padding: 17px 18px;
  border: 2px solid #008c99;
  border-radius: 50px;
  background-color: #fff;
  background-repeat: no-repeat;
  background-position: 20px center;
  background-size: 24px;
  font-family: Montserrat, sans-serif;
  font-size: 19px;
  font-weight: 400;
  color: #232327;
  outline: none;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
}

.ai-search
  .addsWg-searchfield-container-class
  .addsWg-searchfield
  input[type="search"].icon {
  background-image: url("../images/icons/searchbar-icon.svg");
  background-size: 40px;
  background-position: 18px center;
  padding: 5px 10px 5px 72px !important;
}

.ai-search .addsWg-searchfield input[type="search"]::placeholder {
  color: #6b7280;
  opacity: 1;
}

.ai-search .addsWg-searchfield input[type="search"]:focus {
  border-color: #006b75;
  box-shadow: 0 0 0 3px rgba(0, 140, 153, 0.15);
}

.ai-search .addsWg-searchfield input[type="search"]:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.ai-search .addsWg-searchfield input[type="search"]:hover {
  border-color: #006b75;
}

/* Remove default search cancel button */
.ai-search
  .addsWg-searchfield
  input[type="search"]::-webkit-search-cancel-button,
.ai-search .addsWg-searchfield input[type="search"]::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
}

/** AI Change widget styles **/

#addsearch-csw-root [data-addsearch-component="top-bar"] {
  justify-content: start;
  border: 0;
}

#addsearch-csw-root .flex.items-center.gap-2.py-4 {
  flex-direction: row;
}

#addsearch-csw-root [data-addsearch-component="close-button"] {
  background: #008c99;
  border-radius: 0;
  padding: 15px;
}

#addsearch-csw-root [data-addsearch-component="close-button"] svg {
  fill: #fff;
}

#addsearch-csw-root [data-addsearch-component="wrapper"] {
  font-family: "Montserrat", sans-serif;
}

#addsearch-csw-root [data-addsearch-component="wrapper"] .text-3xl {
  font-weight: 800;
  font-size: 42px;
}

#addsearch-csw-root [data-addsearch-component="initial-view"],
#addsearch-csw-root [data-addsearch-component="search-view"] {
  padding: 0 40px;
  background: #fff;
}

#addsearch-csw-root
  [data-addsearch-component="search-view"]
  .overflow-hidden.w-screen {
  width: 100%;
}

#addsearch-csw-root [data-addsearch-component="send-button"] {
  background: none;
}

#addsearch-csw-root [data-addsearch-component="send-button"] img {
  width: 40px;
  height: 40px;
}

#addsearch-csw-root [data-addsearch-component="message-input-container"] {
  border: 1px solid #eaebec;
  border-radius: 1000px;
}

#addsearch-csw-root [data-addsearch-component="top-bar"] .bg-slate-100 {
  background: none;
  border: 1px solid #eaebec;
}

#addsearch-csw-root [data-addsearch-component="sample-question"] {
  border-radius: 1000px;
  border: 0.5px solid #d3d3d4;
  font-size: 1rem;
}

#addsearch-csw-root [data-addsearch-component="widget-overlay"] {
  max-width: 702px;
}

#addsearch-csw-root [data-addsearch-component="maximize-button"] {
  visibility: hidden;
}

#addsearch-csw-root [data-addsearch-component="search-results-count"] {
  color: #008c99;
  font-weight: 600;
}

#addsearch-csw-root [data-addsearch-component="wrapper"] .text-sm {
  font-size: 1rem;
}

#addsearch-csw-root [data-addsearch-component="wrapper"] .text-gray-700,
#addsearch-csw-root [data-addsearch-component="wrapper"] .text-\[\#00626B\] {
  color: #232327;
}

#addsearch-csw-root
  [data-addsearch-component="search-results-container"]
  .border {
  border: 0;
  border-bottom: 1px solid #eaebec;
}

#addsearch-csw-root [data-addsearch-component="search-result-hit"] {
  padding-bottom: 30px;
}

#addsearch-csw-root button[data-addsearch-component="close-button"] {
  position: absolute;
  left: -46px;
  top: 0px;
}

#addsearch-csw-root [data-addsearch-component="wrapper"] button.rounded-lg {
  /* border-radius: 0; */
}

#addsearch-csw-root [data-addsearch-component="wrapper"] .py-5 {
  border-radius: 16px;
}

#addsearch-csw-root [data-addsearch-component="wrapper"] .break-all {
  word-break: break-word;
  font-size: 14px;
  line-height: 18px;
}

#addsearch-csw-root [data-addsearch-component="search-results-sort-dropdown"] {
  display: none;
}

#addsearch-csw-root
  [data-addsearch-component="wrapper"]
  [data-addsearch-component="search-results-container"]
  > .sticky {
  padding-top: 30px;
  padding-bottom: 10px;
  border: 0;
}

#addsearch-csw-root [data-addsearch-component="wrapper"] .p-4 {
  padding: 0;
}

#addsearch-csw-root [data-addsearch-component="chat-view"] {
  background: #ffffff;
}

#addsearch-csw-root [data-addsearch-component="top-bar-actions"] div.h-6 {
  visibility: hidden;
}

#addsearch-csw-root [data-addsearch-component="chat-footer-text"] {
  color: #232327;
  font-weight: 400;
  font-size: 12px;
  text-align: left;
  margin: 30px 10px 10px 10px;
  line-height: 18px;
}

#addsearch-csw-root [data-addsearch-component="wrapper"] .bg-red-600 {
  background: #008c99;
}

/** Responsive **/
/** Mobile **/
@media (max-width: 767px) {
  .ai-search .adds-components-widget-search-field {
    max-width: 100%;
    padding: 0 16px;
  }

  .ai-search .addsWg-searchfield input[type="search"] {
    height: 48px;
    padding: 12px 20px 12px 48px;
    font-size: 14px;
    background-position: 16px center;
    background-size: 20px;
  }

  #addsearch-csw-root [data-addsearch-component="wrapper"] .text-3xl {
    font-size: 26px;
  }

  #addsearch-csw-root button[data-addsearch-component="close-button"] {
    position: unset;
  }

  #addsearch-csw-root [data-addsearch-component="search-header"] {
    display: none;
  }

  #addsearch-csw-root [data-addsearch-component="initial-view"],
  #addsearch-csw-root [data-addsearch-component="search-view"] {
    padding: 0 16px;
  }

  #addsearch-csw-root [data-addsearch-component="wrapper"] .p-4 {
    padding: 0;
  }

  #addsearch-csw-root [data-addsearch-component="wrapper"] .md\:text-sm {
    font-size: 16px;
    font-weight: 600;
    padding: 9px 14px;
  }

  #addsearch-csw-root [data-addsearch-component="top-bar"] {
    justify-content: right;
  }

  #addsearch-csw-root [data-addsearch-component="top-bar-actions"] div.h-6 {
    display: none;
  }

  #addsearch-csw-root button[aria-label="Clear chat"] {
    /*display: none; */
  }

  #addsearch-csw-root .flex.items-center.gap-2.py-4 {
    flex-direction: row;
  }

  #addsearch-csw-root [data-addsearch-component="wrapper"] .text-sm {
    font-size: 14px;
  }

  #addsearch-csw-root [data-addsearch-component="related-search-results"] {
    display: none;
  }

  #addsearch-csw-root
    [data-addsearch-component="wrapper"]
    .max-\[480px\]\:text-sm {
    font-size: 14px;
    line-height: 21px;
  }

  #addsearch-csw-root [data-addsearch-component="chat-footer-text"] {
    margin: 20px 10px;
  }

  #addsearch-csw-root
    [data-addsearch-component="wrapper"]
    .whitespace-pre-line {
    white-space: normal;
  }

  #addsearch-csw-root [data-addsearch-component=wrapper] .text-base {
    font-size: 16px;
  }
}

@media (min-width: 768px) {
  #addsearch-csw-root [data-addsearch-component="wrapper"] .md\:text-sm {
    font-size: 18px;
  }
}

/* Tablet (max-width: 1024px) */
@media (max-width: 1024px) {
  #addsearch-csw-root button[data-addsearch-component="close-button"] {
    left: -43px;
  }
}
