/* Hospital Management System - Enhanced Professional Styles */

/* Modern Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: rgba(243, 244, 246, 0.3);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #3b82f6, #1d4ed8);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #1d4ed8, #1e40af);
}

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

/* Enhanced body styling */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Enhanced Loading Animations */
.spinner {
  border: 3px solid rgba(59, 130, 246, 0.1);
  border-top: 3px solid #3b82f6;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Pulse animation for loading states */
.pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: .5;
  }
}

/* Skeleton loading */
.skeleton {
  animation: skeleton-loading 1s linear infinite alternate;
}

@keyframes skeleton-loading {
  0% {
    background-color: hsl(200, 20%, 95%);
  }
  100% {
    background-color: hsl(200, 20%, 80%);
  }
}

/* Card hover effects */
.card-hover {
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

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

/* Button animations */
.btn-animate {
  transition: all 0.2s ease-in-out;
}

.btn-animate:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Form focus styles */
.form-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

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

/* Status indicators */
.status-pending {
  background-color: #fef3c7;
  color: #d97706;
}

.status-confirmed {
  background-color: #d1fae5;
  color: #059669;
}

.status-completed {
  background-color: #dbeafe;
  color: #2563eb;
}

.status-cancelled {
  background-color: #fee2e2;
  color: #dc2626;
}

/* Enhanced Utility Classes */
.text-shadow {
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.text-shadow-lg {
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.bg-gradient-hospital {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.bg-gradient-health {
  background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 50%, #fecfef 100%);
}

.bg-gradient-success {
  background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
}

.glass-effect {
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.glass-effect-dark {
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Modern shadows */
.shadow-soft {
  box-shadow: 0 2px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.shadow-glow {
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.15);
}

.shadow-glow-green {
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.15);
}

/* Responsive improvements */
@media (max-width: 768px) {
  .mobile-full {
    width: 100% !important;
  }
  
  .mobile-hidden {
    display: none !important;
  }
  
  .mobile-text-center {
    text-align: center !important;
  }
}

/* Enhanced Animation Library */
.fade-in {
  animation: fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeIn {
  from { 
    opacity: 0; 
    transform: translateY(24px) scale(0.95); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0) scale(1); 
  }
}

.slide-in {
  animation: slideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideIn {
  from { 
    transform: translateX(-32px); 
    opacity: 0; 
  }
  to { 
    transform: translateX(0); 
    opacity: 1; 
  }
}

.scale-in {
  animation: scaleIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes scaleIn {
  from { 
    transform: scale(0.9); 
    opacity: 0; 
  }
  to { 
    transform: scale(1); 
    opacity: 1; 
  }
}

/* Bounce animation for success states */
.bounce-in {
  animation: bounceIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes bounceIn {
  0% {
    transform: scale(0.3);
    opacity: 0;
  }
  50% {
    transform: scale(1.05);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Floating animation for hero elements */
.float {
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0px);
  }
}

/* Enhanced Dashboard Navigation */
.dashboard-nav-item.active {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%) !important;
  color: #1d4ed8 !important;
  border-left: 4px solid #3b82f6;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
  transform: translateX(4px);
}

.admin-nav-item.active {
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%) !important;
  color: #047857 !important;
  border-left: 4px solid #10b981;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.15);
  transform: translateX(4px);
}

/* Hover effects for navigation */
.dashboard-nav-item:hover,
.admin-nav-item:hover {
  transform: translateX(2px);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.content-section {
  min-height: 400px;
}

/* Table styles */
.data-table {
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  border: 1px solid #e5e7eb;
  padding: 12px;
  text-align: left;
}

.data-table th {
  background-color: #f9fafb;
  font-weight: 600;
}

.data-table tbody tr:hover {
  background-color: #f9fafb;
}

/* Medical record specific styles */
.medical-record {
  border-left: 4px solid transparent;
}

.medical-record.lab-report {
  border-left-color: #3b82f6;
}

.medical-record.prescription {
  border-left-color: #10b981;
}

.medical-record.diagnosis {
  border-left-color: #f59e0b;
}

.medical-record.imaging {
  border-left-color: #8b5cf6;
}

/* Q&A specific styles */
.qa-question {
  border-left: 3px solid #e5e7eb;
  transition: border-color 0.2s ease;
}

.qa-question:hover {
  border-left-color: #3b82f6;
}

.qa-answer {
  background: linear-gradient(90deg, #f0f9ff 0%, #e0f2fe 100%);
}

/* Health calculator styles */
.calculator-card {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
}

.result-display {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border: 1px solid #10b981;
}

/* Print styles */
@media print {
  .no-print {
    display: none !important;
  }
  
  .print-full-width {
    width: 100% !important;
  }
}

/* Dark mode support (future enhancement) */
@media (prefers-color-scheme: dark) {
  /* Dark mode styles will be added here in future updates */
}

/* Accessibility improvements */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus indicators for keyboard navigation */
button:focus,
a:focus,
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* Custom checkbox and radio styles */
.custom-checkbox {
  appearance: none;
  width: 1rem;
  height: 1rem;
  border: 2px solid #d1d5db;
  border-radius: 0.25rem;
  background: white;
  cursor: pointer;
  position: relative;
}

.custom-checkbox:checked {
  background: #3b82f6;
  border-color: #3b82f6;
}

.custom-checkbox:checked::after {
  content: '';
  position: absolute;
  top: 1px;
  left: 4px;
  width: 4px;
  height: 8px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* ===========================================
   Notification System Styles
   =========================================== */

/* Notification container positioning */
#notification-container {
  max-height: 100vh;
  overflow: hidden;
}

/* Toast notification animations */
@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

.animate-slide-in-right {
  animation: slideInRight 0.3s ease-out forwards;
}

.animate-slide-out-right {
  animation: slideOutRight 0.3s ease-in forwards;
}

/* Notification bell styling */
.notification-bell {
  transition: all 0.2s ease;
}

.notification-bell:hover {
  transform: scale(1.05);
}

.notification-bell .fas.fa-bell {
  transition: all 0.2s ease;
}

.notification-bell:hover .fas.fa-bell {
  animation: bellRing 0.5s ease-in-out;
}

@keyframes bellRing {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-10deg); }
  75% { transform: rotate(10deg); }
}

/* Notification badge pulse animation */
.notification-bell .absolute {
  animation: badgePulse 2s infinite;
}

@keyframes badgePulse {
  0%, 100% { 
    transform: scale(1);
    opacity: 1;
  }
  50% { 
    transform: scale(1.1);
    opacity: 0.8;
  }
}

/* Toast notification styles */
.toast-notification {
  max-width: 400px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Notification center panel */
.notification-center-panel {
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Notification center animations */
@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.animate-fade-in-scale {
  animation: fadeInScale 0.2s ease-out forwards;
}

/* Notification item hover effects */
.notification-item {
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}

.notification-item:hover {
  background-color: rgba(59, 130, 246, 0.05);
  border-left-color: #3b82f6;
  transform: translateX(2px);
}

.notification-item.unread {
  background-color: rgba(59, 130, 246, 0.03);
  border-left-color: #3b82f6;
}

/* Notification type indicators */
.notification-success {
  border-left-color: #10b981 !important;
}

.notification-error {
  border-left-color: #ef4444 !important;
}

.notification-warning {
  border-left-color: #f59e0b !important;
}

.notification-info {
  border-left-color: #3b82f6 !important;
}

/* Settings toggle switches */
.notification-toggle {
  appearance: none;
  width: 44px;
  height: 24px;
  background: #e5e7eb;
  border-radius: 12px;
  position: relative;
  cursor: pointer;
  transition: all 0.3s ease;
}

.notification-toggle:checked {
  background: #3b82f6;
}

.notification-toggle::before {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: white;
  top: 2px;
  left: 2px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.notification-toggle:checked::before {
  transform: translateX(20px);
}

/* Loading states for notifications */
.notification-loading {
  position: relative;
  overflow: hidden;
}

.notification-loading::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* Priority indicators */
.notification-priority-high {
  border-left-width: 4px !important;
  border-left-color: #ef4444 !important;
}

.notification-priority-medium {
  border-left-width: 3px !important;
  border-left-color: #f59e0b !important;
}

.notification-priority-low {
  border-left-width: 2px !important;
  border-left-color: #6b7280 !important;
}

/* Notification actions */
.notification-actions {
  opacity: 0;
  transform: translateY(5px);
  transition: all 0.2s ease;
}

.notification-item:hover .notification-actions {
  opacity: 1;
  transform: translateY(0);
}

/* Empty state styling */
.notification-empty-state {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

/* Responsive design for notifications */
@media (max-width: 640px) {
  #notification-container {
    left: 1rem;
    right: 1rem;
    top: 1rem;
  }
  
  .notification-center-panel {
    width: 100vw;
    height: 100vh;
    max-width: none;
    max-height: none;
    border-radius: 0;
  }
  
  .toast-notification {
    max-width: none;
    margin: 0 1rem;
  }
}

/* Dark mode support (if implemented) */
@media (prefers-color-scheme: dark) {
  .toast-notification {
    background-color: #1f2937;
    border-color: #374151;
    color: #f9fafb;
  }
  
  .notification-center-panel {
    background-color: #1f2937;
    border-color: #374151;
  }
  
  .notification-item:hover {
    background-color: rgba(59, 130, 246, 0.1);
  }
}