/* Elementor-Überschreibungen verhindern */
.elementor .synnio-delete-button,
.elementor-widget .synnio-delete-button,
[data-elementor-type] .synnio-delete-button {
  background-color: #F09008 !important;
  border-radius: 50% !important;
}

.elementor .synnio-delete-button svg,
.elementor-widget .synnio-delete-button svg,
[data-elementor-type] .synnio-delete-button svg {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
}/* Synnio ChatKit Styles - Version 2.0.0 */
/* CI-Farben: #0E2A3F (Dunkelblau) und #F09008 (Orange) */

* {
  box-sizing: border-box;
}

/* Main Container */
.synnio-chat-container {
  max-width: 100%;
  margin: 0 auto;
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(14, 42, 63, 0.15);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif !important;
}

/* Header */
.synnio-chat-header {
  background: linear-gradient(135deg, #0E2A3F 0%, #1a3a52 100%);
  color: white;
  padding: 20px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  z-index: 10;
}

.synnio-header-title {
  display: flex;
  align-items: center;
  gap: 15px;
}

.synnio-header-title h1 {
  font-size: 25px !important; /* Vergrößert auf 25px */
  font-weight: 600;
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif !important;
}

.synnio-status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(255,255,255,0.1);
  border-radius: 20px;
  font-size: 14px;
}

.synnio-status-dot {
  width: 8px;
  height: 8px;
  background: #4ade80;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.synnio-vector-info {
  font-size: 14px;
  opacity: 0.8;
}

/* Main Layout */
.synnio-chat-main {
  display: flex;
  flex: 1;
  height: calc(100% - 80px);
  overflow: hidden;
}

/* Chat Section */
.synnio-chat-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  border-right: 1px solid #e5e7eb;
  background: linear-gradient(to bottom, #ffffff 0%, #f9fafb 100%);
  position: relative;
}

.synnio-chatkit-wrapper {
  flex: 1;
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

#synnio-chatkit {
  display: block;
  width: 100%;
  height: 100%;
}

/* Loading State */
.synnio-chatkit-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #6b7280;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif !important;
  font-size: 14px;
  animation: pulse-loading 2s ease-in-out infinite;
}

@keyframes pulse-loading {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* Document Section */
.synnio-document-section {
  width: 380px;
  background: #f9fafb;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.synnio-document-header {
  padding: 25px;
  border-bottom: 1px solid #e5e7eb;
  background: white;
}

.synnio-document-header h2 {
  font-size: 20px !important; /* Vergrößert auf 20px */
  color: #0E2A3F;
  margin: 0 0 5px 0;
  font-weight: 600;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif !important;
}

.synnio-document-header p {
  font-size: 13px;
  color: #6b7280;
  margin: 0;
}

/* Upload Section */
.synnio-upload-section {
  padding: 25px;
  background: white;
  position: relative;
}

.synnio-upload-area {
  border: 2px dashed #cbd5e1;
  border-radius: 12px;
  padding: 30px 20px;
  text-align: center;
  background: white;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
}

.synnio-upload-area:hover:not(.uploading) {
  border-color: #F09008;
  background: rgba(240, 144, 8, 0.02);
}

.synnio-upload-area.dragover {
  border-color: #F09008;
  background: rgba(240, 144, 8, 0.05);
  transform: scale(1.02);
}

.synnio-upload-area.uploading {
  cursor: not-allowed;
  opacity: 0.9;
}

.synnio-upload-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 15px;
  background: linear-gradient(135deg, #F09008 0%, #ff7c00 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.synnio-upload-text {
  color: #374151;
  font-weight: 600;
  margin: 0 0 5px 0;
  font-size: 15px;
}

.synnio-upload-subtext {
  color: #6b7280;
  font-size: 13px;
  margin: 0;
}

.synnio-file-input {
  display: none;
}

/* Upload Progress */
.synnio-upload-progress {
  padding: 20px;
  text-align: center;
}

.synnio-spinner {
  width: 40px;
  height: 40px;
  margin: 0 auto 15px;
  border: 3px solid #e5e7eb;
  border-top-color: #F09008;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Documents List */
.synnio-documents-list {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  background: #f9fafb;
}

.synnio-documents-list h3 {
  font-size: 20px !important; /* Vergrößert auf 20px */
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 15px 0;
  font-weight: 600;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif !important;
}

.synnio-documents-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.synnio-no-documents {
  text-align: center;
  color: #9ca3af;
  font-size: 14px;
  padding: 40px 20px;
  background: white;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
}

.synnio-document-item {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.3s ease;
  animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.synnio-document-item:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transform: translateX(-2px);
}

.synnio-document-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.synnio-document-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #0E2A3F 0%, #1a3a52 100%);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
  flex-shrink: 0;
}

.synnio-document-details {
  flex: 1;
}

.synnio-document-name {
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 2px 0;
  font-size: 14px;
  word-break: break-word;
}

.synnio-document-size {
  font-size: 12px;
  color: #6b7280;
  margin: 0;
}

.synnio-delete-button {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  min-height: 36px !important;
  background: #F09008 !important; /* Orange Hintergrund */
  background-color: #F09008 !important;
  border: none !important;
  border-radius: 50% !important; /* Vollständig rund */
  color: #0E2A3F !important; /* Blaues Icon */
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  padding: 0 !important;
  position: relative !important;
  overflow: visible !important;
}

.synnio-delete-button:hover {
  background: #ff7c00 !important; /* Dunkleres Orange beim Hover */
  background-color: #ff7c00 !important;
  transform: scale(1.1) !important;
  box-shadow: 0 4px 12px rgba(240, 144, 8, 0.3) !important;
}

.synnio-delete-button svg {
  width: 20px !important;
  height: 20px !important;
  stroke-width: 2 !important;
  stroke: #0E2A3F !important; /* Explizit blaue Farbe für das Icon */
  fill: none !important;
  display: block !important;
  pointer-events: none !important;
}

/* Fallback für Mülltonen-Icon mit Unicode */
.synnio-delete-button::before {
  content: "🗑" !important;
  font-size: 18px !important;
  color: #0E2A3F !important;
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  display: none !important; /* Wird nur angezeigt wenn SVG fehlt */
}

.synnio-delete-button:not(:has(svg))::before {
  display: block !important;
}

/* Success Message */
.synnio-success-message {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: #10b981;
  color: white;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
  animation: slideDown 0.3s ease;
  z-index: 100;
}

@keyframes slideDown {
  from {
    transform: translate(-50%, -100%);
    opacity: 0;
  }
  to {
    transform: translate(-50%, 0);
    opacity: 1;
  }
}

/* Error State */
.synnio-chatkit-error {
  padding: 20px;
  margin: 20px;
  border: 1px solid #ef4444;
  background: #fff1f2;
  color: #b91c1c;
  border-radius: 8px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif !important;
  line-height: 1.5;
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    transform: translateY(-10px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.synnio-chatkit-error strong {
  display: block;
  margin-bottom: 8px;
  font-size: 16px;
  color: #991b1b;
}

/* Scrollbar Styling */
.synnio-documents-list::-webkit-scrollbar {
  width: 6px;
}

.synnio-documents-list::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.synnio-documents-list::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
  transition: background 0.3s;
}

.synnio-documents-list::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .synnio-document-section {
    width: 320px;
  }
  
  .synnio-chat-header h1 {
    font-size: 20px !important; /* Proportional kleiner auf Tablets */
  }
  
  .synnio-vector-info {
    display: none;
  }
}

@media (max-width: 768px) {
  .synnio-chat-container {
    border-radius: 0;
    height: 100vh;
  }
  
  .synnio-chat-main {
    flex-direction: column;
  }
  
  .synnio-chat-section {
    border-right: none;
    border-bottom: 1px solid #e5e7eb;
    min-height: 50vh;
  }
  
  .synnio-document-section {
    width: 100%;
    height: auto;
    max-height: 50vh;
  }
  
  .synnio-chat-header {
    padding: 15px 20px;
  }
  
  .synnio-header-title {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  
  .synnio-header-title h1 {
    font-size: 18px !important; /* Proportional kleiner auf Mobilgeräten */
  }
  
  .synnio-document-header h2 {
    font-size: 16px !important; /* Proportional kleiner */
  }
  
  .synnio-documents-list h3 {
    font-size: 16px !important; /* Proportional kleiner */
  }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  .synnio-chat-container {
    background: #1f2937;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  }
  
  .synnio-document-section,
  .synnio-documents-list {
    background: #1f2937;
  }
  
  .synnio-document-header,
  .synnio-upload-section {
    background: #111827;
  }
  
  .synnio-document-header h2 {
    color: #f3f4f6;
  }
  
  .synnio-upload-area {
    background: #1f2937;
    border-color: #4b5563;
  }
  
  .synnio-upload-text {
    color: #f3f4f6;
  }
  
  .synnio-document-item,
  .synnio-no-documents {
    background: #111827;
    border-color: #374151;
  }
  
  .synnio-document-name {
    color: #f3f4f6;
  }
  
  .synnio-chatkit-loading {
    color: #e5e7eb;
  }
  
  /* Löschbutton bleibt auch im Dark Mode orange/blau */
  .synnio-delete-button {
    background: #F09008 !important;
    background-color: #F09008 !important;
  }
  
  .synnio-delete-button svg {
    stroke: #0E2A3F !important;
  }
  
  .synnio-delete-button:hover {
    background: #ff7c00 !important;
    background-color: #ff7c00 !important;
  }
}

/* Zusätzliche Spezifität für Elementor-Überschreibungen */
.synnio-chat-container .synnio-delete-button,
.synnio-document-item .synnio-delete-button,
body .synnio-delete-button {
  width: 36px !important;
  height: 36px !important;
  background-color: #F09008 !important;
  border-radius: 50% !important;
  border: 2px solid #F09008 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* SVG im Löschbutton sichtbar machen */
.synnio-delete-button svg,
.synnio-document-item .synnio-delete-button svg,
body .synnio-delete-button svg {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  width: 20px !important;
  height: 20px !important;
  max-width: 20px !important;
  max-height: 20px !important;
}

.synnio-delete-button svg path,
.synnio-delete-button svg line,
.synnio-delete-button svg polyline {
  stroke: #0E2A3F !important;
  fill: none !important;
  stroke-width: 2 !important;
}

/* Font Awesome Alternative falls vorhanden */
.synnio-delete-button .fa-trash,
.synnio-delete-button .fa-trash-alt,
.synnio-delete-button .fas {
  color: #0E2A3F !important;
  font-size: 16px !important;
}

/* Elementor-Überschreibungen verhindern */
.elementor .synnio-delete-button,
.elementor-widget .synnio-delete-button,
[data-elementor-type] .synnio-delete-button {
  background-color: #F09008 !important;
  border-radius: 50% !important;
}

.elementor .synnio-delete-button svg,
.elementor-widget .synnio-delete-button svg,
[data-elementor-type] .synnio-delete-button svg {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
}