/* SCORM LMS Custom Styles */

/* Loading spinner */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s linear infinite;
}

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

/* Progress bar animation */
.progress-bar {
  transition: width 0.3s ease-in-out;
}

/* Upload area styling */
.upload-area {
  border: 2px dashed #d1d5db;
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  transition: border-color 0.3s ease;
}

.upload-area:hover {
  border-color: #3b82f6;
}

.upload-area.dragover {
  border-color: #1d4ed8;
  background-color: #eff6ff;
}

/* SCORM Player iframe styling */
.scorm-player-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  background: white;
  overflow: hidden;
  /* Remove any potential browser indicators or overlays */
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
}

.scorm-player-iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: white;
  display: block;
}

/* Fullscreen player content without controls */
.player-content-fullscreen {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

.scorm-player-iframe-fullscreen {
  width: 100%;
  height: 100%;
  border: none;
  background: white;
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  /* Ensure clean iframe display without any overlays */
  z-index: 1;
  outline: none;
}

/* Hide any potential browser recording indicators or debug overlays */
.scorm-player-container::before,
.scorm-player-container::after,
iframe::before,
iframe::after {
  display: none !important;
}

/* Remove any red dots, indicators, or status elements */
.scorm-player-container *[style*="red"],
.scorm-player-container *[style*="#ff0000"],
.scorm-player-container *[style*="#f00"],
.scorm-player-container .recording-indicator,
.scorm-player-container .status-dot,
.scorm-player-container .debug-indicator {
  display: none !important;
  visibility: hidden !important;
}

/* SCORM Player controls */
.player-controls {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 50px;
  background: white;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.player-content {
  margin-top: 50px;
  height: calc(100vh - 50px);
  width: 100vw;
  overflow: hidden;
}

/* Fullscreen mode adjustments */
:fullscreen .player-controls {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
}

:fullscreen .scorm-player-container {
  height: 100vh;
  width: 100vw;
}

/* Responsive design for mobile */
@media (max-width: 768px) {
  .player-controls {
    height: 45px;
    padding: 0 0.5rem;
  }
  
  .player-content {
    margin-top: 45px;
    height: calc(100vh - 45px);
  }
}

/* Status indicators */
.status-indicator {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 500;
}

.status-active {
  background-color: #dcfce7;
  color: #166534;
}

.status-inactive {
  background-color: #f3f4f6;
  color: #374151;
}

.status-processing {
  background-color: #fef3c7;
  color: #92400e;
}

.status-completed {
  background-color: #dbeafe;
  color: #1e40af;
}

.status-failed {
  background-color: #fee2e2;
  color: #dc2626;
}

/* Card hover effects */
.card-hover:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

/* Navigation breadcrumbs */
.breadcrumb {
  display: flex;
  align-items: center;
  space-x: 2;
  color: #6b7280;
  font-size: 0.875rem;
}

.breadcrumb-item {
  display: flex;
  align-items: center;
}

.breadcrumb-separator {
  margin: 0 0.5rem;
  color: #9ca3af;
}

/* Data table styling */
.data-table {
  min-width: 100%;
  divide-y: divide-gray-200;
}

.data-table th {
  padding: 0.75rem 1.5rem;
  text-align: left;
  font-weight: 500;
  color: #374151;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.75rem;
  background-color: #f9fafb;
}

.data-table td {
  padding: 1rem 1.5rem;
  white-space: nowrap;
  font-size: 0.875rem;
  color: #111827;
}

.data-table tr:hover {
  background-color: #f9fafb;
}

/* Modal overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

.modal-content {
  background: white;
  border-radius: 0.5rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  max-width: 28rem;
  width: 100%;
  margin: 1rem;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
}

/* Notification styling */
.notification {
  position: fixed;
  top: 1rem;
  right: 1rem;
  padding: 1rem;
  border-radius: 0.5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  z-index: 50;
  max-width: 20rem;
  animation: slideInRight 0.3s ease-out;
}

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

/* Chart container */
.chart-container {
  position: relative;
  height: 300px;
  width: 100%;
}

/* Form styling improvements */
.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 0.5rem;
}

.form-input {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: #111827;
  background-color: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

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

.form-textarea {
  resize: vertical;
  min-height: 5rem;
}

/* Button variants */
.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s ease-in-out;
  border: none;
  cursor: pointer;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background-color: #3b82f6;
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background-color: #2563eb;
}

.btn-secondary {
  background-color: #6b7280;
  color: white;
}

.btn-secondary:hover:not(:disabled) {
  background-color: #4b5563;
}

.btn-success {
  background-color: #059669;
  color: white;
}

.btn-success:hover:not(:disabled) {
  background-color: #047857;
}

.btn-danger {
  background-color: #dc2626;
  color: white;
}

.btn-danger:hover:not(:disabled) {
  background-color: #b91c1c;
}

.btn-outline {
  background-color: transparent;
  border: 1px solid #d1d5db;
  color: #374151;
}

.btn-outline:hover:not(:disabled) {
  background-color: #f9fafb;
}

/* Responsive improvements */
@media (max-width: 768px) {
  .modal-content {
    margin: 0.5rem;
  }
  
  .player-controls {
    padding: 0 0.5rem;
  }
  
  .data-table th,
  .data-table td {
    padding: 0.5rem;
  }
  
  .notification {
    right: 0.5rem;
    left: 0.5rem;
    max-width: none;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .dark\:bg-gray-900 {
    background-color: #111827;
  }
  
  .dark\:text-white {
    color: #ffffff;
  }
  
  .dark\:border-gray-700 {
    border-color: #374151;
  }
}

/* Print styles */
@media print {
  .no-print {
    display: none !important;
  }
  
  .print\:block {
    display: block !important;
  }
}

/* Accessibility improvements */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus visible styles for better keyboard navigation */
.focus\:ring {
  outline: none;
}

.focus\:ring:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}