:root {
  --primary-color: #4285f4;
  --background-color: #f8f9fa;
  --container-bg: #ffffff;
  --text-color: #202124;
  --border-color: #dadce0;
  --sidebar-width: 280px;
  --header-height: 60px;
  --footer-height: 40px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  background-color: var(--background-color);
  color: var(--text-color);
  line-height: 1.6;
}

.app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: var(--header-height);
  padding: 0 16px;
  border-bottom: 1px solid var(--border-color);
}

header h1 {
  font-size: 1.5rem;
  color: var(--primary-color);
}

.agent-selector {
  display: flex;
  align-items: center;
  gap: 10px;
}

main {
  display: flex;
  flex: 1;
  overflow: hidden;
}

.chat-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  background-color: var(--container-bg);
  border-radius: 8px;
  margin: 16px 16px 16px 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  overflow: hidden;
}

.messages {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
}

.message {
  margin-bottom: 16px;
  padding: 12px 16px;
  border-radius: 8px;
  max-width: 80%;
}

.user-message {
  background-color: #e8f0fe;
  color: #174ea6;
  align-self: flex-end;
  margin-left: auto;
}

.agent-message {
  background-color: #f1f3f4;
  color: #3c4043;
  align-self: flex-start;
}

.input-area {
  display: flex;
  padding: 12px;
  border-top: 1px solid var(--border-color);
  gap: 8px;
}

textarea {
  flex: 1;
  padding: 10px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  resize: none;
  font-family: inherit;
}

button {
  padding: 8px 16px;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.2s;
}

button:hover {
  background-color: #3367d6;
}

button:disabled {
  background-color: #9aa0a6;
  cursor: not-allowed;
}

.sidebar {
  width: var(--sidebar-width);
  padding: 16px;
  background-color: var(--container-bg);
  border-radius: 8px;
  margin: 16px 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  overflow-y: auto;
}

.sidebar h3 {
  margin-bottom: 12px;
  font-size: 1rem;
  color: var(--primary-color);
}

.session-info, .agent-info {
  margin-bottom: 24px;
}

#agent-details, #session-details {
  margin-bottom: 16px;
  font-size: 0.9rem;
}

footer {
  display: flex;
  justify-content: center;
  align-items: center;
  height: var(--footer-height);
  border-top: 1px solid var(--border-color);
  font-size: 0.8rem;
  color: #5f6368;
}

select {
  padding: 8px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background-color: white;
}

/* Loading indicator */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 8px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  main {
    flex-direction: column;
  }
  
  .sidebar {
    width: 100%;
    margin: 0 0 16px 0;
  }
  
  .chat-container {
    margin: 16px 0;
  }
}

.system-message {
  background-color: #f8d7da;
  color: #721c24;
  border-left: 4px solid #f5c6cb;
  align-self: center;
  margin: 8px auto;
  font-style: italic;
} 