/* Import Google Fonts at the top of your CSS file */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

body, #root, .App {
  margin: 0;
  height: 100vh;
  overflow: hidden;
  background: #343541;
  color: #ececf1;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.chat-container {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  height: calc(100vh - 85px);
  background: #343541;
  display: flex;
  flex-direction: column;
}

.chat-log {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  background: #343541;
}

.chat-entry {
  margin-bottom: 0;
  padding: 8px 0;
  line-height: 1.5;
  width: 100%;
  overflow-wrap: break-word;
  word-break: break-word;
}

.chat-entry.user {
  background: #343541;
}

.chat-entry.bot {
  background: #343541;
}

.chat-message {
  max-width: 800px;
  margin: 0 auto;
  color: #ececf1;
  flex: 1;
  min-width: 0;
}

.prometheus-links {
  margin-top: 16px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.link-box {
  margin: 8px 0;
  padding: 8px 12px;
  background: transparent;
  border: none;
}

.prometheus-button {
  background: #ff6b3d;
  color: white;
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.2s;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  font-weight: 400;
}

.prometheus-button:hover {
  background: #e85d33;
}

.chat-input {
  position: sticky;
  bottom: 0;
  background: #343541;
  padding: 24px;
  border-top: 1px solid #565869;
}

.chat-input input {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding: 12px;
  font-size: 16px;
  border: 1px solid #565869;
  border-radius: 6px;
  background: #40414f;
  color: #ececf1;
  box-shadow: 0 0 10px rgba(0,0,0,0.2);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 400;
}

.chat-input input::placeholder {
  color: #8e8ea0;
}

.chat-input button {
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  background: #19c37d;
  color: white;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  border: none;
  transition: background-color 0.2s;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  font-weight: 400;
}

.chat-input button:hover {
  background: #15a36b;
}

.chat-input button:disabled {
  background: #2b4a41;
  cursor: not-allowed;
}

.message-container {
  display: flex;
  gap: 24px;
  padding: 16px 24px;
  max-width: 800px;
  margin: 8px auto;
  width: calc(100% - 32px);
  box-sizing: border-box;
  border-radius: 16px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.chat-entry.user .message-container {
  background: #3a3b47;
}

.chat-entry.bot .message-container {
  background: #444654;
}

/* Subtle hover effects */
.chat-entry.user .message-container:hover {
  background: #404149;
}

.chat-entry.bot .message-container:hover {
  background: #4a4c5c;
}

.avatar {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.sender-name {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #ececf1;
}

.message-content {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  white-space: pre-wrap;
  color: #ececf1;
  overflow-wrap: break-word;
  word-break: break-word;
  width: 100%;
}

.prometheus-links {
  margin-top: 16px;
}

/* Style scrollbar for Chrome, Safari and Opera */
.chat-log::-webkit-scrollbar {
  width: 6px;
}

.chat-log::-webkit-scrollbar-track {
  background: #343541;
}

.chat-log::-webkit-scrollbar-thumb {
  background: #565869;
  border-radius: 3px;
}

/* Style scrollbar for Firefox */
.chat-log {
  scrollbar-width: thin;
  scrollbar-color: #565869 #343541;
}

/* Hide scrollbar for Chrome, Safari and Opera */
.chat-log::-webkit-scrollbar {
  display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
.chat-log {
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}

/* Ensure code blocks also wrap properly */
.message-content pre,
.message-content code {
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
}

.app-header {
  background: #343541;
  padding: 16px 24px;
  text-align: left;
  position: sticky;
  top: 0;
  z-index: 1000;
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

.app-header h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  color: #ececf1;
  font-family: 'Inter', sans-serif;
}

.app-header .tagline {
  margin: 4px 0 0 0;
  font-size: 14px;
  color: #8e8ea0;
  font-family: 'Inter', sans-serif;
}

/* Adjust chat container to account for header */
.chat-container {
  height: calc(100vh - 85px);
}

.thinking {
  display: flex;
  align-items: center;
  gap: 8px;
}

button {
  display: flex;
  align-items: center;
  gap: 8px;
}

.promql-block {
  background-color: #1a1a1a;
  border-radius: 4px;
  padding: 12px;
  margin: 8px 0;
  font-family: monospace;
  white-space: pre-wrap;
  word-break: break-all;
}

.promql-block code {
  color: #ffffff;
}
