/* DDL Course Switcher Styles */

.ddl-course-switcher,
.ddl-course-widget {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 15px;
  margin: 10px 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.ddl-course-switcher h4,
.ddl-course-widget h4 {
  margin: 0 0 10px 0;
  color: #333;
  font-size: 16px;
}

.ddl-current-course {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  padding: 10px;
  margin-bottom: 15px;
}

.ddl-current-course h4 {
  margin: 0 0 5px 0;
  color: #007cba;
  font-size: 14px;
}

.ddl-current-course p {
  margin: 0;
  font-size: 14px;
}

.course-description {
  color: #666;
  font-style: italic;
}

/* Dropdown Style */
.ddl-course-selector {
  margin-bottom: 10px;
}

.ddl-course-selector label {
  display: block;
  margin-bottom: 5px;
  font-weight: 600;
  color: #333;
}

.ddl-course-selector select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  background: #fff;
}

.ddl-course-selector button {
  width: 100%;
  margin-top: 8px;
  padding: 10px;
  background: #007cba;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.3s;
}

.ddl-course-selector button:hover {
  background: #005a87;
}

/* Button Style */
.ddl-course-buttons {
  margin-bottom: 10px;
}

.ddl-course-buttons h4 {
  margin-bottom: 10px;
  color: #333;
}

.course-button-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ddl-course-buttons button {
  padding: 10px 15px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s;
  text-align: left;
}

.ddl-course-buttons button.button-primary {
  background: #007cba;
  color: white;
  border-color: #007cba;
}

.ddl-course-buttons button.button-secondary {
  background: #f8f9fa;
  color: #333;
  border-color: #ddd;
}

.ddl-course-buttons button:hover:not(:disabled) {
  background: #005a87;
  color: white;
  border-color: #005a87;
}

.ddl-course-buttons button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.current-badge {
  font-size: 12px;
  background: #28a745;
  color: white;
  padding: 2px 6px;
  border-radius: 3px;
  margin-left: 5px;
}

/* Compact Style */
.ddl-course-compact select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  background: #fff;
}

/* Stats Grid */
.ddl-course-stats {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #eee;
}

.ddl-course-stats h4 {
  margin-bottom: 10px;
  color: #333;
  font-size: 14px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 10px;
}

.stat-item {
  text-align: center;
  padding: 8px;
  background: #f8f9fa;
  border-radius: 4px;
  border: 1px solid #e9ecef;
}

.stat-item.total {
  background: #007cba;
  color: white;
  border-color: #007cba;
}

.stat-number {
  display: block;
  font-size: 18px;
  font-weight: bold;
  color: #007cba;
}

.stat-item.total .stat-number {
  color: white;
}

.stat-label {
  display: block;
  font-size: 11px;
  color: #666;
  margin-top: 2px;
}

.stat-item.total .stat-label {
  color: rgba(255, 255, 255, 0.9);
}

/* No courses message */
.ddl-no-courses {
  text-align: center;
  color: #666;
  font-style: italic;
  padding: 20px;
}

/* Responsive */
@media (max-width: 768px) {
  .ddl-course-switcher,
  .ddl-course-widget {
    padding: 10px;
    margin: 5px 0;
  }

  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .stat-item {
    padding: 6px;
  }

  .stat-number {
    font-size: 16px;
  }

  .stat-label {
    font-size: 10px;
  }
}

/* Loading state */
.ddl-course-switcher.loading {
  opacity: 0.7;
  pointer-events: none;
}

.ddl-course-switcher.loading::after {
  content: "Đang chuyển đổi...";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 10px 20px;
  border-radius: 4px;
  font-size: 14px;
}

/* Success message */
.ddl-course-switcher .success-message {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
  border-radius: 4px;
  padding: 8px 12px;
  margin-top: 10px;
  font-size: 14px;
}

/* Error message */
.ddl-course-switcher .error-message {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
  border-radius: 4px;
  padding: 8px 12px;
  margin-top: 10px;
  font-size: 14px;
}

/* No Courses Message */
.ddl-no-courses {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border: 2px solid #dee2e6;
  border-radius: 15px;
  padding: 40px 20px;
  margin: 20px 0;
  text-align: center;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

.ddl-no-courses::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    45deg,
    rgba(102, 126, 234, 0.05),
    rgba(118, 75, 162, 0.05)
  );
  pointer-events: none;
}

.ddl-no-courses-content {
  position: relative;
  z-index: 2;
}

.ddl-no-courses-icon {
  font-size: 60px;
  color: #667eea;
  margin-bottom: 20px;
  animation: float 3s ease-in-out infinite;
  filter: drop-shadow(0 5px 15px rgba(102, 126, 234, 0.3));
}

.ddl-no-courses h4 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 15px;
}

.ddl-no-courses p {
  font-size: 1rem;
  color: #666;
  line-height: 1.6;
  margin-bottom: 25px;
}

.ddl-contact-admin-btn {
  display: inline-block;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  padding: 12px 25px;
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
  transition: all 0.3s ease;
}

.ddl-contact-admin-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
  text-decoration: none;
  color: white;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-8px);
  }
}

/* Mobile responsive */
@media (max-width: 768px) {
  .ddl-no-courses {
    padding: 30px 15px;
    margin: 15px 0;
  }

  .ddl-no-courses-icon {
    font-size: 50px;
    margin-bottom: 15px;
  }

  .ddl-no-courses h4 {
    font-size: 1.3rem;
  }

  .ddl-no-courses p {
    font-size: 0.95rem;
  }

  .ddl-contact-admin-btn {
    padding: 10px 20px;
    font-size: 0.9rem;
  }
}
