.logo-half {
  height: 141px;
  object-fit: contain;
}

.conversation-textarea {
  resize: none;
}

.white-space-pre-wrap {
  white-space: pre-wrap;
}

.select-model-width {
  max-width: 250px;
}

#latency-data {
  font-family: var(--bs-font-monospace);
}

.strutis-logo {
  height: 1.25rem;
  width: auto;
}

.min-h-0 {
  min-height: 0;
}

.chat-bubble {
  white-space: normal;
  overflow-wrap: break-word;
}

.chat-bubble p:has(+ ul) {
  margin-bottom: 0;
}

.chat-bubble code {
  font-family: var(--bs-font-monospace);
  font-size: 0.875em;
  background-color: var(--bs-tertiary-bg);
  padding: 0.125rem 0.375rem;
  border-radius: 0.375rem;
}

.chat-bubble pre {
  background-color: var(--bs-tertiary-bg);
  border-radius: 0.5rem;
  padding: 0.75rem;
  overflow-x: auto;
}

.chat-bubble h1,
.chat-bubble h2,
.chat-bubble h3,
.chat-bubble h4,
.chat-bubble h5,
.chat-bubble h6 {
  font-size: 1rem;
  font-weight: 600;
  margin-top: 0.75rem;
  margin-bottom: 0.25rem;
}

.chat-bubble pre code {
  background-color: transparent;
  padding: 0;
  border-radius: 0;
}

.chat-bubble table {
  border-collapse: collapse;
  display: block;
  max-width: 100%;
  overflow-x: auto;
  margin: 0.5rem 0;
}

.chat-bubble th,
.chat-bubble td {
  border: 1px solid var(--bs-border-color);
  padding: 0.25rem 0.5rem;
}

.chat-bubble th {
  background-color: var(--bs-tertiary-bg);
  font-weight: 600;
}

.chat-message-user {
  display: flex;
  justify-content: flex-end;
}

.chat-message-user .chat-bubble {
  max-width: 85%;
  padding: 0.625rem 1rem;
  border-radius: 1.25rem;
  background-color: var(--bs-tertiary-bg);
}

.chat-message-queued {
  opacity: 0.6;
}

.chat-meta {
  margin-top: 0.25rem;
}

.chat-tool summary {
  cursor: pointer;
}

.chat-tool pre {
  margin-top: 0.5rem;
  max-height: 16rem;
  overflow-y: auto;
}

.chat-progress .progress {
  --bs-progress-height: 0.25rem;
  --bs-progress-bar-bg: var(--bs-primary);
}

.chat-progress .progress-bar {
  animation: chat-progress-indeterminate 1.5s ease-in-out infinite;
}

@keyframes chat-progress-indeterminate {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(250%);
  }
}

#conversation-form {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
  background-color: var(--bs-body-bg);
}

#conversation-form .chat-input-card,
#conversation-form .alert {
  max-width: 1080px;
  margin-left: auto;
  margin-right: auto;
}

.chat-conversation .alert {
  text-align: left;
  padding: 0.5rem 1rem;
}

.chat-retry-status {
  --bs-alert-color: var(--bs-body-color);
}

@media (min-width: 768px) {
  #conversation-form {
    left: 25%;
  }
}

.chat-input-card {
  border: 1px solid var(--bs-border-color);
  border-radius: 1rem;
  background-color: var(--bs-body-bg);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  padding: 0.5rem;
}

.conversation-textarea {
  border: 0;
  box-shadow: none;
  resize: none;
  max-height: 200px;
  padding: 0.5rem 0.75rem;
  background-color: transparent;
}

.conversation-textarea:focus {
  border: 0;
  box-shadow: none;
  background-color: transparent;
}

.chat-send-btn {
  width: 2.25rem;
  height: 2.25rem;
  flex-shrink: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.chat-icon-btn {
  width: 2.25rem;
  height: 2.25rem;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.chat-icon-btn.recording {
  color: var(--bs-danger);
  border-color: var(--bs-danger);
  animation: mic-pulse 1.5s ease-in-out infinite;
}

@keyframes mic-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(var(--bs-danger-rgb), 0.4); }
  50% { box-shadow: 0 0 0 0.5rem rgba(var(--bs-danger-rgb), 0); }
}



.chat-model-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  width: 100%;
  min-width: 0;
  padding: 0.25rem 0.5rem;
}

@media (min-width: 768px) {
  .chat-model-btn {
    min-width: 18rem;
  }
}

.position-relative:has(.chat-model-btn) {
  min-width: 0;
}

.chat-model-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-model-btn svg {
  margin-left: auto;
  flex-shrink: 0;
}

.chat-context-usage {
  flex-shrink: 0;
  white-space: nowrap;
}

.chat-model-popup {
  width: 28rem;
  z-index: 1050;
}

.model-options-section {
  min-height: 3rem;
}



.chat-action-buttons {
  min-width: 10.25rem;
  justify-content: flex-end;
}

.chat-recording-timer {
  min-width: 2rem;
  text-align: right;
}

.chat-audio audio {
  width: 100%;
  max-width: 240px;
}

@media (max-width: 767.98px) {
  .chat-window {
    height: 100%;
  }

  .new-conversation-layout {
    height: auto;
    flex: 1 1 0;
    min-height: 0;
  }

  .col-md-9 {
    height: 100vh;
  }
}

.chat-conversation.shared .chat-window {
  height: auto;
}

.chat-conversation.shared .chat-scroll {
  overflow: visible;
}

.new-conversation-layout .system-prompt-section {
  max-height: 12rem;
}

.conversation-drawer-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1020;
  display: flex;
  align-items: center;
  gap: 0.75rem;

  background-color: var(--bs-body-bg);
  border-bottom: 1px solid var(--bs-border-color);
}

@media (max-width: 767.98px) {
  .user-content {
    padding-top: 3rem;
  }
}

.conversation-drawer-title {
  min-width: 0;
}

.conversation-drawer-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1040;
}

.conversation-drawer {
  background-color: var(--bs-body-bg);
}

@media (max-width: 767.98px) {
  .conversation-drawer {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1045;
    width: 85vw;
    max-width: 20rem;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
  }

  body.conversation-drawer-open {
    overflow: hidden;
  }

  body.conversation-drawer-open .conversation-drawer {
    transform: none;
    box-shadow: 0 0 1rem rgba(0, 0, 0, 0.15);
  }

  body.conversation-drawer-open .conversation-drawer-backdrop {
    display: block;
  }
}

input[readonly],
input[readonly]:focus {
  background-color: var(--bs-tertiary-bg);
  color: var(--bs-secondary-color);
  cursor: default;
  border-color: var(--bs-border-color);
  box-shadow: none;
}

@media (min-width: 768px) {
  .conversation-drawer {
    position: sticky;
    top: 0;
    height: 100vh;
  }
}

/* Conversation tree */
#conversation-list {
  border: 1px solid rgba(var(--bs-primary-rgb), 0.15);
  border-radius: var(--bs-border-radius);
  overflow-y: auto;
  min-height: 0;
}

#conversation-list .list-group-item {
  border-color: rgba(var(--bs-primary-rgb), 0.1);
}

#conversation-list .view-all-row {
  border-top: 1px solid rgba(var(--bs-primary-rgb), 0.1);
}

#conversation-list .folder {
  padding: 0;
}

.conversation-drawer .list-group-item,
.conversation-drawer .folder-header {
  padding: 0.3rem 0.5rem;
}

.new-conversation-row:hover,
.view-all-row:hover {
  background-color: rgba(var(--bs-primary-rgb), 0.08);
}

.conversation-item {
  transition: background-color 0.15s ease;
}

.conversation-item:not(.active):hover {
  background-color: rgba(var(--bs-primary-rgb), 0.08);
}

.conversation-item.active {
  border-left: 3px solid var(--bs-primary);
}

.conversation-unread {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background-color: var(--bs-danger);
  flex-shrink: 0;
}

.conversation-item.active .conversation-unread {
  display: none !important;
}

.conversation-busy {
  flex-shrink: 0;
  display: inline-flex;
}

.conversation-busy .spinner-border {
  width: 0.75rem;
  height: 0.75rem;
  border-width: 0.125em;
  color: var(--bs-primary);
}

.folder-header {
  background-color: var(--bs-tertiary-bg);
  border-bottom: 1px solid rgba(var(--bs-primary-rgb), 0.1);
  transition: background-color 0.15s ease;
}

.folder-header:hover {
  background-color: var(--bs-tertiary-bg);
}

.folder-children-collapse {
  border-left: 1px solid var(--bs-border-color);
}

.drag-handle {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  cursor: grab;
  opacity: 0;
  transition: opacity 0.1s ease;
}

.new-conversation-row:hover .drag-handle,
.folder-header:hover .drag-handle,
.conversation-item:hover .drag-handle,
.conversation-item:focus-within .drag-handle,
.folder-header:focus-within .drag-handle {
  opacity: 1;
}

.drag-handle:active {
  cursor: grabbing;
}

.conversation-menu-toggle {
  visibility: hidden;
  flex-shrink: 0;
  border: 0;
  padding: 0.25rem;
  line-height: 1;
  background: transparent;
  color: inherit;
}

.new-conversation-row:hover .conversation-menu-toggle,
.folder-header:hover .conversation-menu-toggle,
.conversation-item:hover .conversation-menu-toggle,
.conversation-item:focus-within .conversation-menu-toggle,
.folder-header:focus-within .conversation-menu-toggle,
.conversation-menu-toggle.show {
  visibility: visible;
}

.folder-chevron {
  transition: transform 0.15s ease;
}

.folder-toggle[aria-expanded='false'] .folder-chevron {
  transform: rotate(-90deg);
}

.folder > .folder-children-collapse {
  margin-left: 1.25rem;
}

.new-conversation-row .dropdown-menu,
.folder-header .dropdown-menu {
  min-width: 14rem;
}

.popover:has(#new-folder-form) {
  min-width: 18rem;
}

.sortable-ghost {
  opacity: 0.4;
}

.sortable-fallback {
  position: relative;
  z-index: 1050;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.app-container {
  max-width: 540px;
}

html:has(.user-layout) {
  scrollbar-gutter: stable;
}

.user-content {
  max-width: 1080px;
  margin: 0 auto;
  width: 100%;
}
