/* UmrahUpdates Custom Styles */

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

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

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

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

/* Smooth transitions */
.tab-btn {
  transition: all 0.3s ease;
}

/* Impact level indicators */
.impact-critical {
  animation: pulse-red 2s infinite;
}

.impact-high {
  animation: pulse-orange 2s infinite;
}

@keyframes pulse-red {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
  }
}

@keyframes pulse-orange {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(245, 158, 11, 0);
  }
}

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

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

/* Loading states */
.loading-spinner {
  border: 3px solid #f3f3f3;
  border-top: 3px solid #16a34a;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  animation: spin 1s linear infinite;
}

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

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

/* Impact assessment results */
.impact-assessment {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 1px solid #3b82f6;
}

/* Source status indicators */
.source-active::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 20px;
  background: #16a34a;
  border-radius: 2px;
}

.source-inactive::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 20px;
  background: #ef4444;
  border-radius: 2px;
}

/* Verification badges */
.verified-badge {
  background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
  color: #166534;
  border: 1px solid #16a34a;
}

.pending-badge {
  background: linear-gradient(135deg, #fefce8 0%, #fef3c7 100%);
  color: #92400e;
  border: 1px solid #f59e0b;
}

.disputed-badge {
  background: linear-gradient(135deg, #fef2f2 0%, #fecaca 100%);
  color: #991b1b;
  border: 1px solid #ef4444;
}

/* Responsive design improvements */
@media (max-width: 768px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .grid {
    gap: 1rem;
  }
  
  .tab-btn {
    font-size: 0.875rem;
    padding: 0.75rem 0.5rem;
  }
  
  .rule-change-card {
    margin-bottom: 1rem;
  }
}

/* Print styles for important updates */
@media print {
  .no-print {
    display: none !important;
  }
  
  .rule-change-card {
    break-inside: avoid;
    page-break-inside: avoid;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.4;
  }
}

/* Focus states for accessibility */
button:focus,
input:focus,
select:focus {
  outline: 2px solid #16a34a;
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .bg-gray-50 {
    background-color: #ffffff;
  }
  
  .text-gray-600 {
    color: #000000;
  }
  
  .border-gray-300 {
    border-color: #000000;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Dark mode (if needed in future) */
@media (prefers-color-scheme: dark) {
  /* Dark mode styles can be added here */
}

/* Custom notification styles */
.notification {
  animation: slideInRight 0.3s ease-out;
}

.notification.hide {
  animation: slideOutRight 0.3s ease-in;
}

@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;
  }
}

/* Timeline specific styles */
.timeline-item::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 24px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #16a34a;
}

.timeline-item {
  position: relative;
  border-left: 2px solid #e5e7eb;
  padding-left: 24px;
}

.timeline-item:last-child {
  border-left: none;
}

/* Utility classes for impact levels */
.text-impact-critical {
  color: #dc2626;
}

.text-impact-high {
  color: #ea580c;
}

.text-impact-medium {
  color: #2563eb;
}

.text-impact-low {
  color: #16a34a;
}

.bg-impact-critical {
  background-color: #fef2f2;
}

.bg-impact-high {
  background-color: #fff7ed;
}

.bg-impact-medium {
  background-color: #eff6ff;
}

.bg-impact-low {
  background-color: #f0fdf4;
}