/* ============================================
   Training Participation Portal - Custom Styles
   ============================================ */

/* ---------- Smooth Scroll ---------- */
html {
  scroll-behavior: smooth;
}

/* ---------- Page Section Transitions ---------- */
.page-section {
  animation: fadeInUp 0.4s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- Input Focus Ring ---------- */
.input-field:focus {
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

/* ---------- Input Error State ---------- */
.input-field.input-error {
  border-color: #ef4444;
  background-color: #fef2f2;
}
.input-field.input-error:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

/* ---------- Input Success State ---------- */
.input-field.input-success {
  border-color: #22c55e;
}

/* ---------- Error Message Animation ---------- */
.error-msg {
  animation: shakeIn 0.3s ease-out;
}

@keyframes shakeIn {
  0% { transform: translateX(-4px); opacity: 0; }
  50% { transform: translateX(2px); }
  100% { transform: translateX(0); opacity: 1; }
}

/* ---------- Nav Active Link ---------- */
.nav-link.active {
  color: #4f46e5;
  background-color: #eef2ff;
  font-weight: 600;
}

/* ---------- Filter Chip Styles ---------- */
.filter-chip {
  background: white;
  color: #6b7280;
  border-color: #e5e7eb;
  cursor: pointer;
}
.filter-chip:hover {
  color: #4f46e5;
  border-color: #c7d2fe;
  background: #eef2ff;
}
.filter-chip.active {
  background: #4f46e5;
  color: white;
  border-color: #4f46e5;
}

/* ---------- Bounce Once Animation for Checkmark ---------- */
.animate-bounce-once {
  animation: bounceOnce 0.6s ease-out;
}

@keyframes bounceOnce {
  0% { transform: scale(0); opacity: 0; }
  50% { transform: scale(1.15); }
  70% { transform: scale(0.95); }
  100% { transform: scale(1); opacity: 1; }
}

/* ---------- Confirmation Detail Row ---------- */
.confirm-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0.75rem 0;
  border-bottom: 1px solid #f3f4f6;
}
.confirm-row:last-child {
  border-bottom: none;
}
.confirm-label {
  font-size: 0.875rem;
  color: #6b7280;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.confirm-value {
  font-size: 0.875rem;
  color: #111827;
  font-weight: 600;
  text-align: right;
}

/* ---------- Table Row Hover ---------- */
tbody tr {
  transition: background-color 0.15s ease;
}
tbody tr:hover {
  background-color: #f9fafb;
}

/* ---------- KPI Card Pulse ---------- */
.kpi-card {
  transition: all 0.3s ease;
}
.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px -5px rgba(0, 0, 0, 0.08);
}

/* ---------- Custom Scrollbar ---------- */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

/* ---------- Navbar Shadow on Scroll ---------- */
.navbar-scrolled {
  box-shadow: 0 1px 12px rgba(0, 0, 0, 0.06);
}

/* ---------- Responsive Table Minimum Width ---------- */
.overflow-x-auto table {
  min-width: 600px;
}

/* ---------- Badge Styles ---------- */
.program-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

/* ---------- Stat Counter Animation ---------- */
.stat-number {
  font-variant-numeric: tabular-nums;
}

/* ---------- Chart Canvas Responsiveness ---------- */
canvas {
  max-width: 100%;
}