/* =========================================================
   Portal Universal Animations
   Compatible: login.php, home.php, ticketing.php, add/update/deleted/obsolete_document.php
   ========================================================= */

/* === 1. Page Load Fade + Slide Down === */
.page-content {
  opacity: 0;
  transform: translateY(-20px);
  animation: fadeSlideDown 0.6s ease-out forwards;
}

@keyframes fadeSlideDown {
  0% {
    opacity: 0;
    transform: translateY(-25px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* === 2. Table Row Fade-In (Ticketing, Deleted, Obsolete) === */
.dataTables_wrapper table tbody tr {
  opacity: 0;
  transform: translateY(10px);
  animation: tableRowFade 0.4s ease forwards;
}

.dataTables_wrapper table tbody tr:nth-child(1) { animation-delay: 0.05s; }
.dataTables_wrapper table tbody tr:nth-child(2) { animation-delay: 0.1s; }
.dataTables_wrapper table tbody tr:nth-child(3) { animation-delay: 0.15s; }
.dataTables_wrapper table tbody tr:nth-child(4) { animation-delay: 0.2s; }
.dataTables_wrapper table tbody tr:nth-child(5) { animation-delay: 0.25s; }
.dataTables_wrapper table tbody tr:nth-child(6) { animation-delay: 0.3s; }

@keyframes tableRowFade {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* === 3. Slide In Left (Dashboard/Home Cards) === */
.card, .container.fade-slide {
  opacity: 0;
  transform: translateX(-40px);
  animation: slideInLeft 0.6s ease forwards;
}

@keyframes slideInLeft {
  0% {
    opacity: 0;
    transform: translateX(-40px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

/* === 4. Fade Out Transition antar halaman === */
body.fade-out {
  opacity: 0;
  transition: opacity 0.4s ease;
}

/* === 5. Button Subtle Hover (Modern micro interaction) === */
button, .btn-main, .action-btn, .ok-btn, .cancel-btn {
  transition: transform 0.2s ease, box-shadow 0.3s ease;
}

button:hover, .btn-main:hover, .action-btn:hover, .ok-btn:hover, .cancel-btn:hover {
  transform: translateY(-1.5px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

/* === 6. Soft Fade Animation Utility Class === */
.fade-in {
  opacity: 0;
  animation: fadeIn 0.6s ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* === 7. Subtle Floating Effect (optional for logo/title) === */
.float {
  animation: floatAnim 3s ease-in-out infinite;
}

@keyframes floatAnim {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
