/**
 * Diploma Styles
 * Save this as: /assets/css/diploma-styles.css
 */

/* Diploma Download Section */
.diploma-download-section {
  margin: 30px 0;
  padding: 0;
  background: transparent;
  animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Diploma Card */
.diploma-download-section .diploma-card {
  background: #f8f9fa;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border: 1px solid #dee2e6;
  border-radius: 12px;
  padding: 40px;
  text-align: center;
  max-width: 500px;
  margin: 0 auto;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

/* Diploma Icon */
.diploma-download-section .diploma-icon {
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.diploma-download-section .diploma-icon .dashicons {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 60px;
  width: 60px;
  height: 60px;
  color: #ffc107;
  background: #fff;
  border-radius: 50%;
  padding: 10px;
  box-shadow: 0 2px 10px rgba(255, 193, 7, 0.3);
}

/* Typography */
.diploma-download-section .diploma-card h3 {
  margin: 0 0 15px;
  font-size: 24px;
  color: #333;
  font-weight: 600;
}

.diploma-download-section .diploma-card p {
  color: #6c757d;
  margin-bottom: 25px;
  font-size: 16px;
}

/* Buttons */
.diploma-download-section .diploma-generate-btn,
.diploma-download-section .diploma-download-btn {
  background: #0073aa;
  color: white;
  border: none;
  padding: 14px 28px;
  font-size: 16px;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s ease;
  text-decoration: none;
  box-shadow: 0 2px 4px rgba(0, 115, 170, 0.2);
}

.diploma-download-section .diploma-generate-btn:hover,
.diploma-download-section .diploma-download-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 115, 170, 0.3);
  color: white;
}

.diploma-download-section .diploma-generate-btn:disabled,
.diploma-download-section .diploma-download-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.diploma-download-section .diploma-generate-btn .dashicons,
.diploma-download-section .diploma-download-btn .dashicons {
  font-size: 20px;
  width: 20px;
  height: 20px;
  margin-right: 0;
}

/* Loading Spinner */
.diploma-download-section .spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #333;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 5px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.diploma-download-section .spinner.is-active {
  border-top-color: #fff;
}

/* Messages */
.diploma-download-section .diploma-message {
  margin-top: 20px;
  padding: 15px 20px;
  border-radius: 6px;
  display: none;
  align-items: center;
  gap: 10px;
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.diploma-download-section .diploma-message.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
  display: flex;
}

.diploma-download-section .diploma-message.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
  display: flex;
}

.diploma-download-section .diploma-message .dashicons {
  font-size: 20px;
  width: 20px;
  height: 20px;
}

/* Course List Integration */
.scorm-course-card .diploma-download-section .diploma-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #ffc107;
  color: #000;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.course-actions .diploma-download-section .diploma-download-link {
  background: #28a745;
  color: white;
  padding: 8px 16px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: background 0.3s ease;
}

.course-actions .diploma-download-section .diploma-download-link:hover {
  background: #218838;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .diploma-download-section .diploma-card {
    padding: 30px 20px;
    margin: 0 20px;
  }

  .diploma-download-section .diploma-card h3 {
    font-size: 20px;
  }

  .diploma-download-section .diploma-generate-btn,
  .diploma-download-section .diploma-download-btn {
    padding: 12px 20px;
    font-size: 14px;
  }

  .diploma-download-section .diploma-icon .dashicons {
    font-size: 50px;
    width: 50px;
    height: 50px;
  }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  .diploma-download-section .diploma-card {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    border-color: #495057;
    color: #f8f9fa;
  }

  .diploma-download-section .diploma-card h3 {
    color: #f8f9fa;
  }

  .diploma-download-section .diploma-card p {
    color: #adb5bd;
  }

  .diploma-download-section .diploma-icon .dashicons {
    background: #495057;
    color: #ffc107;
  }
}

/* Animations for diploma appearance */
.diploma-download-section.show-diploma {
  animation: bounceIn 0.6s ease-out;
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }

  50% {
    transform: scale(1.05);
  }

  70% {
    transform: scale(0.9);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}