/* Custom styles for Guru Granth Sahib RAG Assistant */

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f8f9fa;
}

.navbar-brand {
  font-weight: bold;
  font-size: 1.3rem;
}

.gurmukhi-text {
  font-family: "Noto Sans Gurmukhi", "Raavi", Arial, sans-serif;
  font-size: 1.1rem;
  line-height: 1.6;
  text-align: right;
  direction: rtl;
}

.english-text {
  font-size: 1rem;
  line-height: 1.5;
  color: #495057;
}

.result-card {
  border-left: 4px solid #007bff;
  transition: all 0.3s ease;
}

.result-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.similarity-badge {
  font-size: 0.8rem;
}

.citation-info {
  font-size: 0.9rem;
  color: #6c757d;
}

.tag-badge {
  margin: 2px;
  font-size: 0.8rem;
}

.example-query {
  text-decoration: none;
  color: #007bff;
  cursor: pointer;
}

.example-query:hover {
  text-decoration: underline;
}

.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #007bff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.no-results {
  text-align: center;
  color: #6c757d;
  margin: 40px 0;
}

.result-metadata {
  background-color: #f8f9fa;
  border-radius: 5px;
  padding: 10px;
  margin: 10px 0;
  font-size: 0.9rem;
}

.gurmukhi-line {
  margin: 5px 0;
  padding: 5px;
  background-color: #fff;
  border-left: 3px solid #28a745;
  border-radius: 3px;
}

.english-line {
  margin: 5px 0;
  padding: 5px;
  background-color: #fff;
  border-left: 3px solid #17a2b8;
  border-radius: 3px;
}

.search-form {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 10px;
  padding: 20px;
  color: white;
}

.search-form .form-control,
.search-form .form-select {
  border-radius: 8px;
  border: 1px solid #dee2e6;
}

.form-control::placeholder {
  color: #9ca3af;
  opacity: 0.7;
}

.form-control:focus::placeholder {
  opacity: 0;
}

.search-form .form-label {
  font-weight: 600;
  margin-bottom: 8px;
}

.btn-search {
  background: linear-gradient(45deg, #28a745, #20c997);
  border: none;
  border-radius: 25px;
  padding: 12px 30px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s ease;
}

.btn-search:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(40, 167, 69, 0.3);
}

.stats-card {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  margin: 10px 0;
}

.stats-number {
  font-size: 2.5rem;
  font-weight: bold;
  margin-bottom: 10px;
}

.stats-label {
  font-size: 1.1rem;
  opacity: 0.9;
}

footer {
  margin-top: 50px;
  border-top: 1px solid #dee2e6;
}

/* RAG-specific styles */
.ai-answer-card {
  border-left: 4px solid #007bff;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.ai-answer-card .card-header {
  background-color: rgba(0, 0, 0, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.ai-answer-content {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 1rem;
  padding: 1rem;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
}

.ai-answer-content h4 {
  color: #ffffff;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  font-size: 1.2rem;
  font-weight: 600;
  border-bottom: 2px solid rgba(255, 255, 255, 0.3);
  padding-bottom: 0.5rem;
}

.ai-answer-content h4:first-child {
  margin-top: 0;
}

.ai-answer-content p {
  margin-bottom: 1rem;
  color: rgba(255, 255, 255, 0.95);
}

.ai-answer-content blockquote {
  border-left: 4px solid rgba(255, 255, 255, 0.4);
  padding-left: 1rem;
  margin: 1rem 0;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  padding: 0.75rem 1rem;
  font-style: italic;
}

.ai-answer-content ul {
  margin-bottom: 1rem;
  padding-left: 2rem;
}

.ai-answer-content li {
  margin-bottom: 0.5rem;
  color: rgba(255, 255, 255, 0.95);
}

.ai-answer-content strong {
  color: #ffffff;
  font-weight: 600;
}

.ai-answer-content em {
  color: rgba(255, 255, 255, 0.9);
  font-style: italic;
}

.sources-card {
  border-left: 4px solid #28a745;
}

.sources-card .btn-link {
  color: #495057;
  text-decoration: none;
  width: 100%;
  text-align: left;
  padding: 0;
}

.sources-card .btn-link:hover {
  color: #007bff;
}

.source-card {
  border-left: 3px solid #6c757d;
  margin-bottom: 1rem;
}

.source-card .card-header {
  background-color: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
  padding: 0.5rem 1rem;
}

.source-metadata {
  background-color: #f8f9fa;
  border-radius: 5px;
  padding: 10px;
  margin-bottom: 10px;
  font-size: 0.9rem;
}

.rag-toggle {
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 1rem;
  margin-top: 1rem;
}

.form-check-input:checked {
  background-color: #007bff;
  border-color: #007bff;
}

.form-check-label {
  font-weight: 500;
}

.form-text {
  font-size: 0.875rem;
  color: #6c757d;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .ai-answer-content {
    font-size: 1rem;
    padding: 0.75rem;
  }

  .source-card .card-header {
    padding: 0.5rem;
  }

  .source-card .card-body {
    padding: 0.75rem;
  }
}
