@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap");

/* LMS Plugin Main Styles */
:root {
  --lms-primary: #3b82f6;
  --lms-primary-dark: #2563eb;
  --lms-secondary: #64748b;
  --lms-success: #10b981;
  --lms-warning: #f59e0b;
  --lms-error: #ef4444;
  --lms-gray-50: #f8fafc;
  --lms-gray-100: #f1f5f9;
  --lms-gray-200: #e2e8f0;
  --lms-gray-300: #cbd5e1;
  --lms-gray-400: #94a3b8;
  --lms-gray-500: #64748b;
  --lms-gray-600: #475569;
  --lms-gray-700: #334155;
  --lms-gray-800: #1e293b;
  --lms-gray-900: #0f172a;
}
* {
  font-family: "Poppins", sans-serif;
}

/* Dashboard Styles */
.lms-dashboard {
  max-width: 1200px;
  margin: 20px 0;
  font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
}

.dashboard-header {
  background: linear-gradient(
    135deg,
    var(--lms-primary),
    var(--lms-primary-dark)
  );
  color: white;
  padding: 30px;
  border-radius: 12px;
  margin-bottom: 30px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.dashboard-header h1 {
  margin: 0 0 10px 0;
  font-size: 28px;
  font-weight: 700;
}

.dashboard-header p {
  margin: 0;
  opacity: 0.9;
  font-size: 16px;
}

/* Course Structure */
.course-structure {
  background: white;
  border: 1px solid var(--lms-gray-200);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.course-structure-header {
  background: var(--lms-gray-50);
  padding: 20px 25px;
  border-bottom: 1px solid var(--lms-gray-200);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.course-structure-header h2 {
  margin: 0;
  color: var(--lms-gray-800);
  font-size: 20px;
  font-weight: 600;
}

.add-course-btn {
  background: var(--lms-primary);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.2s ease;
}

.add-course-btn:hover {
  background: var(--lms-primary-dark);
}

/* Course Items */
.course-item {
  border-bottom: 1px solid var(--lms-gray-100);
  background: white;
  transition: all 0.2s ease;
}

.course-item:last-child {
  border-bottom: none;
}

.course-item:hover {
  background: var(--lms-gray-50);
}

.course-item.ui-sortable-helper {
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15);
  border: 1px solid var(--lms-gray-200);
  border-radius: 8px;
}

.course-header {
  padding: 20px 25px;
  display: flex;
  align-items: center;
  gap: 15px;
  cursor: move;
}

.drag-handle {
  color: var(--lms-gray-400);
  cursor: grab;
  font-size: 18px;
}

.drag-handle:active {
  cursor: grabbing;
}

.course-info {
  flex: 1;
  min-width: 0;
}

.course-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--lms-gray-800);
  margin: 0 0 5px 0;
  line-height: 1.3;
}

.course-meta {
  font-size: 13px;
  color: var(--lms-gray-500);
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.course-actions {
  display: flex;
  gap: 8px;
}

.action-btn {
  padding: 6px 12px;
  border: 1px solid var(--lms-gray-300);
  background: white;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.action-btn:hover {
  border-color: var(--lms-gray-400);
  background: var(--lms-gray-50);
}

.action-btn.primary {
  background: var(--lms-primary);
  border-color: var(--lms-primary);
  color: white;
}

.action-btn.primary:hover {
  background: var(--lms-primary-dark);
  border-color: var(--lms-primary-dark);
}

/* Lessons */
.lessons-container {
  background: var(--lms-gray-50);
  border-top: 1px solid var(--lms-gray-200);
}

.lesson-item {
  background: white;
  margin: 10px 15px;
  border: 1px solid var(--lms-gray-200);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.lesson-item:hover {
  border-color: var(--lms-gray-300);
  box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.1);
}

.lesson-item.ui-sortable-helper {
  box-shadow: 0 8px 20px -5px rgba(0, 0, 0, 0.15);
}

.lesson-header {
  padding: 15px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: move;
}

.lesson-header .drag-handle {
  font-size: 16px;
}

.lesson-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--lms-gray-700);
  margin: 0 0 3px 0;
}

.lesson-meta {
  font-size: 12px;
  color: var(--lms-gray-500);
  display: flex;
  gap: 12px;
}

/* Topics */
.topics-container {
  background: var(--lms-gray-25);
  border-top: 1px solid var(--lms-gray-150);
  padding: 10px 0;
}

.topic-item {
  background: white;
  margin: 5px 10px;
  padding: 12px 15px;
  border: 1px solid var(--lms-gray-200);
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: move;
  transition: all 0.2s ease;
  font-size: 13px;
}

.topic-item:hover {
  border-color: var(--lms-gray-300);
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.topic-item.ui-sortable-helper {
  box-shadow: 0 6px 15px -3px rgba(0, 0, 0, 0.15);
}

.topic-item .drag-handle {
  font-size: 14px;
}

.topic-title {
  flex: 1;
  font-weight: 500;
  color: var(--lms-gray-700);
  margin: 0;
}

/* Progress Indicators */
.progress-bar {
  background: var(--lms-gray-200);
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  margin: 10px 0;
}

.progress-fill {
  background: var(--lms-success);
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s ease;
}

/* Status Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.status-badge.published {
  background: #dcfce7;
  color: #166534;
}

.status-badge.draft {
  background: #fef3c7;
  color: #92400e;
}

.status-badge.private {
  background: #fee2e2;
  color: #991b1b;
}

/* Loading States */
.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  z-index: 10;
}

.spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--lms-gray-300);
  border-top: 2px solid var(--lms-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .lms-dashboard {
    margin: 10px 0;
  }

  .dashboard-header {
    padding: 20px;
    margin-bottom: 20px;
  }

  .dashboard-header h1 {
    font-size: 24px;
  }

  .course-header,
  .lesson-header {
    padding: 15px;
    flex-wrap: wrap;
    gap: 10px;
  }

  .course-meta,
  .lesson-meta {
    flex-direction: column;
    gap: 5px;
  }

  .course-actions {
    flex-direction: column;
    width: 100%;
    gap: 5px;
  }

  .action-btn {
    width: 100%;
    text-align: center;
  }

  .topic-item {
    padding: 10px;
    font-size: 12px;
  }
}
