@charset "UTF-8";
/**
 * uaplus.css version 0.2.0
 */
/**
 * 1. Different box model
 * 
 * We use the traditional box model, where the padding and border 
 * of the element is drawn inside and not outside the specified 
 * width and height. That makes combining relative and absolute 
 * units in properties like <code>inline-size</code> and 
 * <code>block-size</code> easier.
 * 
 * See https://en.wikipedia.org/wiki/CSS_box_model
 */
*,
*::after,
*::before {
  box-sizing: border-box;
}

/**
 * 2. Improve focus styles
 *
 * Add spacing between content and its focus outline.
 */
:where(:focus-visible) {
  outline-offset: 3px;
}

/**
 * 3. Disable text size adjustment
 * 
 * To improve readability on non-mobile optimized websites, browsers
 * like mobile Safari increase the default font size when you switch
 * a website from portrait to landscape. We don't want that for our 
 * optimized sites.
 *
 * See https://kilianvalkhof.com/2022/css-html/your-css-reset-needs-text-size-adjust-probably/
 */
:where(html) {
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
}

/**
 * 4. Increase line height
 *
 * Long paragraphs are easier to read if the line height is higher.
 */
:where(html) {
  line-height: 1.5;
}

/**
 * 5. Add scrollbar gutter
 *
 * Prevent the page from “jumping” when switching from a long to a short page.
 *
 */
:where(html) {
  scrollbar-gutter: stable;
}

/**
 * 6. Remove UA styles for h1s nested in sectioning content
 *
 * Nesting h1s in section, articles, etc., shouldn't influence the 
 * styling of the heading since nesting doesn't influence 
 * semantics either.
 * 
 * See https://github.com/whatwg/html/issues/7867#issuecomment-2632395167
 * See https://github.com/whatwg/html/pull/11102
 * See https://html.spec.whatwg.org/#sections-and-headings
 */
:where(h1) {
  font-size: 2em;
  margin-block: 0.67em;
}

/**
 * 7. Improve abbreviations with titles
 * 
 * The abbr element with the title isn't helpful regarding 
 * accessibility because support is inconsistent, and it's only 
 * accessible to some users. Still, it's commonly used. 
 * This rule shows a dotted underline on abbreviations in all 
 * browsers (there's a bug in Safari) and changes the cursor.
 * 
 * See https://adrianroselli.com/2024/01/using-abbr-element-with-title-attribute.html
 */
:where(abbr[title]) {
  cursor: help;
  text-decoration-line: underline;
  text-decoration-style: dotted;
}

/**
 * 8. Optimize mark element in Forced Colors Mode
 *
 * The colors of the mark element don't change in Forced Colors Mode,
 * which can be problematic. Use system colors instead.
 * 
 * See https://adrianroselli.com/2017/12/tweaking-text-level-styles.html#MarkWHCM
 */
@media (forced-colors: active) {
  :where(mark) {
    color: HighlightText;
    background-color: Highlight;
  }
}
/**
 * 9. Avoid overflow caused by embedded content
 * 
 * Ensure that embedded content (audio, video, images, etc.) 
 * doesn't overflow its container.
 */
:where(audio, iframe, img, svg, video) {
  max-block-size: 100%;
  max-inline-size: 100%;
}

/**
 * 10. Prevent fieldsets from causing overflow
 *
 * Reset the default `min-inline-size: min-content` to prevent
 * children from stretching fieldsets
 *
 * See https://github.com/twbs/bootstrap/issues/12359
 * and https://html.spec.whatwg.org/multipage/#the-fieldset-and-legend-elements
 */
:where(fieldset) {
  min-inline-size: 0;
}

/**
 * 11. Turn labels into block elements
 * 
 * Labels for inputs, selects, and textarea should be block 
 * elements.
 */
:where(label):has(+ :where(input:not([type=radio], [type=checkbox]), select, textarea)) {
  display: block;
}

/**
 * 12. Increase the block-size of textareas
 *
 * The default height of textareas is small. We increase it a bit.
 */
:where(textarea:not([rows])) {
  min-block-size: 6em;
}

/**
 * 13. Inherit font styling in form elements
 * 
 * buttons, inputs, selects, and textarea should have the same font
 * family and size as the rest of the page.
 */
:where(button, input, select, textarea) {
  font-family: inherit;
  font-size: inherit;
}

/**
 * 14. Normalize search input styles
 *  
 * Remove the rounded corners of search inputs on macOS and IOS 
 * and normalize the background color
 */
:where([type=search]) {
  -webkit-appearance: textfield;
}

/* iOS only */
@supports (-webkit-touch-callout: none) {
  :where([type=search]) {
    border: 1px solid -apple-system-secondary-label;
    background-color: canvas;
  }
}
/**
 * 15. Maintain direction in some input types
 * 
 * Some input types should remain left-aligned in right-to-left
 * languages,but only if the value isn't empty because the 
 * placeholder should be right-aligned.
 *
 * See https://rtlstyling.com/posts/rtl-styling#form-inputs
 */
:where(input):where([type=tel], [type=url], [type=email], [type=number]):not(:placeholder-shown) {
  direction: ltr;
}

/**
 * 16. Improve table styling
 *  
 * With the default styling, tables are hard to scan. These rules 
 * add padding and collapsed borders.
 */
:where(table) {
  border-collapse: collapse;
  border: 1px solid;
}

:where(th, td) {
  border: 1px solid;
  padding: 0.25em 0.5em;
  vertical-align: top;
}

/**
 * 17. Fading dialogs
 *  
 * Add fade in and fade out transitions for the dialog element
 * and backdrops
 */
:where(dialog)::backdrop {
  background: oklch(0% 0 0/0.3);
}

:where(dialog, [popover]),
:where(dialog)::backdrop {
  opacity: 0;
  transition: opacity 150ms ease-out, display 150ms allow-discrete, overlay 150ms allow-discrete;
}

:where(dialog[open], :popover-open),
:where(dialog[open])::backdrop {
  opacity: 1;
}

@starting-style {
  :where(dialog[open], :popover-open),
:where(dialog[open])::backdrop {
    opacity: 0;
  }
}
/**
 * 18. Increase specificity of [hidden]
 *  
 * Make it harder to accidentally unhide elements with the 
 * [hidden] attribute while still maintaining the until-found 
 * functionality.
 */
[hidden]:not([hidden=until-found]) {
  display: none !important;
}

/**
 * 19. Turn images into block elements
 */
:where(img) {
  display: block;
}

/**
 * 20. Change cursor of <summary>
 *
 * By default, only the ::marker inside the summary uses the 
 * default cursor.
 */
:where(summary) {
  cursor: default;
}

/**
 * 21. Remove the default border from iframes
 */
:where(iframe) {
  border: none;
}

html {
  padding: 0;
  margin: 0;
}

body {
  padding: 0;
  margin: 0;
}

a {
  text-decoration: none;
}

* {
  box-sizing: border-box;
}
*:focus {
  outline: none;
}

input {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  border: none;
  outline: none;
  background: none;
  margin: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  box-shadow: none;
  border-radius: 0;
}

button {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  border: none;
  outline: none;
  background: none;
  margin: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  text-align: inherit;
  box-shadow: none;
  border-radius: 0;
  cursor: pointer;
  transition: all 0.201s;
}
button:focus, button:active {
  outline: none;
}

html {
  height: 100%;
  width: 100%;
  overflow: hidden;
}

body {
  height: 100%;
  width: 100%;
  overflow: hidden;
  font-family: Roboto, sans-serif;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none;
  width: 0;
}

textarea {
  field-sizing: content;
  color: inherit;
}

.page-container {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) 8fr;
  grid-template-rows: 48px 1fr 148px 32px;
  gap: 0.3rem;
  grid-template-areas: "header header" "leftnav content" "leftnav chatinput" "footer footer";
  overflow-y: hidden;
  height: 100%;
  width: 100%;
}
.page-container .page-leftnav {
  grid-area: leftnav;
  display: flex;
  flex-direction: column;
  border: #7b1822 solid 1px;
}
.page-container .page-leftnav .page-leftnav-item {
  display: block;
}
.page-container .page-header {
  grid-area: header;
  display: flex;
  flex-direction: row;
  padding: 0 16px 0 0;
  border: #7b1822 solid 1px;
  justify-content: center;
  justify-items: center;
}
.page-container .page-content {
  grid-area: content;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  width: 99.999%;
  padding: 0;
  margin-right: 1px;
  border: #7b1822 solid 1px;
  overflow-y: scroll;
  overflow-x: hidden;
}
.page-container .chatinput-container {
  grid-area: chatinput;
  border: #7b1822 solid 1px;
}
.page-container .page-footer {
  grid-area: footer;
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  padding: 0 16px;
  border: #7b1822 solid 1px;
}

body {
  background-color: #15181b;
  color: #f1f2ff;
}

a {
  color: inherit;
  text-decoration: underline;
}

.page-header-content {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  height: 100%;
  width: 100%;
  padding: 0;
}

.page-header-title {
  display: flex;
  flex-flow: row wrap;
  flex: 1 1 auto;
  align-items: center;
  justify-content: flex-start;
  font-size: 150%;
  font-weight: bold;
  padding: 0 16px;
}

textarea,
.chat-response {
  display: flex;
  flex-flow: column wrap;
  flex: 1 1 auto;
  align-items: flex-start;
  justify-content: flex-start;
  border: #8e8f97 solid 1px;
  background-color: #aeaeae;
}

button,
.button {
  display: flex;
  flex-flow: row nowrap;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  padding: 1px 16px;
  color: #f1f2ff;
  background-color: #55545e;
  border: #8e8f97 solid 1px;
  border-radius: 16px;
  cursor: pointer;
  transition: 0.2s;
}
button:hover,
.button:hover {
  background-color: #313136;
}
button.table-action,
.button.table-action {
  padding-top: 0;
  padding-bottom: 0;
  height: 20px;
  margin: 4px 0;
}
button.table-action:first-of-type,
.button.table-action:first-of-type {
  margin-right: 0.5rem;
}

.hspacer {
  display: flex;
  flex: 0 1 auto;
  height: 16px;
}

.page-leftnav .page-leftnav-menu {
  display: flex;
  flex-flow: column wrap;
}

.leftnav-item {
  display: flex;
  justify-content: flex-start;
  border-radius: 0;
  border: none;
  background-color: #15181b;
}
.leftnav-item:hover {
  background-color: #252d31;
}
.leftnav-item.current {
  background-color: #313136;
}
.leftnav-item.level-0 {
  margin: 4px 0 4px 0;
}
.leftnav-item.level-2 {
  margin: 4px 0 4px 16px;
}
.leftnav-item.level-2.current {
  background-color: #55545e;
}

.menu-section {
  padding: 0 4px 0 8px;
  margin-left: 16px;
}

div.current-topmenu {
  padding: 8px;
  margin-left: 16px;
}

button.current-topmenu,
.button.current-topmenu {
  background-color: #1d212b;
  border-color: #be993b;
}

input,
textarea {
  display: flex;
  border: #8e8f97 solid 1px;
  border-radius: 4px;
  cursor: auto;
  background-color: #313136;
}
input:hover,
textarea:hover {
  background-color: #252d31;
}
input[type=file],
textarea[type=file] {
  cursor: pointer;
}

.chatsession-history-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 1200px;
}

.chatesession-section-header {
  display: flex;
  flex-flow: row nowrap;
  border-bottom: #ad0876 solid 1px;
  font-weight: bold;
  font-size: 150%;
}

.chatsession-history-message {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  width: 100%;
  border: #8e8f97 solid 1px;
  padding: 8px;
  border-radius: 4px;
  gap: 8px;
}
.chatsession-history-message p {
  margin: 0;
}
.chatsession-history-message.user {
  border-color: #007c00;
}

.chatsession-user-message {
  display: flex;
  flex-flow: column;
  flex: 1 1 auto;
  justify-content: flex-start;
  width: 100%;
  padding: 8px;
  margin: 8px 0;
  background-color: #313136;
  border: #007c00 solid 1px;
  border-radius: 4px;
}

.chatesession-role-label {
  display: flex;
  flex-flow: row nowrap;
  border-bottom: #ad0876 solid 1px;
}

.chatsession-history {
  display: flex;
  flex-flow: column nowrap;
  flex: 1 1 auto;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 8px;
  padding: 8px 0;
  margin: 8px 0;
}

.chatinput-content {
  display: flex;
  flex-flow: row nowrap;
  flex: 1 1 auto;
  align-items: flex-start;
  justify-content: space-around;
}

.chatinput-button-box {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  padding: 0 16px;
  gap: 8px;
}
.chatinput-button-box button, .chatinput-button-box .button {
  width: 100%;
  white-space: nowrap;
}

#copy-stream-btn:disabled,
#abort-stream-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.chatinput-tabs-container {
  display: flex;
  flex-flow: row nowrap;
  flex: 1 1 auto;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  height: 48px;
}
.chatinput-tabs-container .button.icon {
  display: flex;
  justify-self: center;
  align-items: center;
  border-radius: unset;
  padding: 0;
  border: none;
  background: none;
  width: 48px;
  height: 48px;
}
.chatinput-tabs-container .button.icon:hover {
  background-color: #252d31;
}
.chatinput-tabs-container .button.icon svg {
  display: flex;
  width: 48px;
  height: 48px;
  fill: #f1f2ff;
  margin: 0;
}

.chatsession-list-button-box {
  display: flex;
  flex-flow: row nowrap;
  flex: 1 0 auto;
  align-items: stretch;
  margin: 8px 0;
}

.chatsession-list-button-wrapper {
  display: flex;
  flex-flow: column;
  justify-content: stretch;
  height: 100%;
}

.chatsession-list-button-wrapper2 {
  display: flex;
  flex-flow: row wrap;
}

button.chatsession-list {
  display: flex;
  flex-direction: column;
  margin-top: 0;
}
button.chatsession-list.select {
  border-radius: 16px 0 0 16px;
  border-right: none;
  background-color: #15181b;
}
button.chatsession-list.select:hover {
  background-color: #0a0b0d;
}
button.chatsession-list.delete {
  border-radius: 0 16px 16px 0;
  background-color: #541017;
  border-left: none;
}
button.chatsession-list.delete:hover {
  background-color: #3f0c11;
}

.chatsession-output-container {
  display: flex;
  flex-flow: row nowrap;
  gap: 16px;
  width: 100%;
  border: #8e8f97 solid 1px;
  border-radius: 4px;
}

.chatsession-output {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.chatsession-status {
  display: flex;
  flex-direction: column;
  min-height: 32px;
}

.chatsession-stream {
  display: flex;
  flex-direction: column;
  min-height: 32px;
  white-space: pre-wrap;
}

.object-info-box-outer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px;
  border: #8e8f97 solid 1px;
  border-radius: 4px;
}

.object-info-box-row {
  display: flex;
  flex-direction: row;
  gap: 8px;
}

.login-container {
  display: flex;
  flex-flow: column wrap;
  align-items: center;
  flex-grow: 0;
  font-family: Arial, sans-serif;
  color: #333333;
  margin: 4rem auto;
  padding: 1rem;
  background: #f7f7f7;
  border-radius: 12px;
}
.login-container .card {
  display: flex;
  flex-flow: column wrap;
  align-items: flex-start;
  justify-content: flex-start;
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}
.login-container label {
  display: block;
  margin-top: 1rem;
  margin-bottom: 0.4rem;
  font-weight: 600;
}
.login-container input {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid #cccccc;
  border-radius: 8px;
  box-sizing: border-box;
  color: white;
}
.login-container button.login {
  margin-top: 1.5rem;
  width: 100%;
  padding: 0.9rem;
  border: none;
  border-radius: 8px;
  background: #2563eb;
  color: white;
  font-size: 1rem;
  cursor: pointer;
}
.login-container .error {
  background: #fee2e2;
  color: #991b1b;
  padding: 0.75rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.streaming-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.streaming-spinner {
  display: inline-block;
  width: 0.95rem;
  height: 0.95rem;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: streamingSpin 0.75s linear infinite;
  transform-origin: center;
}

@keyframes streamingSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
.form-container-outer {
  display: flex;
  flex-flow: row;
  flex: 0 1 auto;
  justify-content: flex-start;
  align-items: flex-start;
  max-width: 1200px;
  width: 100%;
  padding: 0 16px 0 16px;
}

.form-container-inner {
  display: flex;
  flex-flow: column;
  flex: 1 1 auto;
  justify-content: flex-start;
  align-items: flex-start;
}

.form-element-group {
  display: flex;
  flex-flow: column;
  flex: 0 1 auto;
  justify-content: flex-start;
  align-items: flex-start;
  width: 100%;
  padding: 16px 0 0 0;
}
.form-element-group.missing {
  border: 2px solid #ff0000;
}
.form-element-group.missing:before {
  content: "Missing field";
  color: #ff0000;
}

.form-button-group-outer {
  display: flex;
  flex-flow: row nowrap;
  flex: 0 1 auto;
  justify-content: flex-start;
  align-items: center;
  width: 100%;
  padding: 16px 0 0 0;
}
.form-button-group-outer.right {
  justify-content: flex-end;
}

.form-button-group-inner {
  display: flex;
  flex-flow: row nowrap;
  gap: 16px;
  flex: 0 1 auto;
  justify-content: flex-start;
  align-items: center;
}

textarea,
input[type=password],
input[type=email],
input[type=text] {
  display: flex;
  flex-flow: column nowrap;
  flex: 1 0 100%;
  width: 100%;
  border: 1px solid #cccccc;
  padding: 5px;
  margin: 0;
}
