/* SchoolPing Custom Style Additions */

/* Enforce Outfit font exclusively on all elements */
*,
*::before,
*::after {
  font-family: 'Outfit', sans-serif !important;
}

/* Base custom resets */
html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

/* Custom fade-in view transitions (150ms) */
.animate-fade-in {
  animation: fadeIn 150ms ease-out forwards;
}

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

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

/* Shake Animation for login error */
.animate-shake {
  animation: shake 0.4s ease-in-out;
}

@keyframes shake {

  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-6px);
  }

  75% {
    transform: translateX(6px);
  }
}

/* Sidebar nav active state */
.nav-link.active,
.mobile-nav-link.active {
  background-color: #3b82f620 !important;
  /* light transparency indigo */
  color: #ffffff !important;
  border-left: 4px solid #6366f1 !important;
}

/* Phone preview container details */
.phone-mockup {
  position: relative;
  border-color: #0f172a;
  /* Slate-900 border */
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.phone-mockup::after {
  content: '';
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background-color: #475569;
  border-radius: 999px;
  z-index: 20;
}

/* Pulse / skeleton loaders */
.skeleton-loader {
  background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
  background-size: 200% 100%;
  animation: pulseLoading 1.5s infinite;
}

@keyframes pulseLoading {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

/* Custom scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Content editable field outline override */
[contenteditable="true"] {
  outline: none;
  cursor: text;
  border-bottom: 1px dashed #6366f1;
}

[contenteditable="true"]:focus {
  background-color: #ede9fe;
  border-bottom: 2px solid #4f46e5;
  border-radius: 4px;
  padding: 2px 4px;
}

/* Toast animations */
.toast-slide-in {
  animation: toastSlide 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes toastSlide {
  from {
    transform: translateX(100%) translateY(0);
    opacity: 0;
  }

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