/* ==========================================
   FILE: css/components/document-generator.css
   ✅ PRODUCTION-READY - Document Generation Styling
   ========================================== */

/* ===== Progress Steps Indicator ===== */
.step-indicator {
  position: relative;
  padding: 1.5rem 1rem;
  transition: all 0.3s ease;
}

.step-indicator .step-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto;
  background: #e5e7eb;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  color: #6b7280;
}

.step-indicator.active .step-icon {
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
  color: white;
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(30, 58, 138, 0.3);
}

.step-indicator.completed .step-icon {
  background: #059669;
  color: white;
}

.step-indicator h6 {
  font-size: 0.875rem;
  font-weight: 600;
  color: #6b7280;
  margin-top: 0.5rem;
}

.step-indicator.active h6 {
  color: #1e3a8a;
  font-weight: 700;
}

.step-indicator.completed h6 {
  color: #059669;
}

/* Step connector lines */
@media (min-width: 768px) {
  .step-indicator::before {
    content: '';
    position: absolute;
    top: 50%;
    left: calc(50% + 40px);
    width: calc(100% - 80px);
    height: 2px;
    background: #e5e7eb;
    z-index: -1;
  }

  .step-indicator.active::before,
  .step-indicator.completed::before {
    background: #059669;
  }

  .col-md-4:last-child .step-indicator::before {
    display: none;
  }
}

/* ===== Template Selection Cards ===== */
.template-select-card {
  transition: all 0.3s ease;
  cursor: pointer;
  border: 2px solid transparent;
}

.template-select-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
  border-color: #1e3a8a;
}

.template-select-card .select-template-btn {
  transition: all 0.3s ease;
}

.template-select-card:hover .select-template-btn {
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
  border-color: transparent;
}

/* ===== Student Selection List ===== */
.list-group-item {
  transition: background-color 0.2s ease;
}

.list-group-item:hover {
  background-color: #f9fafb;
}

.list-group-item .form-check-input {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.125rem;
  cursor: pointer;
}

.list-group-item .form-check-input:checked {
  background-color: #1e3a8a;
  border-color: #1e3a8a;
}

.list-group-item .form-check-label {
  cursor: pointer;
}

/* ===== Search & Filter Bar ===== */
.input-group-text {
  background-color: #f9fafb;
  border-right: none;
}

.input-group .form-control {
  border-left: none;
}

.input-group .form-control:focus {
  border-color: #1e3a8a;
  box-shadow: 0 0 0 0.2rem rgba(30, 58, 138, 0.25);
}

.input-group .form-control:focus + .input-group-text {
  border-color: #1e3a8a;
}

/* ===== Selection Counter Badge ===== */
#selectionCounter {
  font-size: 1rem;
  font-weight: 700;
  padding: 0.5rem 0.75rem;
  border-radius: 50%;
  min-width: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ===== Preview Summary Alert ===== */
.alert-info {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  border-left: 4px solid #1e3a8a;
}

.alert-warning {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-left: 4px solid #f59e0b;
}

/* ===== Progress Bar Animation ===== */
.progress {
  overflow: visible;
  border-radius: 10px;
  background-color: #e5e7eb;
}

.progress-bar {
  background: linear-gradient(90deg, #1e3a8a 0%, #3b82f6 50%, #1e3a8a 100%);
  background-size: 200% 100%;
  animation: progressShine 2s linear infinite;
  border-radius: 10px;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(30, 58, 138, 0.3);
}

@keyframes progressShine {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* ===== Action Buttons ===== */
.btn-primary {
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
  border: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(30, 58, 138, 0.4);
}

.btn-success {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  border: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(5, 150, 105, 0.4);
}

.btn-outline-secondary {
  border-color: #d1d5db;
  color: #6b7280;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-outline-secondary:hover {
  background-color: #f3f4f6;
  border-color: #9ca3af;
  color: #374151;
  transform: translateY(-2px);
}

/* ===== Student Cards (Grid View Alternative) ===== */
.student-card {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1rem;
  transition: all 0.3s ease;
  cursor: pointer;
}

.student-card:hover {
  border-color: #1e3a8a;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.student-card.selected {
  background-color: #dbeafe;
  border-color: #1e3a8a;
  border-width: 2px;
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
  .step-indicator {
    padding: 1rem 0.5rem;
  }

  .step-indicator .step-icon {
    width: 50px;
    height: 50px;
  }

  .step-indicator h6 {
    font-size: 0.75rem;
  }

  .template-select-card {
    margin-bottom: 1rem;
  }

  .btn-group {
    flex-direction: column;
    width: 100%;
  }

  .btn-group .btn {
    border-radius: 0.375rem !important;
    margin-bottom: 0.5rem;
  }
}

/* ===== Loading Skeleton ===== */
.skeleton {
  background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
  background-size: 200% 100%;
  animation: loading 1.5s ease-in-out infinite;
  border-radius: 4px;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* ===== Custom Scrollbar ===== */
.card-body::-webkit-scrollbar {
  width: 8px;
}

.card-body::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 10px;
}

.card-body::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}

.card-body::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* ===== Empty State ===== */
.empty-state {
  padding: 4rem 2rem;
  text-align: center;
}

.empty-state i {
  opacity: 0.3;
  margin-bottom: 1.5rem;
}

.empty-state h5 {
  color: #6b7280;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.empty-state p {
  color: #9ca3af;
  font-size: 0.875rem;
}

/* ===== Badge Styles ===== */
.badge {
  font-weight: 600;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
}

.badge.bg-primary {
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%) !important;
}

.badge.bg-success {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%) !important;
}

.badge.bg-warning {
  background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%) !important;
  color: #78350f !important;
}

/* ===== Card Shadows ===== */
.card.shadow-sm {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.3s ease;
}

.card.shadow-sm:hover {
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06);
}

/* ===== Utility Classes ===== */
.text-gray-800 {
  color: #1f2937 !important;
}

.bg-light {
  background-color: #f9fafb !important;
}

.border-primary {
  border-color: #1e3a8a !important;
}

.border-success {
  border-color: #059669 !important;
}

/* ===== Animation Classes ===== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.3s ease-out;
}

/* ===== Print Styles ===== */
@media print {
  .btn,
  .card-header,
  .breadcrumb,
  .step-indicator::before {
    display: none !important;
  }

  .card {
    box-shadow: none !important;
    border: 1px solid #e5e7eb !important;
  }
}