/* Local LLM demo — tiny mind in your browser */

#llm-app {
  max-width: 720px;
  margin: 2em auto;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.llm-status-bar {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.95rem;
  margin-bottom: 16px;
  background: #f0f4f8;
  color: #334155;
  border: 1px solid #cbd5e1;
}

.llm-status-bar[data-kind="loading"] {
  background: #fef9c3;
  color: #713f12;
  border-color: #facc15;
}

.llm-status-bar[data-kind="ready"] {
  background: #ecfdf5;
  color: #065f46;
  border-color: #6ee7b7;
}

.llm-status-bar[data-kind="error"] {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fca5a5;
}

#llm-progress {
  height: 18px;
  background: #e2e8f0;
  border-radius: 9px;
  overflow: hidden;
  margin: 12px 0;
  font-size: 0.75rem;
}

#llm-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
  color: white;
  text-align: center;
  line-height: 18px;
  width: 0;
  transition: width 0.2s ease;
}

.llm-load-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

#llm-model-select {
  flex: 1;
  min-width: 240px;
  padding: 9px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: white;
  font-size: 0.95rem;
  font-family: inherit;
}
#llm-model-select:focus { outline: none; border-color: #6366f1; }
#llm-model-select:disabled { opacity: 0.5; cursor: not-allowed; }

#llm-load {
  padding: 10px 24px;
  background: #4f46e5;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

#llm-load:hover:not(:disabled) {
  background: #4338ca;
}

#llm-load:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

#llm-log {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px;
  min-height: 240px;
  max-height: 480px;
  overflow-y: auto;
  background: #fafbfc;
  margin-bottom: 12px;
  font-size: 0.95rem;
}

.llm-msg {
  margin-bottom: 12px;
  padding: 8px 12px;
  border-radius: 6px;
}

.llm-user {
  background: #eef2ff;
  border-left: 3px solid #6366f1;
}

.llm-assistant {
  background: #f0fdf4;
  border-left: 3px solid #10b981;
}

.llm-msg-role {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b7280;
  margin-bottom: 4px;
}

.llm-msg-body {
  white-space: pre-wrap;
  word-wrap: break-word;
  line-height: 1.5;
}

#llm-form {
  display: flex;
  gap: 8px;
}

#llm-input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
}

#llm-input:focus {
  outline: none;
  border-color: #6366f1;
}

#llm-send {
  padding: 10px 20px;
  background: #4f46e5;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

#llm-send:hover:not(:disabled) {
  background: #4338ca;
}

#llm-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.llm-caveat {
  margin-top: 16px;
  padding: 10px 14px;
  background: #fef9c3;
  border: 1px solid #fde047;
  border-radius: 6px;
  font-size: 0.85rem;
  color: #713f12;
}

#llm-controls {
  margin: 12px 0;
  padding: 10px 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.9rem;
}

.llm-control-row {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.llm-control-row input[type="range"] {
  flex: 1;
  max-width: 200px;
}

#llm-lambda-value {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  color: #475569;
  min-width: 3em;
}
