/*
 * Oplify Application Styles
 * Tailwind CSS handles utility classes; this file holds custom components.
 */

/* Turbo progress bar */
.turbo-progress-bar {
  height: 3px;
  background: linear-gradient(to right, #3b82f6, #6366f1);
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10000;
  transition: width 0.3s ease;
}

/* Flash dismiss animation */
.flash-dismiss {
  transition: opacity 0.2s ease-out, transform 0.2s ease-out;
}
.flash-dismiss.hiding {
  opacity: 0;
  transform: translateY(-10px);
}

/* Notification Toast Animations */
.notification-toast {
  transition: transform 0.3s ease-out, opacity 0.3s ease-out;
}
.notification-toast.show {
  transform: translateX(0);
  opacity: 1;
}

/* Sidebar transitions */
.sidebar-overlay {
  transition: opacity 0.3s ease;
}
.sidebar-panel {
  transition: transform 0.3s ease;
}

/* Button components */
.btn-primary {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: white;
  background-color: #3b82f6;
  border: 1px solid #3b82f6;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s;
}
.btn-primary:hover {
  background-color: #2563eb;
  border-color: #2563eb;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  background-color: white;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s;
}
.btn-secondary:hover {
  background-color: #f9fafb;
  border-color: #9ca3af;
}

.btn-danger {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #dc2626;
  background-color: white;
  border: 1px solid #fca5a5;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s;
}
.btn-danger:hover {
  background-color: #fef2f2;
  border-color: #f87171;
}

.btn-success {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: white;
  background-color: #10b981;
  border: 1px solid #10b981;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s;
}
.btn-success:hover {
  background-color: #059669;
  border-color: #059669;
}

/* Table row hover */
.table-row-hover:hover {
  background-color: #f9fafb;
}

/* Custom scrollbar for sidebar */
.sidebar-nav::-webkit-scrollbar {
  width: 4px;
}
.sidebar-nav::-webkit-scrollbar-track {
  background: transparent;
}
.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.3);
  border-radius: 2px;
}

/* Dropdown animation */
.dropdown-enter {
  transition: opacity 0.1s ease-out, transform 0.1s ease-out;
}
.dropdown-enter.hidden {
  opacity: 0;
  transform: scale(0.95);
}

/* Pagy pagination */
nav.pagy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.75rem 0;
}
nav.pagy a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0.375rem;
  border: 1px solid #e5e7eb;
  color: #374151;
  background: white;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s;
}
nav.pagy a:hover:not([aria-disabled]) {
  background: #f3f4f6;
  border-color: #d1d5db;
}
nav.pagy a.current {
  background: #3b82f6;
  color: white;
  border-color: #3b82f6;
  cursor: default;
}
nav.pagy a[aria-disabled="true"] {
  color: #9ca3af;
  background: #f9fafb;
  cursor: default;
}
nav.pagy a.gap {
  border: none;
  background: none;
  cursor: default;
  color: #6b7280;
}
