/* ===================================
   KI History / Chat Styles
   =================================== */

/* Chat Article */
.chat-article {
  max-width: 800px;
  margin: 2rem auto;
  padding: 0 1rem;
}

/* Header */
.chat-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid #e5e7eb;
}

.chat-meta-top {
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 0.5rem;
}

.chat-breadcrumb {
  color: #6b7280;
  text-decoration: none;
  transition: color 0.2s;
}

.chat-breadcrumb:hover {
  color: #111827;
}

.chat-separator {
  margin: 0 0.5rem;
}

.chat-header h1 {
  font-size: 2rem;
  font-weight: 700;
  margin: 0.5rem 0 1rem;
  line-height: 1.3;
  color: #111827;
}

.chat-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 1rem;
}

.chat-model {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  background: #f3f4f6;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.875rem;
}

.chat-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

.tag {
  background: #e5e7eb;
  color: #374151;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  text-decoration: none;
  transition: all 0.2s;
}

.tag:hover {
  background: #d1d5db;
  color: #111827;
}

/* Chat Content */
.chat-content {
  font-size: 1rem;
  line-height: 1.7;
  color: #1f2937;
  margin-bottom: 3rem;
}

.chat-content h3 {
  font-weight: 600;
  margin: 1.5rem 0 0.5rem;
  color: #111827;
}

.chat-content p {
  margin: 1rem 0;
}

.chat-content code {
  background: #f3f4f6;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-size: 0.875em;
  font-family: 'Courier New', monospace;
}

.chat-content pre {
  background: #1f2937;
  color: #f9fafb;
  padding: 1rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}

.chat-content pre code {
  background: none;
  padding: 0;
  color: inherit;
}

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

.chat-content li {
  margin: 0.5rem 0;
}

.chat-content a {
  color: #2563eb;
  text-decoration: underline;
}

.chat-content a:hover {
  color: #1d4ed8;
}

/* Chat Response Styling */
.chatgpt-response {
  background: #f7f7f7;
  border-left: 4px solid #10a37f;
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  border-radius: 0 0.5rem 0.5rem 0;
}

.chat-message-user {
  background: #eff6ff;
  border-left: 4px solid #3b82f6;
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  border-radius: 0 0.5rem 0.5rem 0;
}

/* Sprecher-Namen hervorheben - direkt im HTML generiert */
.chat-content h3.speaker-adrachin {
  color: #2563eb;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  padding: 0.75rem 1rem 0.75rem 3rem;
  margin: 1.5rem -1rem;
  border-radius: 0.5rem;
  border-left: 4px solid #3b82f6;
  font-weight: 700;
  font-size: 1.1rem;
  position: relative;
}

.chat-content h3.speaker-adrachin:before {
  content: "👤";
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  color: #3b82f6;
}

.chat-content h3.speaker-gpt {
  color: #059669;
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  padding: 0.75rem 1rem 0.75rem 3rem;
  margin: 1.5rem -1rem;
  border-radius: 0.5rem;
  border-left: 4px solid #10a37f;
  font-weight: 700;
  font-size: 1.1rem;
  position: relative;
}

.chat-content h3.speaker-gpt:before {
  content: "🤖";
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  color: #10a37f;
}

/* Chat Footer */
.chat-footer {
  padding-top: 2rem;
  border-top: 1px solid #e5e7eb;
  margin-top: 3rem;
}

.chat-navigation {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Navigation Links */
.nav-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.nav-link {
  display: flex;
  align-items: center;
  padding: 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  text-decoration: none;
  color: #374151;
  background: white;
  transition: all 0.2s;
  min-height: 60px;
}

.nav-link:hover {
  border-color: #3b82f6;
  background: #f8fafc;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.nav-link.nav-disabled {
  color: #9ca3af;
  background: #f9fafb;
  cursor: not-allowed;
}

.nav-link.nav-disabled:hover {
  transform: none;
  box-shadow: none;
  border-color: #e5e7eb;
}

/* Navigation Arrows */
.nav-arrow {
  font-size: 1.25rem;
  font-weight: bold;
  color: #6b7280;
  margin: 0 0.75rem;
}

.nav-link:hover .nav-arrow {
  color: #3b82f6;
}

.nav-link.nav-disabled .nav-arrow {
  color: #d1d5db;
}

/* Navigation Content */
.nav-content {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.nav-label {
  font-size: 0.7rem;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
  font-weight: 600;
}

.nav-title {
  font-size: 0.75rem;
  font-weight: 400;
  color: #6b7280;
  line-height: 1.3;
  margin-top: 0.125rem;
}

.nav-link:hover .nav-title {
  color: #3b82f6;
}

.nav-link.nav-disabled .nav-title {
  color: #9ca3af;
}

/* Back Button */
.nav-back {
  text-align: center;
  padding-top: 1rem;
  border-top: 1px solid #e5e7eb;
}

.btn-back {
  display: inline-block;
  color: #6b7280;
  text-decoration: none;
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  transition: all 0.2s;
}

.btn-back:hover {
  background: #f9fafb;
  border-color: #9ca3af;
  color: #111827;
}

/* Responsive Navigation */
@media (max-width: 768px) {
  .nav-links {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  
  .nav-link {
    padding: 0.75rem;
    min-height: 50px;
  }
  
  .nav-arrow {
    margin: 0 0.5rem;
    font-size: 1rem;
  }
  
  .nav-title {
    font-size: 0.7rem;
  }
  
  .nav-label {
    font-size: 0.65rem;
  }
}

/* ===================================
   KI History Page (List View)
   =================================== */

.ki-history-page {
  max-width: 1000px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.page-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid #e5e7eb;
}

.page-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  color: #111827;
}

.page-description {
  font-size: 1.125rem;
  color: #6b7280;
  margin: 0;
}

/* Filters */
.ki-history-filters {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 2rem;
  padding: 1rem;
  background: #f9fafb;
  border-radius: 0.5rem;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filter-group label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
}

.filter-group select {
  padding: 0.5rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  background: white;
  font-size: 0.875rem;
  cursor: pointer;
}

.filter-active {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #dbeafe;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
}

.filter-clear {
  color: #3b82f6;
  text-decoration: none;
  font-weight: 600;
  margin-left: 0.25rem;
}

/* Chat List */
.chat-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.chat-preview {
  padding: 1.5rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  background: white;
  transition: all 0.2s;
}

.chat-preview:hover {
  border-color: #d1d5db;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.chat-preview header {
  margin-bottom: 0.75rem;
}

.chat-preview h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
}

.chat-preview h2 a {
  color: #111827;
  text-decoration: none;
  transition: color 0.2s;
}

.chat-preview h2 a:hover {
  color: #2563eb;
}

.chat-preview-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.875rem;
  color: #6b7280;
}

.chat-excerpt {
  margin: 0.75rem 0;
  color: #4b5563;
  line-height: 1.6;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #e5e7eb;
}

.pagination-prev,
.pagination-next {
  padding: 0.5rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  text-decoration: none;
  color: #374151;
  transition: all 0.2s;
}

.pagination-prev:hover,
.pagination-next:hover {
  background: #f9fafb;
  border-color: #9ca3af;
}

.pagination-info {
  font-size: 0.875rem;
  color: #6b7280;
}

/* No Results */
.no-results {
  text-align: center;
  padding: 3rem 1rem;
  color: #6b7280;
}

.btn-reset {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  background: #3b82f6;
  color: white;
  text-decoration: none;
  border-radius: 0.375rem;
  transition: background 0.2s;
}

.btn-reset:hover {
  background: #2563eb;
}

/* Responsive */
@media (max-width: 768px) {
  .chat-article,
  .ki-history-page {
    padding: 0 1rem;
  }
  
  .chat-header h1,
  .page-header h1 {
    font-size: 1.75rem;
  }
  
  .ki-history-filters {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .pagination {
    flex-direction: column;
    gap: 1rem;
  }
}

