/* ============================================
   UNIFIED BOOK BUTTONS
   Einheitliches Design für alle Buchseiten
   ============================================ */

/* Container für Kaufbereich */
.book-purchase-section {
  margin: 2rem 0 !important;
}

.book-purchase-section .section-title {
  font-size: 1.25rem !important;
  font-weight: 700 !important;
  color: #1e293b !important;
  margin: 0 0 1rem 0 !important;
}

/* Format Badge (E-Book, Taschenbuch, etc.) */
.book-purchase-section .format-badge {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.25rem !important;
  padding: 0.375rem 0.875rem !important;
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%) !important;
  color: #1976d2 !important;
  border-radius: 20px !important;
  font-size: 0.875rem !important;
  font-weight: 600 !important;
  margin-bottom: 1.25rem !important;
  border: 1px solid #90caf9 !important;
}

/* Haupt-Button-Container - Spezifischer Selektor */
.book-purchase-section .book-links {
  display: flex !important;
  flex-direction: column !important;
  gap: 0.75rem !important;
  margin: 0 !important;
}

/* Base Button Style - Spezifischer Selektor */
.book-purchase-section .book-links a {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.5rem !important;
  padding: 0.875rem 1.5rem !important;
  font-weight: 600 !important;
  font-size: 1rem !important;
  text-decoration: none !important;
  border-radius: 8px !important;
  transition: all 0.3s ease !important;
  cursor: pointer !important;
  border: 2px solid transparent !important;
}

/* Amazon DE Button - Primary CTA (Orange) */
.book-purchase-section .amazon-button,
.book-purchase-section .btn-amazon-de,
.book-purchase-section .book-links .amazon-button,
.book-purchase-section .book-links .btn-amazon-de {
  background: linear-gradient(135deg, #FF9900 0%, #FFB84D 100%) !important;
  color: #131921 !important;
  font-weight: 700 !important;
  font-size: 1.05rem !important;
  box-shadow: 0 4px 12px rgba(255, 153, 0, 0.25) !important;
}

.book-purchase-section .amazon-button:hover,
.book-purchase-section .btn-amazon-de:hover,
.book-purchase-section .book-links .amazon-button:hover,
.book-purchase-section .book-links .btn-amazon-de:hover {
  background: linear-gradient(135deg, #E68900 0%, #FFA31A 100%) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 16px rgba(255, 153, 0, 0.35) !important;
}

/* Amazon US Button - Secondary (Outline) */
.book-purchase-section .btn-amazon-us,
.book-purchase-section .book-links .btn-amazon-us {
  background: white !important;
  color: #131921 !important;
  border: 2px solid #FF9900 !important;
  font-weight: 600 !important;
}

.book-purchase-section .btn-amazon-us:hover,
.book-purchase-section .book-links .btn-amazon-us:hover {
  background: #FFF8E6 !important;
  border-color: #E68900 !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 12px rgba(255, 153, 0, 0.15) !important;
}

/* Weitere Optionen Label */
.book-purchase-section .purchase-section-label {
  font-size: 0.875rem !important;
  color: #64748b !important;
  font-weight: 600 !important;
  margin: 1rem 0 0.5rem 0 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
}

/* Apple Books Button - Tertiary */
.book-purchase-section .btn-apple-books,
.book-purchase-section .book-links .btn-apple-books {
  background: white !important;
  color: #000 !important;
  border: 2px solid #000 !important;
  font-weight: 600 !important;
}

.book-purchase-section .btn-apple-books:hover,
.book-purchase-section .book-links .btn-apple-books:hover {
  background: #000 !important;
  color: white !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
}

/* Books2Read Button - Tertiary */
.book-purchase-section .btn-books2read,
.book-purchase-section .book-links .btn-books2read {
  background: white !important;
  color: #4A90E2 !important;
  border: 2px solid #4A90E2 !important;
  font-weight: 600 !important;
}

.book-purchase-section .btn-books2read:hover,
.book-purchase-section .book-links .btn-books2read:hover {
  background: #4A90E2 !important;
  color: white !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 12px rgba(74, 144, 226, 0.25) !important;
}

/* Google Play Books Button */
.book-purchase-section .btn-google-play,
.book-purchase-section .book-links .btn-google-play {
  background: white !important;
  color: #01875F !important;
  border: 2px solid #01875F !important;
  font-weight: 600 !important;
}

.book-purchase-section .btn-google-play:hover,
.book-purchase-section .book-links .btn-google-play:hover {
  background: #01875F !important;
  color: white !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 12px rgba(1, 135, 95, 0.25) !important;
}

/* Apple Audiobook Button */
.book-purchase-section .btn-apple-audiobook,
.book-purchase-section .book-links .btn-apple-audiobook {
  background: white !important;
  color: #FC3C44 !important;
  border: 2px solid #FC3C44 !important;
  font-weight: 600 !important;
}

.book-purchase-section .btn-apple-audiobook:hover,
.book-purchase-section .book-links .btn-apple-audiobook:hover {
  background: #FC3C44 !important;
  color: white !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 12px rgba(252, 60, 68, 0.25) !important;
}

/* Audiobook Button */
.book-purchase-section .btn-audiobook,
.book-purchase-section .book-links .btn-audiobook {
  background: white !important;
  color: #9C27B0 !important;
  border: 2px solid #9C27B0 !important;
  font-weight: 600 !important;
}

.book-purchase-section .btn-audiobook:hover,
.book-purchase-section .book-links .btn-audiobook:hover {
  background: #9C27B0 !important;
  color: white !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 12px rgba(156, 39, 176, 0.25) !important;
}

/* Trust Signals */
.book-purchase-section .trust-signals {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 1rem !important;
  margin-top: 1.5rem !important;
  padding-top: 1.5rem !important;
  border-top: 1px solid #e2e8f0 !important;
  font-size: 0.875rem !important;
  color: #64748b !important;
}

.book-purchase-section .trust-signal {
  display: flex !important;
  align-items: center !important;
  gap: 0.375rem !important;
}

.book-purchase-section .trust-signal::before {
  content: '✓' !important;
  color: #4CAF50 !important;
  font-weight: bold !important;
  font-size: 1rem !important;
}

/* Verstecke spezifische Trust Signals je nach Format */
.book-purchase-section .trust-signals.ebook .trust-signal-shipping {
  display: none !important;
}

.book-purchase-section .trust-signals.paperback .trust-signal-instant {
  display: none !important;
}

/* Responsive Design */
@media (max-width: 768px) {
  .book-purchase-section .book-links {
    gap: 0.625rem !important;
  }

  .book-purchase-section .book-links a {
    padding: 0.75rem 1.25rem !important;
    font-size: 0.95rem !important;
  }

  .book-purchase-section .amazon-button,
  .book-purchase-section .btn-amazon-de {
    font-size: 1rem !important;
  }

  .book-purchase-section .trust-signals {
    flex-direction: column !important;
    gap: 0.625rem !important;
  }

  .book-purchase-section {
    margin: 1.5rem 0 !important;
  }
}

@media (max-width: 480px) {
  .book-purchase-section .book-links a {
    padding: 0.625rem 1rem !important;
    font-size: 0.875rem !important;
  }

  .book-purchase-section .amazon-button,
  .book-purchase-section .btn-amazon-de {
    font-size: 0.95rem !important;
  }

  .book-purchase-section .format-badge {
    font-size: 0.8125rem !important;
    padding: 0.3125rem 0.75rem !important;
  }

  .book-purchase-section .section-title {
    font-size: 1.125rem !important;
  }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  .book-purchase-section .section-title {
    color: #f1f5f9 !important;
  }

  .book-purchase-section .format-badge {
    background: linear-gradient(135deg, #1e3a5f 0%, #2c5282 100%) !important;
    color: #90caf9 !important;
    border-color: #3b82f6 !important;
  }

  .book-purchase-section .purchase-section-label {
    color: #94a3b8 !important;
  }

  .book-purchase-section .trust-signals {
    border-top-color: #334155 !important;
    color: #94a3b8 !important;
  }

  /* Dark mode button adjustments */
  .book-purchase-section .btn-amazon-us,
  .book-purchase-section .btn-apple-books,
  .book-purchase-section .btn-books2read,
  .book-purchase-section .btn-google-play,
  .book-purchase-section .btn-apple-audiobook,
  .book-purchase-section .btn-audiobook {
    background: #1e293b !important;
  }

  .book-purchase-section .btn-amazon-us:hover {
    background: #FFF8E6 !important;
    color: #131921 !important;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  .book-purchase-section .book-links a {
    transition: none !important;
  }

  .book-purchase-section .book-links a:hover {
    transform: none !important;
  }
}

/* Focus States for Keyboard Navigation */
.book-purchase-section .book-links a:focus {
  outline: 3px solid #3b82f6 !important;
  outline-offset: 2px !important;
}

.book-purchase-section .book-links a:focus:not(:focus-visible) {
  outline: none !important;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  .book-purchase-section .book-links a {
    border-width: 3px !important;
  }

  .book-purchase-section .amazon-button,
  .book-purchase-section .btn-amazon-de {
    border-color: #000 !important;
  }

  .book-purchase-section .btn-amazon-us,
  .book-purchase-section .btn-apple-books,
  .book-purchase-section .btn-books2read,
  .book-purchase-section .btn-google-play,
  .book-purchase-section .btn-apple-audiobook,
  .book-purchase-section .btn-audiobook {
    border-width: 3px !important;
  }
}

/* Print Styles */
@media print {
  .book-purchase-section {
    page-break-inside: avoid !important;
  }

  .book-purchase-section .book-links a {
    color: #000 !important;
    text-decoration: underline !important;
    border: 1px solid #000 !important;
    box-shadow: none !important;
  }

  .book-purchase-section .trust-signals {
    border-top: 2px solid #000 !important;
  }

  .chatbot-widget,
  .chatbot-toggle-btn {
    display: none !important;
  }
}

/* ============================================
   CHATBOT WIDGET
   ============================================ */

.chatbot-widget {
  position: fixed !important;
  bottom: 20px !important;
  right: 20px !important;
  width: 350px !important;
  max-height: 500px !important;
  background: white !important;
  border-radius: 12px !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15) !important;
  z-index: 10000 !important;
  display: flex !important;
  flex-direction: column !important;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
}

.chatbot-header {
  background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%) !important;
  color: white !important;
  padding: 1rem !important;
  border-radius: 12px 12px 0 0 !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
}

.chatbot-title {
  display: flex !important;
  align-items: center !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  margin: 0 !important;
}

.chatbot-logo {
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  margin-right: 0.5rem !important;
  object-fit: cover !important;
}

.chatbot-controls {
  display: flex !important;
  gap: 0.5rem !important;
}

.chatbot-minimize {
  background: rgba(255, 255, 255, 0.2) !important;
  border: none !important;
  color: white !important;
  font-size: 1.5rem !important;
  cursor: pointer !important;
  padding: 0 0.5rem !important;
  border-radius: 4px !important;
  line-height: 1 !important;
  transition: background 0.2s ease !important;
}

.chatbot-minimize:hover {
  background: rgba(255, 255, 255, 0.3) !important;
}

.chatbot-messages {
  flex: 1 !important;
  overflow-y: auto !important;
  padding: 1rem !important;
  max-height: 350px !important;
  background: #f9fafb !important;
}

.chatbot-message {
  padding: 0.75rem !important;
  border-radius: 8px !important;
  margin-bottom: 0.75rem !important;
  font-size: 0.875rem !important;
  line-height: 1.5 !important;
  word-wrap: break-word !important;
}

.chatbot-message.bot-message {
  background: white !important;
  color: #1f2937 !important;
  border: 1px solid #e5e7eb !important;
  margin-right: 20% !important;
}

.chatbot-message.user-message {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
  color: white !important;
  margin-left: 20% !important;
  text-align: right !important;
}

.chatbot-input-container {
  padding: 1rem !important;
  border-top: 1px solid #e5e7eb !important;
  background: white !important;
  border-radius: 0 0 12px 12px !important;
  display: flex !important;
  gap: 0.5rem !important;
}

.chatbot-input {
  flex: 1 !important;
  padding: 0.75rem !important;
  border: 1px solid #d1d5db !important;
  border-radius: 8px !important;
  font-size: 0.875rem !important;
  font-family: inherit !important;
  outline: none !important;
  transition: border-color 0.2s ease !important;
}

.chatbot-input:focus {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
}

.chatbot-send {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
  color: white !important;
  border: none !important;
  padding: 0.75rem 1rem !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  font-size: 1.25rem !important;
  line-height: 1 !important;
  transition: all 0.2s ease !important;
  min-width: 48px !important;
}

.chatbot-send:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 8px rgba(59, 130, 246, 0.2) !important;
}

.chatbot-send:active {
  transform: translateY(0) !important;
}

/* Chatbot Toggle Button (when minimized) */
.chatbot-toggle-btn {
  position: fixed !important;
  bottom: 20px !important;
  right: 20px !important;
  width: 60px !important;
  height: 60px !important;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
  color: white !important;
  border: none !important;
  border-radius: 50% !important;
  font-size: 1.75rem !important;
  cursor: pointer !important;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3) !important;
  z-index: 10000 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.3s ease !important;
}

.chatbot-toggle-btn:hover {
  transform: scale(1.1) !important;
  box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4) !important;
}

/* Responsive Chatbot */
@media (max-width: 768px) {
  .chatbot-widget {
    width: calc(100vw - 40px) !important;
    max-width: 350px !important;
    right: 20px !important;
  }

  .chatbot-messages {
    max-height: 250px !important;
  }
}

@media (max-width: 480px) {
  .chatbot-widget {
    width: calc(100vw - 20px) !important;
    right: 10px !important;
    bottom: 10px !important;
  }

  .chatbot-toggle-btn {
    width: 50px !important;
    height: 50px !important;
    bottom: 10px !important;
    right: 10px !important;
    font-size: 1.5rem !important;
  }

  .chatbot-message {
    font-size: 0.8125rem !important;
  }
}
