@charset "UTF-8";
body {
  font-family: "Open Sans", sans-serif;
  background-color: #ffffff;
  color: #000;
  margin: 0;
  padding: 1rem;
  font-size: 1rem;
}

#chatbox {
  max-width: 600px;
  margin: auto;
}

.head2-container {
  background-color: var(--primary-color, #D97743);
  width: 100%;
  padding: 1em 0 0.4em 0;
}
.head2-container h2 {
  text-align: center;
  color: #ffffff;
}

main {
  padding: 1em;
  max-width: 600px;
  margin: auto;
}

h1, h2, h3, h4 {
  color: var(--primary-color, #D97743);
  margin-top: 0;
  text-align: left;
}

h2 {
  font-size: 1em;
}

.spinner {
  border: 4px solid #ccc;
  border-top: 4px solid #444;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999;
  background: #ffffff;
  padding: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
.hidden {
  display: none !important;
}

.sources {
  margin: 0.5rem auto;
  display: grid;
  grid-template-columns: 1fr 3fr;
  gap: 1rem;
}

.portrait {
  width: 100%;
  height: auto;
}

fieldset {
  border: none;
  padding: 0;
  font-size: 0.9rem;
}
fieldset img {
  width: 1.75rem;
  height: auto;
  cursor: pointer;
  margin: 0 0.25rem;
}

.source-mode {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.source-option {
  display: flex;
  flex-direction: row;
  gap: 0.5rem;
  align-items: center;
}

.icon-pair {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  align-items: center;
}

#explanation {
  font-size: 0.9em;
  color: #555;
  margin: 0.75em auto 1em auto;
  max-width: 90%;
  text-align: center;
  line-height: 1.4;
}
#explanation p {
  margin: 0;
}

#knowledge {
  text-align: center;
  margin: auto 0;
  font-size: 0.9em;
  color: #555;
  max-width: 90%;
}

input, button, textarea {
  font-size: 1em;
  font-family: inherit;
}

.question-box {
  width: 100%;
  padding: 0.8rem;
  margin: 0.5em 0 0 0;
  border: 2px solid var(--primary-color, #D97743);
  border-radius: 10px;
  background-color: #f9f9f9;
  box-sizing: border-box;
}
.question-box:focus {
  outline: none;
  border-color: var(--hover-color, #1B1BF5);
}

.answer-box {
  width: 100%;
  padding: 1rem;
  margin: 0.5em 0 1em;
  background-color: #f1f1f1;
  border-radius: 10px;
  border: 2px solid #ccc;
  font-size: 1.1em;
  line-height: 1.7;
  min-height: 80px;
  opacity: 1;
  transition: opacity 0.3s ease;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
  box-sizing: border-box;
  white-space: pre-wrap;
}
.answer-box.ready {
  opacity: 1;
}
.answer-box .answer-body {
  opacity: 1;
}
.answer-box .answer-body h2, .answer-box .answer-body h3, .answer-box .answer-body h4 {
  margin: 0.5rem 0 0 0;
  font-size: 1.1em;
  font-weight: 600;
  color: var(--primary-color, #D97743);
  line-height: 1.4;
}
.answer-box .answer-body p {
  margin: 0 0 0.25rem 0;
}
.answer-box .answer-body ul, .answer-box .answer-body ol {
  margin: 0.5rem 0 1rem 1.5rem;
  padding-left: 1.2rem;
}
.answer-box .answer-body ul li, .answer-box .answer-body ol li {
  margin-bottom: 0;
  line-height: 1.6;
}
.answer-box .answer-body ul {
  list-style-type: disc;
}
.answer-box .answer-body ol {
  list-style-type: decimal;
}

.answer-header {
  font-size: 1.1em;
  line-height: 1.7;
  margin: 0 0 0.4rem 0;
  color: var(--primary-color, #D97743);
}

.explanation-placeholder {
  text-align: center;
  margin: -9em 0 0 0;
  opacity: 0.67;
  color: #000;
  pointer-events: none;
}
.explanation-placeholder p {
  margin: 0 0 -6em 0;
  padding: 0;
}

.buttons {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin: 1.25rem 0;
}
.buttons #ask-top, .buttons #archive-search-btn {
  padding: 0.6rem 1.2rem;
  background: var(--primary-color, #D97743);
  color: white;
  border: none;
  border-radius: 5px;
  font-weight: bold;
  cursor: pointer;
  white-space: nowrap;
  box-sizing: border-box;
}
.buttons #ask-top:hover, .buttons #archive-search-btn:hover {
  background: var(--hover-color, #1B1BF5);
}
.buttons .handling {
  display: flex;
  flex-shrink: 0;
  gap: 0.5rem;
}
.buttons .handling button,
.buttons .link-as-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background: var(--primary-color, #D97743);
  border: none;
  border-radius: 5px;
  cursor: pointer;
  padding: 0;
}
.buttons .handling button:hover,
.buttons .link-as-btn:hover {
  background: var(--hover-color, #1B1BF5);
}
.buttons .handling button .handling-icon,
.buttons .link-as-btn .handling-icon {
  width: 1rem;
  height: 1rem;
  display: block;
}

.archive-run-btn {
  margin: 0 0 1em 0;
  padding: 0.6rem 1.2rem;
  border-radius: 5px;
  border: none;
  font-weight: bold;
  background: var(--primary-color, #D97743);
  color: #ffffff;
  font-size: 0.95rem;
  cursor: pointer;
}
.archive-run-btn:hover {
  background: var(--hover-color, #1B1BF5);
}

.archive-run-btn {
  padding: 0.5rem 1rem;
  border: 2px solid var(--primary-color, #D97743);
  border-radius: 5px;
  background-color: var(--primary-color, #D97743);
  color: #ffffff;
  font-weight: bold;
  font-size: 0.9em;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.archive-run-btn:hover {
  background-color: var(--hover-color, #1B1BF5);
  color: #ffffff;
}

.archive-edit-prompts {
  margin-top: 0.75rem;
}

.startandarchive {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.copy-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
}

.copy-modal-dialog {
  position: fixed;
  left: 50%;
  top: 20%;
  transform: translateX(-50%);
  background: #fff;
  border-radius: 12px;
  padding: 12px;
  width: min(680px, 92vw);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.copy-modal-title {
  font-weight: 600;
  margin-bottom: 8px;
}

.copy-modal-text {
  width: 100%;
  height: 200px;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 8px;
}

.copy-modal-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.copy-modal-hint {
  opacity: 0.8;
  font-size: 0.9rem;
}

.archive-header-3col {
  background: #f1f1f1;
  border-radius: 10px;
  border: 1px solid #ccc;
  margin: 0 1rem;
  padding: 0.5rem 1rem;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.04);
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
  font-size: 1em;
  box-sizing: border-box;
}

.archive-header-left {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
}

.archive-header-centre {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
}

.archive-header-centre img {
  height: 1.6em;
}

.archive-header-right {
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  text-align: right;
}

.footer {
  display: grid;
  grid-template-columns: 1fr 2fr;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 0.75rem;
  background: #ffffff;
  border: 1px solid #ccc;
  border-radius: 10px;
}

.footer-left {
  white-space: nowrap;
}

.footer-right {
  justify-self: end;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
}

/* separators between links */
.footer-right a + a {
  position: relative;
  padding-left: 0.75rem;
}

.footer-right a + a::before {
  content: "|";
  position: absolute;
  left: 0;
  color: #f44336;
}

.embedded-mode {
  max-width: 100% !important;
}
.embedded-mode .archive-header-3col,
.embedded-mode .footer {
  display: none;
}
.embedded-mode body {
  margin: 0;
  padding: 10px;
}
.embedded-mode main {
  padding: 0.5em;
}
.embedded-mode h2 {
  font-size: 1em;
}

.archive textarea {
  width: 100%;
  padding: 0.6rem 0.7rem;
  border-radius: 10px;
  border: 2px solid var(--primary-color, #D97743);
  background: #f9f9f9;
  box-sizing: border-box;
  resize: vertical;
  overflow-y: auto;
}
.archive textarea:focus {
  outline: none;
  border-color: var(--hover-color, #1B1BF5);
}

.archive-layout-3col {
  max-width: min(1800px, 95vw);
  height: calc(100vh - 8.5em);
  margin: 0 auto;
  padding: 1rem 1rem;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
  box-sizing: border-box;
  overflow-wrap: break-word;
}
.archive-layout-3col h2 {
  font-size: 1.1rem;
}
.archive-layout-3col h3 {
  font-size: 1rem;
}

.archive-left {
  min-height: 0;
  background: #f1f1f1;
  border-radius: 10px;
  border: 1px solid #ccc;
  padding: 1rem 1.25rem;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.04);
  overflow: auto;
}
.archive-left p {
  font-size: 0.9rem;
  margin: 0 0 0.75rem 0;
  color: #000;
}
.archive-left label {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
}

.archive-search-modes,
.archive-sources-modes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin: 0.75rem 0;
}
.archive-search-modes label,
.archive-sources-modes label {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.85rem;
  cursor: pointer;
}
.archive-search-modes input[type=radio],
.archive-sources-modes input[type=radio] {
  margin: 0;
}

#archive-results {
  list-style: none;
  padding: 0;
  margin: 0;
}

.archive-result-item {
  padding: 0.75rem 0;
  border-bottom: 1px solid #e3e3e3;
}
.archive-result-item:last-child {
  border-bottom: none;
}
.archive-result-item .archive-result-header {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: baseline;
  margin-bottom: 0.25rem;
}
.archive-result-item .archive-result-header .archive-result-title {
  font-weight: 600;
  font-size: 0.95rem;
}
.archive-result-item .archive-result-header .archive-result-meta {
  font-size: 0.8rem;
  color: #666;
}
.archive-result-item .archive-result-snippet {
  font-size: 0.85rem;
  line-height: 1.5;
  color: #333;
  white-space: pre-wrap;
}
.archive-result-item .archive-result-snippet b {
  background-color: rgba(var(--primary-color, #D97743), 0.12);
  padding: 0 0.1rem;
  border-radius: 3px;
}

.archive-layout-3col textarea {
  width: 100%;
  padding: 0.6rem 0.7rem;
  border-radius: 10px;
  border: 2px solid var(--primary-color, #D97743);
  background: #f9f9f9;
  box-sizing: border-box;
  resize: vertical;
  overflow-y: auto;
}
.archive-layout-3col textarea:focus {
  outline: none;
  border-color: var(--hover-color, #1B1BF5);
}

#archive-query {
  min-height: 6rem;
  max-height: 12.5rem;
  margin-bottom: 1.5rem;
}

#archive-instructions {
  min-height: 6rem;
  margin-bottom: 1.5rem;
}

#archive-text-template {
  min-height: 16rem;
}

.archive-status-message {
  color: #ccc;
}

.archive-sources-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 1rem;
  align-items: start;
}

.archive-sources-row h3 {
  margin-top: 0;
  margin-bottom: 0.25rem;
}

.ms-dropdown {
  font-size: 0.85rem;
  border: 1px solid var(--primary-color, #D97743);
  border-radius: 5px;
  background: #f9f9f9;
  padding: 0.3rem 0.45rem;
  position: relative;
}

.ms-dropdown > summary {
  cursor: pointer;
  list-style: none;
}

.ms-dropdown > summary::-webkit-details-marker {
  display: none;
}

.ms-dropdown > summary::after {
  content: "▾";
  float: right;
  opacity: 0.7;
}

.ms-dropdown[open] > summary::after {
  content: "▴";
}

.ms-dropdown[open] .ms-options {
  position: absolute;
  top: calc(100% - 0.05rem);
  left: 0;
  right: 0;
  z-index: 50;
  background: #f9f9f9;
  border: 1px solid #ccc;
  border-radius: 10px;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.04);
  max-height: 320px;
  overflow-y: auto;
  padding: 0.5rem 0.5rem 0.25rem 0.5rem;
}

.ms-options {
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.ms-options label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  cursor: pointer;
}
.ms-options input {
  margin: 0;
}

#datasets-dropdown.is-disabled {
  opacity: 0.45;
  filter: grayscale(0.8);
  pointer-events: none;
  cursor: not-allowed;
}

#datasets-dropdown.is-disabled > summary {
  cursor: not-allowed;
}

#prompts-dropdown {
  margin-top: 0.75em;
}

.archive-source-select,
.archive-prompt-select {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.archive-source-select label,
.archive-prompt-select label {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.85rem;
  cursor: pointer;
}
.archive-source-select input[type=radio],
.archive-prompt-select input[type=radio] {
  margin: 0;
}

.archive-search-modes,
.archive-chat-sources {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0;
}
.archive-search-modes label,
.archive-chat-sources label {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.85rem;
  cursor: pointer;
}
.archive-search-modes input[type=radio],
.archive-chat-sources input[type=radio] {
  margin: 0;
}

.search-query {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.text-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.text-actions button {
  width: 2.5rem;
  height: 2.5rem;
  background: var(--primary-color, #D97743);
  border: none;
  border-radius: 5px;
  cursor: pointer;
  padding: 0;
}
.text-actions button:hover {
  background: var(--hover-color, #1B1BF5);
}

.text-actions-icon {
  width: 1rem;
  height: 1rem;
  cursor: pointer;
}

.archive-instructions-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.archive-instructions-header h3 {
  margin: 0;
}

#archive-instructions-run {
  margin: 0.5rem 0 1rem 0;
}

.archive-results-row {
  display: grid;
  grid-template-columns: 2.5fr 1fr;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.archive-result-column {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.archive-result-box {
  border-radius: 10px;
  border: 2px solid var(--primary-color, #D97743);
  background: #f9f9f9;
  padding: 0.4rem 0.6rem;
  box-sizing: border-box;
  height: 14rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.archive-result-box #archive-results-count {
  border: none;
  background: transparent;
  width: 100%;
  padding: 0;
  resize: none;
  font-size: 0.9rem;
  line-height: 1.3;
  flex: 0 0 auto;
  margin: 0;
}
.archive-result-box #archive-status {
  flex: 1 1 auto;
  overflow-y: auto;
  margin: 0;
  padding: 0;
}
.archive-result-box #archive-status ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.archive-result-box .archive-result-link {
  display: block;
  padding: 0.3rem 0;
  text-decoration: none;
}
.archive-result-box .archive-result-link:hover {
  text-decoration: underline;
}

.archive-action-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.archive-action-buttons button {
  padding: 0.6rem 1.2rem;
  background: var(--primary-color, #D97743);
  color: white;
  border: none;
  border-radius: 5px;
  font-weight: bold;
  cursor: pointer;
  white-space: nowrap;
  box-sizing: border-box;
  width: 10em;
}
.archive-action-buttons button:hover {
  background: var(--hover-color, #1B1BF5);
}

.archive-result-label {
  display: flex !important;
  align-items: flex-start;
  gap: 0.5rem;
  cursor: pointer;
}

.archive-result-label input[type=checkbox] {
  margin-top: 0.15rem;
}

.archive-result-text {
  display: block;
}

.archive-middle {
  min-height: 0;
  background: #ffffff;
  border-radius: 10px;
  border: 1px solid #ccc;
  padding: 1rem 1.25rem;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.04);
  box-sizing: border-box;
  overflow-y: auto;
  white-space: normal;
  overflow-x: hidden;
}
.archive-middle h2 {
  font-size: 1.1rem;
  margin: 0 0 0.75rem 0;
}
.archive-middle #placeholder-text {
  font-size: 0.9rem;
  color: #555;
  margin: 0;
  padding: 0;
  display: block;
}

#archive-output-panel,
.display-article-summary,
.display-article-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.archive-right {
  min-height: 0;
  background: #f1f1f1;
  border-radius: 10px;
  border: 1px solid #ccc;
  padding: 1rem 1.25rem;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.04);
  box-sizing: border-box;
  overflow-y: auto;
  white-space: normal;
}

.archive-loading {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: #666;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.archive-loading::after {
  content: "";
  width: 1em;
  height: 1em;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-top-color: transparent;
  animation: archive-spin 0.8s linear infinite;
}

@keyframes archive-spin {
  to {
    transform: rotate(360deg);
  }
}
#arrow-up {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--primary-color, #D97743);
  border: none;
  border-radius: 5px;
  cursor: pointer;
  width: 2.5rem;
  height: 2.5rem;
  display: block;
  align-items: center;
  justify-content: center;
}
#arrow-up:hover {
  background: var(--hover-color, #1B1BF5);
}
#arrow-up.hidden {
  opacity: 0;
  pointer-events: none;
}

#arrow-up img {
  width: 1.5rem;
  height: 1.5rem;
}

.prompt-editor-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1em;
  align-items: start;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1rem;
  box-sizing: border-box;
  overflow-y: auto;
}
.prompt-editor-grid h2 {
  font-size: 1.1rem;
}
.prompt-editor-grid h3 {
  font-size: 1rem;
}

.prompt-editor-left {
  background: #f1f1f1;
  border-radius: 10px;
  border: 1px solid #ccc;
  padding: 1rem 1.25rem;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.04);
  min-height: 0;
}

.prompt-editor-right {
  background: #f1f1f1;
  border-radius: 10px;
  border: 1px solid #ccc;
  padding: 1rem 1.25rem;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.04);
  min-height: 0;
}

.prompt-editor-actions {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 0.5em;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.prompt-editor-grid textarea {
  width: 100%;
  padding: 0.6rem 0.7rem;
  border-radius: 10px;
  border: 2px solid var(--primary-color, #D97743);
  background: #f9f9f9;
  box-sizing: border-box;
  resize: vertical;
  overflow-y: auto;
}
.prompt-editor-grid textarea:focus {
  outline: none;
  border-color: var(--hover-color, #1B1BF5);
}

.prompt-list-box {
  width: 100%;
  min-height: 10rem;
  margin-bottom: 1.5rem;
  padding: 0.6rem 0.7rem;
  border-radius: 10px;
  border: 2px solid var(--primary-color, #D97743);
  background: #f9f9f9;
  box-sizing: border-box;
  overflow-y: auto;
}

.prompt-list-box ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.prompt-list-box a {
  display: block;
  padding: 0.3em 0.4em;
  text-decoration: none;
}

.prompt-list-box a.is-active {
  font-weight: 600;
  text-decoration: underline;
}

@media (max-width: 768px) {
  .footer {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .footer-right {
    justify-self: center;
  }
}
@media (max-width: 600px) {
  main.archive {
    padding: 0.5em;
  }
  header {
    margin: 0 0.48em;
  }
  .buttons {
    flex-direction: column;
    justify-content: space-between;
  }
  .sources {
    grid-template-columns: 1fr 4fr;
  }
  .handling {
    justify-content: flex-start;
    width: 100%;
  }
  .startandarchive {
    width: 100%;
  }
}
@media (max-width: 540px) {
  .icon-pair {
    flex-wrap: unset;
    gap: 0;
  }
}
@media (max-width: 480px) {
  #karte {
    flex-direction: row-reverse;
    justify-content: center;
    gap: 0.5rem;
  }
  #www {
    flex-direction: row;
    justify-content: center;
    gap: 0.5rem;
  }
  .mode-label {
    margin-top: 0;
    font-size: 0.85rem;
    text-align: left;
  }
  #source-mode {
    justify-content: flex-start;
  }
  #explanation {
    text-align: left;
    padding-left: 0.25rem;
    font-size: 0.85rem;
  }
  #knowledge {
    text-align: left;
    font-size: 0.85rem;
  }
  main {
    text-align: left;
  }
  h2 {
    text-align: left;
  }
  .buttons {
    justify-content: flex-start;
  }
}

/*# sourceMappingURL=main.css.map */
