/* Custom styles for KI-Schulung platform */

/* Smooth transitions */
* {
  transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

/* Focus styles */
input:focus,
select:focus,
button:focus,
textarea:focus {
  outline: none;
  ring: 2px;
  ring-color: #0066CC;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a1a1a1;
}

/* Loading spinner animation */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.animate-spin {
  animation: spin 1s linear infinite;
}

/* Pulse animation for loading states */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Slide navigation dots */
.slide-dot {
  cursor: pointer;
  transition: all 0.2s ease;
}

.slide-dot:hover {
  transform: scale(1.2);
}

/* Module card hover effect */
.module-card:hover {
  transform: translateY(-2px);
}

/* Question card styling */
.question-card input[type="radio"]:checked + span,
.question-card input[type="checkbox"]:checked + span {
  color: #0066CC;
  font-weight: 500;
}

.question-card label:has(input:checked) {
  background-color: #EBF5FF;
  border-color: #0066CC;
}

/* Timer warning colors */
.timer-warning {
  color: #F59E0B;
}

.timer-critical {
  color: #EF4444;
  animation: pulse 1s ease-in-out infinite;
}

/* Tab active state */
.tab-btn.active {
  border-bottom-color: #0066CC;
  color: #0066CC;
}

/* Table row hover */
tbody tr:hover {
  background-color: #F9FAFB;
}

/* Modal overlay */
#user-modal {
  backdrop-filter: blur(4px);
}

/* Progress bar animation */
.progress-bar {
  transition: width 0.5s ease-in-out;
}

/* Certificate preview styling */
.certificate-preview {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border: 2px solid #e5e7eb;
}

/* Fullscreen mode for slides */
#slide-container:fullscreen {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

#slide-container:fullscreen #slide-image {
  max-height: 100vh;
  max-width: 100vw;
  object-fit: contain;
}

/* Print styles for certificate */
@media print {
  body {
    background: white;
  }

  nav,
  footer,
  .no-print {
    display: none !important;
  }

  .certificate-preview {
    border: none;
    box-shadow: none;
  }
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .slide-dots {
    max-width: 200px;
  }

  #slide-container {
    margin: 0 -1rem;
    border-radius: 0;
  }

  .tab-btn {
    padding: 0.75rem 1rem;
    font-size: 0.75rem;
  }
}

/* Dark mode support (optional - can be enabled later) */
@media (prefers-color-scheme: dark) {
  /* Uncomment to enable dark mode
  body {
    background-color: #1a1a1a;
    color: #e5e5e5;
  }

  .bg-white {
    background-color: #2d2d2d;
  }

  .text-capo-text {
    color: #e5e5e5;
  }
  */
}

/* ==========================================
   HTML CONTENT MODULE STYLES
   ========================================== */

/* Expandable sections */
.expandable-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease-out;
}
.expandable-content.open {
  max-height: 3000px;
  transition: max-height 0.5s ease-in;
}

/* Tab panels */
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* Quiz options */
.quiz-option:disabled,
.quiz-option.pointer-events-none { pointer-events: none; opacity: 0.9; }

/* Scenario choices */
.scenario-choice:disabled,
.scenario-choice.pointer-events-none { pointer-events: none; opacity: 0.9; }

/* Content section scroll */
#content-wrapper {
  scroll-behavior: smooth;
}
#section-content {
  max-width: 56rem;
  margin: 0 auto;
}

/* Dark scrollbar for content modules */
#content-wrapper::-webkit-scrollbar-track { background: #1F1F1F; }
#content-wrapper::-webkit-scrollbar-thumb { background: #4B5563; }
#content-wrapper::-webkit-scrollbar-thumb:hover { background: #6B7280; }

/* Comparison table responsive */
@media (max-width: 640px) {
  .comparison-table-wrap { overflow-x: auto; }
  .comparison-table-wrap table { min-width: 480px; }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
  *,
  ::before,
  ::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  .bg-primary {
    background-color: #003d7a;
  }

  .text-gray-500 {
    color: #4b5563;
  }

  input,
  select,
  button {
    border-width: 2px;
  }
}
