.chat-bubble {
  display: flex;
  margin-bottom: 1.5rem;
  animation: fadeIn 0.3s ease-in-out;
}

.user-bubble {
  justify-content: flex-end;
}

.message-content {
  display: flex;
  gap: 12px;
  max-width: 80%;
  align-items: flex-start;
}

.user-avatar, .avatar {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.875rem;
}

.user-avatar {
  background-color: #e0f2fe;
  color: #0284c7;
}

.avatar {
  background-color: #f0f9ff;
  color: #0369a1;
}

.message-body {
  flex-grow: 1;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  line-height: 1.5;
  font-size: 0.9375rem;
  background-color: #f8fafc;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.user-bubble .message-body {
  background-color: #eff6ff;
  color: #1e40af;
  border-bottom-right-radius: 0;
}

.assistant-bubble .message-body {
  background-color: #f8fafc;
  color: #0f172a;
  border-bottom-left-radius: 0;
}

/* Code block styling */
.code-block {
  margin: 0.75rem 0;
  overflow: hidden;
  border-radius: 0.375rem;
  background-color: #1e293b;
}

.code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1rem;
  background-color: #0f172a;
  color: #e2e8f0;
  font-family: monospace;
  font-size: 0.75rem;
}

.code-language {
  text-transform: uppercase;
  font-weight: 500;
}

.copy-button {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  cursor: pointer;
  transition: all 0.2s;
}

.copy-button:hover {
  color: #e2e8f0;
  background-color: rgba(255, 255, 255, 0.1);
}

/* Make sure the SyntaxHighlighter content is readable */
.code-block pre {
  margin: 0 !important;
  padding: 1rem !important;
  font-size: 0.875rem !important;
  line-height: 1.5 !important;
  overflow-x: auto !important;
}

/* Basic markdown styling */
.message-content p {
  margin: 0 0 0.75rem 0;
}

.message-content p:last-child {
  margin-bottom: 0;
}

.message-content a {
  color: #2563eb;
  text-decoration: none;
}

.message-content a:hover {
  text-decoration: underline;
}

.message-content code {
  font-family: monospace;
  background-color: rgba(0, 0, 0, 0.05);
  padding: 0.125rem 0.25rem;
  border-radius: 0.25rem;
  font-size: 0.875em;
}

.message-content ul, .message-content ol {
  margin: 0.75rem 0;
  padding-left: 1.5rem;
}

.message-content li {
  margin-bottom: 0.25rem;
}

/* Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.main-content .chat-bubble .confirmation-buttons {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
  justify-content: flex-start;
  width: 100%;
}

.main-content .chat-bubble .confirmation-buttons button {
  position: relative;
  min-width: 100px;
  padding: 0.625rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: all 0.2s ease;
  cursor: pointer;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: inherit;
}

.main-content .chat-bubble .confirmation-buttons .confirm-button {
  background: linear-gradient(to right, #0ea5e9, #0284c7);
  color: white;
  box-shadow: 0 2px 4px rgba(14, 165, 233, 0.2);
}

.main-content .chat-bubble .confirmation-buttons .confirm-button:hover {
  background: linear-gradient(to right, #0284c7, #0369a1);
  box-shadow: 0 4px 6px rgba(14, 165, 233, 0.3);
  transform: translateY(-1px);
}

.main-content .chat-bubble .confirmation-buttons .cancel-button {
  background: #f1f5f9;
  color: #334155;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  border: 1px solid #e2e8f0;
}

.main-content .chat-bubble .confirmation-buttons .cancel-button:hover {
  background: #e2e8f0;
  color: #1e293b;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

.main-content .chat-bubble .confirmation-buttons button:active {
  transform: translateY(0);
  transition-duration: 0.1s;
}

.main-content .chat-bubble .confirmation-buttons button:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.3);
}

.main-content .chat-bubble .confirmation-buttons button svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.main-content .chat-bubble .confirmation-buttons button span {
  font-weight: 500;
  line-height: 1.25;
}

.main-content .chat-bubble .confirmation-buttons .confirm-button svg {
  color: rgba(255, 255, 255, 0.9);
}

.main-content .chat-bubble .confirmation-buttons .cancel-button svg {
  color: #64748b;
}

.timestamp {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 0.5rem;
}

.plan-output {
  margin: 1rem 0;
  padding: 1rem;
  background-color: #f1f5f9;
  border-radius: 0.5rem;
  border: 1px solid #e2e8f0;
  font-family: monospace;
  font-size: 0.875rem;
  line-height: 1.5;
  white-space: pre;
  overflow-x: auto;
  max-width: 100%;
}

.plan-output code {
  background-color: rgba(0, 0, 0, 0.05);
  padding: 0.125rem 0.25rem;
  border-radius: 0.25rem;
}

.markdown-content {
  overflow-x: auto;
  max-width: 100%;
}

.markdown-content > * {
  white-space: pre-wrap;
  word-break: break-word;
}

.markdown-content pre {
  white-space: pre;
  overflow-x: auto;
  max-width: 100%;
}

.confirmation-container {
  display: flex;
  flex-direction: column;
  margin-bottom: 1rem;
  border-radius: 0.75rem;
  background-color: #f8fafc;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  width: 100%;
}

.confirmation-sidebar {
  padding: 1rem;
  background-color: #f0f9ff;
  border-radius: 0.75rem;
  border: 1px solid rgba(14, 165, 233, 0.1);
}

.confirmation-header {
  margin-bottom: 1rem;
}

.confirmation-header h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #0c4a6e;
  margin: 0 0 0.5rem 0;
}

.confirmation-question {
  font-size: 0.9375rem;
  color: #334155;
  margin: 0;
  line-height: 1.5;
}

.confirmation-buttons {
  display: flex !important;
  gap: 1rem !important;
  margin-top: 1.5rem !important;
  justify-content: flex-start !important;
  width: 100% !important;
}

.confirmation-buttons button {
  position: relative !important;
  min-width: 120px !important;
  padding: 0.75rem 1.25rem !important;
  border-radius: 8px !important;
  font-size: 0.9375rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.01em !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  cursor: pointer !important;
  border: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.5rem !important;
  font-family: inherit !important;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
  background-color: transparent !important;
}

.confirmation-buttons .confirm-button {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8) !important;
  color: white !important;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3) !important;
}

.confirmation-buttons .confirm-button:hover {
  background: linear-gradient(135deg, #2563eb, #1e40af) !important;
  box-shadow: 0 6px 15px rgba(59, 130, 246, 0.4) !important;
  transform: translateY(-2px) !important;
}

.confirmation-buttons .cancel-button {
  background: #f8fafc !important;
  color: #334155 !important;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05) !important;
  border: 1px solid #e2e8f0 !important;
}

.confirmation-buttons .cancel-button:hover {
  background: #f1f5f9 !important;
  color: #0f172a !important;
  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.1) !important;
  transform: translateY(-2px) !important;
}

.confirmation-buttons button:active {
  transform: translateY(0) !important;
  transition-duration: 0.1s !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

.confirmation-buttons button:focus {
  outline: none !important;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(59, 130, 246, 0.4) !important;
}

.confirmation-buttons button svg {
  width: 20px !important;
  height: 20px !important;
  stroke-width: 2 !important;
  flex-shrink: 0 !important;
  display: inline-block !important;
}

.confirmation-buttons button span {
  font-weight: 600 !important;
  line-height: 1.25 !important;
  display: inline !important;
  white-space: nowrap !important;
}

/* Message confirmation popup styling */
.message-confirmation {
  background: #ffffff;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(226, 232, 240, 0.8);
  margin-top: 1.5rem;
  margin-bottom: 1rem;
  width: 100%;
}

.confirmation-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.75rem 0;
  letter-spacing: -0.01em;
}

.confirmation-question {
  font-size: 1rem;
  color: #475569;
  margin: 0 0 1.5rem 0;
  line-height: 1.6;
}

.confirmation-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  justify-content: flex-start;
  width: 100%;
}

/* Base button styles */
.confirmation-buttons button {
  position: relative;
  min-width: 120px;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: all 0.2s ease;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: inherit;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  text-align: center;
  border: none;
  outline: none;
}

/* Confirm button - modern style */
.confirmation-buttons .confirm-button {
  background-color: #2563eb;
  color: white;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.confirmation-buttons .confirm-button:hover {
  background-color: #1d4ed8;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
  transform: translateY(-1px);
}

/* Cancel button - clean minimal style */
.confirmation-buttons .cancel-button {
  background-color: #f1f5f9;
  color: #334155;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  border: 1px solid #e2e8f0;
}

.confirmation-buttons .cancel-button:hover {
  background-color: #e2e8f0;
  color: #1e293b;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}

/* Active state for both buttons */
.confirmation-buttons button:active {
  transform: translateY(1px);
  transition-duration: 0.1s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Focus state for accessibility */
.confirmation-buttons button:focus-visible {
  outline: 2px solid rgba(59, 130, 246, 0.5);
  outline-offset: 2px;
}

/* SVG icon styling */
.confirmation-buttons button svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Text styling */
.confirmation-buttons button span {
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
}

/* Fix for Tailwind classes that might be affecting the buttons */
.confirmation-buttons button svg.w-5,
.confirmation-buttons button svg.h-5 {
  width: 18px;
  height: 18px;
}

/* Specific overrides for nested selectors */
.chat-bubble .confirmation-buttons,
.message-body .confirmation-buttons,
.main-content .chat-bubble .confirmation-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  justify-content: flex-start;
  width: 100%;
}

.chat-bubble .confirmation-buttons button,
.message-body .confirmation-buttons button,
.main-content .chat-bubble .confirmation-buttons button {
  position: relative;
  min-width: 120px;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: all 0.2s ease;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: inherit;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  text-align: center;
  border: none;
  outline: none;
}

.chat-bubble .confirmation-buttons .confirm-button,
.message-body .confirmation-buttons .confirm-button,
.main-content .chat-bubble .confirmation-buttons .confirm-button {
  background-color: #2563eb;
  color: white;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.chat-bubble .confirmation-buttons .confirm-button:hover,
.message-body .confirmation-buttons .confirm-button:hover,
.main-content .chat-bubble .confirmation-buttons .confirm-button:hover {
  background-color: #1d4ed8;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
  transform: translateY(-1px);
}

.chat-bubble .confirmation-buttons .cancel-button,
.message-body .confirmation-buttons .cancel-button,
.main-content .chat-bubble .confirmation-buttons .cancel-button {
  background-color: #f1f5f9;
  color: #334155;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  border: 1px solid #e2e8f0;
}

.chat-bubble .confirmation-buttons .cancel-button:hover,
.message-body .confirmation-buttons .cancel-button:hover,
.main-content .chat-bubble .confirmation-buttons .cancel-button:hover {
  background-color: #e2e8f0;
  color: #1e293b;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}

.chat-bubble .confirmation-buttons button:active,
.message-body .confirmation-buttons button:active,
.main-content .chat-bubble .confirmation-buttons button:active {
  transform: translateY(1px);
  transition-duration: 0.1s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.chat-bubble .confirmation-buttons button svg,
.message-body .confirmation-buttons button svg,
.main-content .chat-bubble .confirmation-buttons button svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.chat-bubble .confirmation-buttons button span,
.message-body .confirmation-buttons button span,
.main-content .chat-bubble .confirmation-buttons button span {
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
}

/* Ensure buttons don't have any unwanted styles from other CSS */
button.confirm-button,
button.cancel-button {
  appearance: none;
  -webkit-appearance: none;
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .confirmation-buttons {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .confirmation-buttons button {
    width: 100%;
  }
}