/*
 * ICAM Abacus — tasteful admin motion (respects prefers-reduced-motion).
 */

@keyframes icam-fade-up {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes icam-soft-pulse {
  0%,
  100% {
    opacity: 0.55;
    transform: scale(1);
  }
  50% {
    opacity: 0.9;
    transform: scale(1.03);
  }
}

/* Main content entrance */
body:not(.icam-admin-login) #content,
body:not(.icam-admin-login) #content-main {
  animation: icam-fade-up 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Module / card hover lift */
body:not(.icam-admin-login) .module > .bg-base-50,
body:not(.icam-admin-login) .app-list .module .bg-base-50,
body:not(.icam-admin-login) #content-main .module .bg-base-50 {
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    border-color 0.22s ease !important;
}

body:not(.icam-admin-login) .module > .bg-base-50:hover,
body:not(.icam-admin-login) .app-list .module .bg-base-50:hover,
body:not(.icam-admin-login) #content-main .module .bg-base-50:hover {
  transform: translateY(-2px);
  box-shadow:
    0 12px 28px -18px rgba(15, 23, 42, 0.28),
    var(--admin-card-shadow) !important;
}

/* Primary buttons */
body:not(.icam-admin-login) a.bg-primary-600,
body:not(.icam-admin-login) button.bg-primary-600,
body:not(.icam-admin-login) input[type="submit"].bg-primary-600,
body:not(.icam-admin-login) .icam-theme-toggle__btn {
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    background-color 0.16s ease,
    color 0.16s ease !important;
}

body:not(.icam-admin-login) a.bg-primary-600:hover,
body:not(.icam-admin-login) button.bg-primary-600:hover,
body:not(.icam-admin-login) input[type="submit"].bg-primary-600:hover {
  transform: translateY(-1px);
}

/* Sidebar links */
#nav-sidebar-inner a.flex {
  transition:
    background-color 0.16s ease,
    color 0.16s ease,
    transform 0.16s ease,
    box-shadow 0.16s ease !important;
}

#nav-sidebar-inner a.flex:hover {
  transform: translateX(2px);
}

.icam-nav-section__toggle,
.icam-nav-section__chevron {
  transition:
    background-color 0.16s ease,
    color 0.16s ease,
    transform 0.2s ease !important;
}

/* Theme segmented control */
.icam-theme-toggle {
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.icam-theme-toggle__btn.is-active {
  /* Active state is styled in admin-theme-mode.css; avoid continuous pulse. */
}


/* Head Office dashboard cards (if present) */
.hod-kpi,
.hod-card,
.hod-panel {
  animation: icam-fade-up 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hod-kpi:nth-child(1) { animation-delay: 0.04s; }
.hod-kpi:nth-child(2) { animation-delay: 0.08s; }
.hod-kpi:nth-child(3) { animation-delay: 0.12s; }
.hod-kpi:nth-child(4) { animation-delay: 0.16s; }
.hod-kpi:nth-child(5) { animation-delay: 0.2s; }
.hod-kpi:nth-child(6) { animation-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
  body:not(.icam-admin-login) #content,
  body:not(.icam-admin-login) #content-main,
  .hod-kpi,
  .hod-card,
  .hod-panel,
  .icam-theme-toggle__btn.is-active {
    animation: none !important;
  }

  body:not(.icam-admin-login) .module > .bg-base-50:hover,
  body:not(.icam-admin-login) .app-list .module .bg-base-50:hover,
  body:not(.icam-admin-login) #content-main .module .bg-base-50:hover,
  body:not(.icam-admin-login) a.bg-primary-600:hover,
  body:not(.icam-admin-login) button.bg-primary-600:hover,
  #nav-sidebar-inner a.flex:hover {
    transform: none !important;
  }
}
