/**
 * Custom Styles for De Andrade Medicina Ops v3
 */

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

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

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

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

::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* Loading animation */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.animate-spin {
  animation: spin 1s linear infinite;
}

/* Fade in animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.3s ease-out;
}

/* Focus styles for better accessibility */
input:focus,
select:focus,
textarea:focus,
button:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* Disabled state */
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Table hover effect */
tbody tr:hover {
  background-color: #f9fafb;
}

/* Modal backdrop blur */
.modal-backdrop {
  backdrop-filter: blur(2px);
}

/* Print styles */
@media print {
  .no-print {
    display: none !important;
  }
  
  body {
    background: white;
  }
  
  .shadow,
  .shadow-sm,
  .shadow-lg {
    box-shadow: none !important;
  }
}

/* Mobile responsive adjustments */
@media (max-width: 640px) {
  .responsive-text {
    font-size: 0.875rem;
  }
  
  .responsive-padding {
    padding: 1rem;
  }
}

/* Status badge colors - ensure they work with Tailwind */
.bg-blue-100 {
  background-color: #dbeafe;
}

.bg-green-100 {
  background-color: #d1fae5;
}

.bg-red-100 {
  background-color: #fee2e2;
}

.bg-yellow-100 {
  background-color: #fef3c7;
}

.bg-purple-100 {
  background-color: #f3e8ff;
}

/* Transition utilities */
.transition-all {
  transition-property: all;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

/* Card hover effect */
.card-hover {
  transition: all 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Button loading state */
.btn-loading {
  position: relative;
  pointer-events: none;
}

.btn-loading::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 0.6s linear infinite;
}
