:host {
  display: block;
  width: 100%;
  font-family: var(--ai12z-font-family);
  font-size: var(--ai12z-font-size);
  color: var(--ai12z-font-color, black);
  text-align: var(--ai12z-text-align, left);
}

.search-page-container {
  background-color: var(--ai12z-search-bar-bgcolor, rgb(244, 242, 238));
}

.submit-button {
  background-color: var(--ai12z-search-bar-button-bgcolor, var(--ai12z-primary-color));
}
.custom-svg-checkbox {
  margin-top: 0.25rem;
  width: 1rem;
  height: 1rem;
  position: absolute;
}
.follow-up-input {
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  width: 1rem;
  height: 1rem;
  border-width: 2px;
  flex-shrink: 0;
  margin-top: 0.25rem;
  border-radius: 0.125rem;
  border-color: rgb(59 130 246);
}
.follow-up-input:checked {
  background-color: var(--ai12z-followup-bg-color);
  border-width: 0px;
}
.follow-up {
  display: flex;
  gap: 0.5rem;
  color: var(--ai12z-followup-color);
  font-size: var(--ai12z-followup-font-size);
}
.image-Container {
  position: relative;
  display: inline-block;
  margin-right: 10px;
}
.delete-image {
  opacity: 3;
  position: absolute;
  right: 3px;
  top: 0;
  cursor: pointer;
  line-height: 10px;
}
.plus-icon {
  /* fill: var(--ai12z-plus-icon-color); */
  color: var(--ai12z-plus-icon-color);
}

/* Most compatible solution */

.search-panel-wrapper {
  height: 100%;
  display: flex;
  flex-direction: column;
}

#searchPanel {
  flex: 1;
  display: flex;
  flex-direction: column;
  /* overflow: hidden; */
}

.content-area {
  flex: 1;
  overflow-y: auto;
}

.welcome-template-container {
  flex-shrink: 0;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  margin-left: auto;
  margin-right: auto;
  /* border-top: 1px solid rgba(0, 0, 0, 0.1); */
  /* box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.1); */
}


/* Animation */
.welcome-template-container {
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* 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;
}

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

#searchForm {
  margin: 0px;
}


.search-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 32px;
  width: 100%;
  /* max-width: 1200px; */
  padding: 0 16px;
}

.left-column {
  height: 100vh; /* or 100% of parent */
  display: flex;
  flex-direction: column;
}


.quick-links-column {
  position: sticky;
  top: 88px; /* below search input */
  height: -moz-fit-content;
  height: fit-content;
  /* width: 500px; */
}


.chat-fieldset {
  border: 2px solid var(--ai12z-primary-color); /* red border */
  border-radius: 16px;
  padding: 12px;
  margin: 0;
  background-color: var(--ai12z-primary-color);
}

/*Added the searchResult.tsx css*/

.cta-search-results {
  border-top-width: 1px;
  border-bottom-width: 0px;
  border-color: rgb(243 244 246);
}

.cta-search-results-list {
  position: relative;
  padding-bottom: 1.25rem;
  padding-top: 1.25rem;
}

.cta-search-results-list:hover {
  background-color: var(--ai12z-hover-bg-color);
}

.cta-search-container {
  margin-left: auto;
  margin-right: auto;
  display: flex;
  max-width: 56rem;
  justify-content: space-between;
  -moz-column-gap: 1.5rem;
       column-gap: 1.5rem;
}

.cta-search-container-two {
  display: flex;
  min-width: 0px;
  -moz-column-gap: 1rem;
       column-gap: 1rem;
}

.cta-search-container-three {
  min-width: 0px;
  flex: 1 1 auto;
}

.cta-search-text {
  font-weight: 600;
  line-height: 1.5rem;
  font-size: var(--ai12z-search-result-title-font-size);
  color: var(--ai12z-search-result-title-color);
}

.cta-search-text-position {
  position: absolute;
  left: 0px;
  right: 0px;
  top: -1px;
  bottom: 0px;
}

.cta-search-description {
  margin-top: 0.25rem;
  display: flex;
  font-size: var(--ai12z-search-result-description-font-size);
  /* font-size: 0.75rem; 12px */
  line-height: 1rem; /* 16px */
  line-height: 1.25rem;
  color: var(--ai12z-search-result-description-color);
}

.cta-search-list-arrow {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  -moz-column-gap: 1rem;
       column-gap: 1rem;
}

.custom-icon-width {
  width: 4rem;
}
.results-icon svg {
  width: 1.5rem;
  height: 1.5rem;
}



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

/* Scrollbar styles for chat container */
.chat-content-wrapper::-webkit-scrollbar {
  width: 8px;
}

.chat-content-wrapper::-webkit-scrollbar-track {
  background: var(--ai12z-scrollbar-track-color, #f1f1f1);
  border-radius: 10px;
}

/* REMOVE ARROWS */
.chat-content-wrapper::-webkit-scrollbar-button {
  display: none;
}

.chat-content-wrapper::-webkit-scrollbar-thumb {
  background: var(--ai12z-scrollbar-thumb-color, #888);
  border-radius: 10px;
}

.chat-content-wrapper::-webkit-scrollbar-thumb:hover {
  background: var(--ai12z-scrollbar-thumb-hover-color, #555);
}

/* Firefox scrollbar */
.chat-content-wrapper {
  scrollbar-width: thin;
  scrollbar-color: var(--ai12z-scrollbar-thumb-color, #888) var(--ai12z-scrollbar-track-color, #f1f1f1);
  min-height: 0;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .search-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .quick-links-column {
    display: none;
  }

  .welcome-template-container {
    padding: 0.75rem;
  }
  
  .welcome-template-content {
    padding: 1rem;
    border-radius: 0.75rem;
  }
  
  /* Thinner scrollbar on mobile */
  .chat-content-wrapper::-webkit-scrollbar {
    width: 4px;
  }
}

.sources-panel {
  width: 360px;
  padding: 16px;
  border-radius: 12px;
  /* background: #f8fafc; */
  /* box-shadow: 0 2px 8px rgba(0,0,0,0.05); */
  font-family: system-ui, -apple-system, sans-serif;
}

.title {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 600;
  color: #0f172a;
}

.skeleton-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.skeleton-line {
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    #e5e7eb 25%,
    #f1f5f9 37%,
    #e5e7eb 63%
  );
  background-size: 400% 100%;
  /* animation: shimmer 1.4s ease infinite; */
}

.skeleton-line.short {
  width: 65%;
}

.divider {
  height: 1px;
  background: #e2e8f0;
  margin: 6px 0;
}

@keyframes shimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}
