/* CreativePoint - Custom Styles */

/* Hide elements until Alpine.js initializes — prevents FOUC */
[x-cloak] {
  display: none !important;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}
.animate-fade-in {
  animation: fadeIn 0.3s ease-out;
}
.animate-slide-up {
  animation: slideUp 0.4s ease-out forwards;
}

/* Modal */
.modal-backdrop {
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
}

/* Drag-drop active */
.drag-active {
  border-color: #f15a24 !important;
  background: #fff2ee !important;
}

/* Progress bar fill animation */
@keyframes progressFill {
  from {
    width: 0;
  }
}
.progress-animate {
  animation: progressFill 1s ease-out;
}

/* Tabular numbers for data */
.tabular-nums {
  font-variant-numeric: tabular-nums;
}

/* Mobile: smooth touch scroll on overflow containers */
.overflow-x-auto {
  -webkit-overflow-scrolling: touch;
}

/* Mobile: minimum tap target for buttons */
@media (max-width: 767px) {
  button,
  a[role="button"] {
    min-height: 36px;
  }
  body {
    font-size: 14px;
  }
}

/* Mobile: modal full-screen slide-up from bottom */
@media (max-width: 767px) {
  .modal-backdrop {
    align-items: flex-end;
  }
}

/* Sidebar submenu: popout shown on hover (collapsed sidebar via Alpine x-show) */
.sidebar-parent { position: relative; }
.sidebar-submenu-popout { display: none; }
.sidebar-parent:hover .sidebar-submenu-popout { display: block; }

/* Stagger children animations */
.stagger-children > * {
  opacity: 0;
  animation: fadeIn 0.3s ease-out forwards;
}
.stagger-children > *:nth-child(1) {
  animation-delay: 0.05s;
}
.stagger-children > *:nth-child(2) {
  animation-delay: 0.1s;
}
.stagger-children > *:nth-child(3) {
  animation-delay: 0.15s;
}
.stagger-children > *:nth-child(4) {
  animation-delay: 0.2s;
}
