/* Main layout and backgrounds */
body {
  margin: 0;
  padding: 0;
  font-family: 'Poppins', sans-serif;
}
    
.app-background {
  background: linear-gradient(135deg, #E0F7FA, #FFEBEE, #FFF3E0, #E3F2FD);
  background-size: 400% 400%;
  animation: aurora 10s ease infinite;
  min-height: 100vh;
}
    
@keyframes aurora {
  0% { background-position: 0% 50% }
  50% { background-position: 100% 50% }
  100% { background-position: 0% 50% }
}

/* Glass effect and card styling */
.app-bar-shadow {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1) !important;
}
    
.glass-card {
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
  background-color: rgba(255, 255, 255, 0.5) !important;
}
    
.glass-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

/* Answer display styling */
.copy-btn {
  position: absolute;
  right: 10px;
  top: 10px;
}
    
.answer-content {
  font-size: 16px;
  line-height: 1.6;
}

.answer-content p {
  margin-bottom: 1rem;
}

.answer-content ul, 
.answer-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.answer-content li {
  margin-bottom: 0.5rem;
}
    
.source-item {
  transition: all 0.2s ease;
}
    
.source-item:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* Source link styling */
.source-link {
  color: #1976D2;
  text-decoration: none;
  transition: all 0.2s ease;
}

.source-link:hover {
  text-decoration: underline;
  opacity: 0.8;
}

.source-link:active {
  opacity: 0.6;
}

/* In dark mode, adjust link color for better contrast */
.theme--dark .source-link {
  color: #64B5F6;
}

/* Button styling */
.v-btn.v-btn--has-bg.black {
  background-color: #000 !important;
  color: #fff !important;
}

.v-btn.theme--light.v-btn--text.black {
  color: #000 !important;
}

.v-chip.black {
  background-color: #000 !important;
}

/* Conversation thread styling */
.conversation-thread {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 16px;
}

.message-container {
  display: flex;
  width: 100%;
}

.message-container.question {
  justify-content: flex-end;
}

.message-container.answer {
  justify-content: flex-start;
}

.message {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.question-bubble {
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  border-top-right-radius: 4px;
}

.answer-bubble {
  background-color: rgba(255, 255, 255, 0.7);
  color: rgba(0, 0, 0, 0.87);
  border-top-left-radius: 4px;
}

.error-bubble {
  background-color: rgba(244, 67, 54, 0.1);
  color: #f44336;
  border: 1px solid rgba(244, 67, 54, 0.3);
}

.message-header {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.question-bubble .message-header {
  border-bottom-color: rgba(255, 255, 255, 0.2);
}

.message-content {
  word-break: break-word;
}

.follow-up-container {
  margin-top: 16px;
}

.follow-up-input {
  transition: all 0.3s ease;
  border-radius: 24px;
}

.reference-badge {
  display: inline-block;
  margin-right: 8px;
  font-size: 0.8rem;
  color: #1976D2;
}

.reference-link {
  color: #1976D2;
  font-weight: 500;
  text-decoration: none;
  background-color: rgba(25, 118, 210, 0.1);
  padding: 2px 4px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.reference-link:hover {
  background-color: rgba(25, 118, 210, 0.2);
  text-decoration: none;
}

.source-highlight {
  animation: highlight-source 2s ease;
}

@keyframes highlight-source {
  0%, 100% { background-color: transparent; }
  50% { background-color: rgba(255, 235, 59, 0.3); }
}

/* Responsive adjustments */
@media (max-width: 600px) {
  .answer-content {
    font-size: 14px;
  }
  
  .v-card-title {
    font-size: 1.1rem !important;
  }
  
  .v-btn {
    font-size: 0.8rem;
  }
  
  .v-chip {
    height: 24px !important;
    font-size: 12px !important;
  }
  
  .container {
    padding: 12px !important;
  }
  
  .message {
    max-width: 90%;
  }
}

/* Transitions */
.v-card {
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.5, 1) !important;
}

.v-chip {
  transition: background-color 0.2s ease !important;
}

/* Add these styles to your existing CSS */

/* Position buttons in the answer card */
.save-btn {
  position: absolute;
  right: 45px; /* Position to the left of the copy button */
  top: 10px;
}

/* Make room for both buttons */
.copy-btn {
  right: 10px;
}

/* Style for saved answer list item hover */
.v-data-table tbody tr:hover {
  background-color: rgba(0, 0, 0, 0.03);
}

/* Transition for dialogs */
.v-dialog {
  transition: all 0.3s ease-in-out;
}

/* Saved answers bookmark button pulse effect */
@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.saved-notification {
  animation: pulse 0.5s;
}

/* Tags in saved answers */
.v-chip.v-size--x-small {
  height: 20px;
  font-size: 10px;
}

/* View dialog formatting */
.view-answer-container {
  max-height: 60vh;
  overflow-y: auto;
  padding: 16px;
  background-color: rgba(0, 0, 0, 0.02);
  border-radius: 4px;
}

/* Custom scrollbar for saved answers view */
.view-answer-container::-webkit-scrollbar {
  width: 8px;
}

.view-answer-container::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 4px;
}

.view-answer-container::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

/* Add these styles to your CSS */

/* Tag filter dropdown styling */
.tag-filter-menu {
  max-width: 320px;
}

/* Make the clear button more visible */
.v-input__icon--clear .v-icon {
  color: rgba(0, 0, 0, 0.54) !important;
}

/* Highlight matching text in search results */
.highlight-match {
  background-color: rgba(25, 118, 210, 0.1);
  font-weight: 500;
}

/* Custom tag chip styling */
.v-chip.custom-tag {
  background-color: #e0f2f1 !important;
  color: #00897b !important;
}

/* Tag filter container - more compact */
.v-select__selections {
  padding-top: 0 !important;
}

  .wysiwyg-editor-container {
    border: 1px solid rgba(0, 0, 0, 0.23);
    border-radius: 4px;
    overflow: hidden;
  }
  
  .editor-toolbar {
    display: flex;
    padding: 4px 8px;
    background-color: #f5f5f5;
    border-bottom: 1px solid rgba(0, 0, 0, 0.12);
  }
  
  .editor-content {
    min-height: 200px;
    padding: 12px 16px;
    overflow-y: auto;
    background-color: white;
    cursor: text;
  }
  
  .editor-content:focus {
    outline: none;
    border-color: #1976D2;
    box-shadow: inset 0 0 0 1px #1976D2;
  }
  
  /* Fix for editor images */
  .editor-content img {
    max-width: 100%;
    height: auto;
  }
  
  /* Fix for links in editor */
  .editor-content a {
    color: #1976D2;
    text-decoration: underline;
  }

  .output-type-toggle .v-btn {
    min-width: auto;
    padding: 0 12px;
    height: 28px;
    text-transform: none;
    font-weight: normal;
  }
  
  /* Make the button toggle more subtle to not overwhelm the UI */
  .output-type-toggle {
    background-color: rgba(0, 0, 0, 0.04);
    border-radius: 4px;
  }
  
  .output-type-toggle .v-btn--active {
    background-color: rgba(0, 0, 0, 0.12) !important;
    color: rgba(0, 0, 0, 0.87) !important;
  }

  .suggested-filters-section {
    background-color: rgba(0, 0, 0, 0.02);
    border-radius: 8px;
    padding: 16px;
  }
  
  .filter-group {
    margin-bottom: 8px;
  }
  
  .v-chip--outlined.v-chip--disabled {
    opacity: 0.5;
    pointer-events: none;
  }
  
  .suggested-filters-section .v-chip {
    transition: all 0.2s ease;
  }
  
  .suggested-filters-section .v-chip:hover:not(.v-chip--disabled) {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }
