/* Professional Medical Comments System CSS */

/* Reset margins and fix header positioning - ONLY for comment pages */
.comment-page {
  margin: 0;
  padding: 0;
}

/* Fix header to stick to top of screen - ONLY for comment pages */
.comment-page .header-sticky-fix {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 9999 !important;
}

/* Add padding to body to compensate for fixed header - ONLY for comment pages */
.comment-page.body-header-padding {
  padding-top: 90px !important;
}

/* Mobile adjustments - ONLY for comment pages */
@media (max-width: 768px) {
  .comment-page.body-header-padding {
    padding-top: 100px !important;
  }
  
  .enhanced-tab {
    padding: 8px 12px;
    font-size: 13px;
  }
  
  .comment-author-name {
    font-size: 16px !important;
  }
  
  .current-seg-enhanced {
    padding: 16px !important;
  }
}

/* Global styles for medical interface */
.medical-interface {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, #f8fafc 0%, #e0f2fe 50%, #e8eaf6 100%);
  min-height: 100vh;
}

/* Enhanced tab styling with vibrant colors */
.enhanced-tabs {
  background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
  border-radius: 16px;
  padding: 6px;
  display: flex;
  gap: 4px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.enhanced-tab {
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
}

.enhanced-tab.active {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: white;
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4), 0 2px 8px rgba(59, 130, 246, 0.3);
  transform: translateY(-1px);
}

.enhanced-tab.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmer-active 2s infinite;
}

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

.enhanced-tab:not(.active) {
  background: rgba(255, 255, 255, 0.7);
  color: #1e293b;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.enhanced-tab:not(.active):hover {
  background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
  color: #0f172a;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Enhanced user name styling */
.enhanced-user-name {
  font-weight: 800 !important;
  color: #0f172a !important;
  font-size: 16px !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.enhanced-user-role {
  font-weight: 600 !important;
  color: #475569 !important;
  font-size: 13px !important;
}

/* Enhanced "CURRENT SEG" styling */
.current-seg-enhanced {
  background: linear-gradient(135deg, #10b981, #059669) !important;
  color: white !important;
  font-weight: 900 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  border: 2px solid rgba(255, 255, 255, 0.3) !important;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4) !important;
  animation: pulse-glow 2s ease-in-out infinite alternate;
}

@keyframes pulse-glow {
  from { box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4); }
  to { box-shadow: 0 8px 30px rgba(16, 185, 129, 0.6); }
}

.current-seg-text {
  color: white !important;
  font-weight: 800 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Enhanced ID in current SEG */
.current-seg-enhanced .id-display {
  background: rgba(255, 255, 255, 0.95) !important;
  color: #0f172a !important;
  font-weight: 600 !important;
  border: 1px solid rgba(255, 255, 255, 0.8) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

/* Enhanced priority and status badges */
.priority-badge-enhanced {
  font-weight: 800 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
}

/* Enhanced author name in comments */
.comment-author-name {
  font-weight: 800 !important;
  color: #0f172a !important;
  font-size: 18px !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Enhanced comment content */
.comment-content {
  color: #1e293b !important;
  font-weight: 500 !important;
  line-height: 1.7;
}

/* Enhanced comment form styling */
.medical-review-form {
  background: linear-gradient(135deg, #f0fdf4, #dcfce7) !important;
  border: 2px solid #10b981 !important;
  box-shadow: 0 8px 30px rgba(16, 185, 129, 0.15) !important;
}

.medical-review-title {
  color: #000000 !important;
  font-weight: 900 !important;
  font-size: 20px !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.medical-review-subtitle {
  color: #000000 !important;
  font-weight: 700 !important;
  font-size: 14px !important;
}

/* Enhanced ID display */
.id-display {
  font-size: 11px !important;
  line-height: 1.4;
  word-break: break-all;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  background: rgba(255, 255, 255, 0.9) !important;
  max-height: 60px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

.id-display::-webkit-scrollbar {
  width: 4px;
}

.id-display::-webkit-scrollbar-track {
  background: transparent;
}

.id-display::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 2px;
}

/* Custom scrollbar for better UX */
.medical-interface ::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.medical-interface ::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 10px;
}

.medical-interface ::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #64b5f6, #42a5f5);
  border-radius: 10px;
  border: 2px solid #f1f5f9;
}

.medical-interface ::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #42a5f5, #1e88e5);
}

/* Header enhancements */
.medical-header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(59, 130, 246, 0.1);
  box-shadow: 0 4px 30px rgba(59, 130, 246, 0.1);
}

.live-indicator {
  position: relative;
  overflow: hidden;
}

.live-indicator::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(34, 197, 94, 0.3), transparent);
  animation: shimmer 2s infinite;
}

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

/* Avatar enhancements */
.avatar-ring {
  position: relative;
}

.avatar-ring::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(45deg, #3b82f6, #8b5cf6, #06b6d4);
  border-radius: 50%;
  z-index: -1;
  animation: rotate 3s linear infinite;
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Card hover effects */
.medical-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.medical-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), transparent);
  transition: left 0.5s;
}

.medical-card:hover::before {
  left: 100%;
}

.medical-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 40px rgba(59, 130, 246, 0.15);
}

/* Comment bubble styling */
.comment-bubble {
  position: relative;
  background: linear-gradient(145deg, #ffffff, #f8fafc);
  border: 1px solid rgba(59, 130, 246, 0.1);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 16px;
  transition: all 0.3s ease;
}

.comment-bubble:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.2);
}

.comment-bubble::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.3), transparent);
}

/* Priority badges */
.priority-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid;
  animation: pulse-subtle 2s ease-in-out infinite;
}

@keyframes pulse-subtle {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

.priority-critical {
  background: linear-gradient(135deg, #fef2f2, #fee2e2);
  color: #dc2626;
  border-color: #fca5a5;
  box-shadow: 0 0 20px rgba(220, 38, 38, 0.2);
}

.priority-high {
  background: linear-gradient(135deg, #fff7ed, #fed7aa);
  color: #ea580c;
  border-color: #fdba74;
  box-shadow: 0 0 20px rgba(234, 88, 12, 0.2);
}

.priority-medium {
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  color: #2563eb;
  border-color: #93c5fd;
  box-shadow: 0 0 20px rgba(37, 99, 235, 0.2);
}

.priority-low {
  background: linear-gradient(135deg, #f9fafb, #f3f4f6);
  color: #4b5563;
  border-color: #d1d5db;
}

/* Status badges */
.status-resolved {
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  color: #16a34a;
  border: 1px solid #bbf7d0;
  animation: success-glow 1.5s ease-in-out infinite alternate;
}

@keyframes success-glow {
  from { box-shadow: 0 0 10px rgba(22, 163, 74, 0.3); }
  to { box-shadow: 0 0 20px rgba(22, 163, 74, 0.5); }
}

.status-published {
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  color: #2563eb;
  border: 1px solid #93c5fd;
}

/* Form enhancements */
.medical-form {
  background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 20px;
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.medical-form::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6, #06b6d4);
  animation: gradient-shift 3s ease-in-out infinite;
}

@keyframes gradient-shift {
  0%, 100% { transform: translateX(-100%); }
  50% { transform: translateX(100%); }
}

.medical-textarea {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 12px;
  padding: 16px;
  font-family: inherit;
  transition: all 0.3s ease;
  resize: none;
}

.medical-textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1), 0 0 20px rgba(59, 130, 246, 0.2);
  background: rgba(255, 255, 255, 0.95);
}

/* Button enhancements */
.medical-button {
  position: relative;
  overflow: hidden;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.medical-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.medical-button:hover::before {
  left: 100%;
}

.medical-button:active {
  transform: translateY(1px);
}

.medical-button-primary {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
}

.medical-button-primary:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  box-shadow: 0 12px 35px rgba(59, 130, 246, 0.4);
  transform: translateY(-2px);
}

/* Tab navigation */
.medical-tabs {
  background: #f1f5f9;
  border-radius: 12px;
  padding: 4px;
  display: flex;
  gap: 4px;
}

.medical-tab {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}

.medical-tab.active {
  background: white;
  color: #3b82f6;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
}

.medical-tab:not(.active):hover {
  background: rgba(59, 130, 246, 0.05);
  color: #1f2937;
}

/* Review action cards */
.review-action-card {
  background: white;
  border-radius: 16px;
  padding: 20px;
  border: 1px solid;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.review-action-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: currentColor;
  opacity: 0.5;
}

.review-action-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.review-approve {
  border-color: #22c55e;
  color: #16a34a;
}

.review-approve:hover {
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  box-shadow: 0 20px 40px rgba(34, 197, 94, 0.2);
}

.review-revision {
  border-color: #eab308;
  color: #ca8a04;
}

.review-revision:hover {
  background: linear-gradient(135deg, #fefce8, #fef3c7);
  box-shadow: 0 20px 40px rgba(234, 179, 8, 0.2);
}

.review-clinical {
  border-color: #3b82f6;
  color: #2563eb;
}

.review-clinical:hover {
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  box-shadow: 0 20px 40px rgba(59, 130, 246, 0.2);
}

/* Loading animations */
.loading-spinner {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

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

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

/* Statistics cards */
.stat-card {
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  border: 1px solid rgba(148, 163, 184, 0.2);
  transition: all 0.3s ease;
}

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

.stat-number {
  font-size: 28px;
  font-weight: 700;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Responsive design */
@media (max-width: 768px) {
  .medical-interface {
    padding: 16px;
  }
  
  .comment-bubble {
    padding: 16px;
    margin-bottom: 12px;
  }
  
  .medical-form {
    padding: 16px;
  }
  
  .review-action-card {
    padding: 16px;
  }
  
  .stat-card {
    padding: 16px;
  }
  
  .stat-number {
    font-size: 24px;
  }
}

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

/* Focus styles for keyboard navigation */
.medical-button:focus,
.medical-textarea:focus,
.medical-tab:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .medical-card,
  .comment-bubble,
  .medical-form {
    border-width: 2px;
    border-color: #000;
  }
  
  .priority-badge,
  .status-resolved,
  .status-published {
    border-width: 2px;
  }
}

/* Dark mode support (for future implementation) */
@media (prefers-color-scheme: dark) {
  .medical-interface {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    color: #f8fafc;
  }
  
  .medical-header {
    background: rgba(15, 23, 42, 0.95);
    border-bottom-color: rgba(59, 130, 246, 0.2);
  }
  
  .comment-bubble,
  .medical-form {
    background: linear-gradient(145deg, #1e293b, #334155);
    border-color: rgba(59, 130, 246, 0.2);
  }
  
  .medical-textarea {
    background: rgba(30, 41, 59, 0.8);
    color: #f8fafc;
  }
}

/* Force all titles to be black */
.comment-page h1,
.comment-page h2, 
.comment-page h3,
.comment-page .text-black {
  color: #000000 !important;
  text-shadow: none !important;
  background: none !important;
  background-clip: unset !important;
  -webkit-background-clip: unset !important;
  -webkit-text-fill-color: #000000 !important;
}

/* Force timestamps and time elements to be black */
.comment-page .text-slate-600,
.comment-page .text-slate-500,
.comment-page .text-gray-600,
.comment-page .text-gray-500,
.comment-page [class*="text-slate"],
.comment-page [class*="text-gray"],
.comment-page time,
.comment-page [role="time"],
.comment-page .timestamp,
.comment-page [class*="time"] {
  color: #000000 !important;
  font-weight: 600 !important;
}

/* Force any remaining color variations to black */
.comment-page * {
  --tw-text-opacity: 1 !important;
}

.comment-page .text-xs {
  color: #000000 !important;
}

/* Beautiful Priority Dropdown */
.comment-page select {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  color: white !important;
  border: 2px solid transparent !important;
  border-radius: 12px !important;
  padding: 8px 16px !important;
  font-weight: 600 !important;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3) !important;
  transition: all 0.3s ease !important;
}

.comment-page select:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4) !important;
}

.comment-page select:focus {
  outline: none !important;
  border-color: #4CAF50 !important;
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.3) !important;
}

/* Beautiful Headers with Black Text */
.comment-page h1 {
  color: #000000 !important;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 50%, #f1f5f9 100%) !important;
  padding: 16px 24px !important;
  border-radius: 12px !important;
  border: 1px solid #e2e8f0 !important;
  font-weight: 700 !important;
  text-shadow: none !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05) !important;
  margin-bottom: 16px !important;
  -webkit-text-fill-color: #000000 !important;
  background-clip: unset !important;
  -webkit-background-clip: unset !important;
}

/* Force ALL elements inside h1 to be black */
.comment-page h1 *,
.comment-page h1 span,
.comment-page h1 div,
.comment-page h1 badge,
.comment-page h1 .badge,
.comment-page h1 [class*="badge"],
.comment-page h1 [class*="tag"],
.comment-page h1 [class*="label"] {
  color: #000000 !important;
  -webkit-text-fill-color: #000000 !important;
  background-clip: unset !important;
  -webkit-background-clip: unset !important;
  text-shadow: none !important;
}

.comment-page h2 {
  color: #000000 !important;
  background: linear-gradient(135deg, #fafbff 0%, #f0f4ff 50%, #e6f0ff 100%) !important;
  padding: 12px 20px !important;
  border-radius: 10px !important;
  border: 1px solid #d1d5db !important;
  font-weight: 600 !important;
  text-shadow: none !important;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.04) !important;
  margin-bottom: 12px !important;
  -webkit-text-fill-color: #000000 !important;
  background-clip: unset !important;
  -webkit-background-clip: unset !important;
}

/* Force ALL elements inside h2 to be black */
.comment-page h2 *,
.comment-page h2 span,
.comment-page h2 div,
.comment-page h2 badge,
.comment-page h2 .badge,
.comment-page h2 [class*="badge"],
.comment-page h2 [class*="tag"],
.comment-page h2 [class*="label"] {
  color: #000000 !important;
  -webkit-text-fill-color: #000000 !important;
  background-clip: unset !important;
  -webkit-background-clip: unset !important;
  text-shadow: none !important;
}

/* Beautiful Priority Labels */
.comment-page .bg-red-100 {
  background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%) !important;
  color: #8B0000 !important;
  border-color: #ff6b9d !important;
}

.comment-page .bg-orange-100 {
  background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%) !important;
  color: #8B4513 !important;
  border-color: #ff8a50 !important;
}

.comment-page .bg-blue-100 {
  background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%) !important;
  color: #003366 !important;
  border-color: #50bcdf !important;
}

.comment-page .bg-gray-100 {
  background: linear-gradient(135deg, #d299c2 0%, #fef9d7 100%) !important;
  color: #4A4A4A !important;
  border-color: #a8a8a8 !important;
}

/* Beautiful Role Colors */
.comment-page .bg-purple-100 {
  background: linear-gradient(135deg, #c471ed 0%, #f64f59 100%) !important;
  color: #4A0E4E !important;
  border-color: #a855f7 !important;
}

.comment-page .bg-green-100 {
  background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%) !important;
  color: #1B5E20 !important;
  border-color: #4caf50 !important;
}

.comment-page .bg-pink-100 {
  background: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 100%) !important;
  color: #880E4F !important;
  border-color: #e91e63 !important;
}

/* Beautiful Emerald Badges for Header */
.comment-page .bg-emerald-100 {
  background: linear-gradient(135deg, #064e3b 0%, #065f46 100%) !important;
  color: #ffffff !important;
  border: 2px solid #10b981 !important;
  border-radius: 20px !important;
  padding: 6px 14px !important;
  font-weight: 600 !important;
  font-size: 12px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2) !important;
  transition: all 0.3s ease !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
}

.comment-page .bg-emerald-100:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3) !important;
  background: linear-gradient(135deg, #065f46 0%, #047857 100%) !important;
}

/* Override emerald text color specifically */
.comment-page .text-emerald-800 {
  color: #ffffff !important;
}

/* Custom Badge Styles */
.comment-page .series-badge {
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%) !important;
  color: #ffffff !important;
  border: 2px solid #60a5fa !important;
  border-radius: 16px !important;
  padding: 4px 12px !important;
  font-weight: 600 !important;
  font-size: 11px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  box-shadow: 0 2px 6px rgba(59, 130, 246, 0.25) !important;
  transition: all 0.3s ease !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  margin-left: 8px !important;
}

.comment-page .series-badge:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 10px rgba(59, 130, 246, 0.35) !important;
}

.comment-page .comment-count-badge {
  background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%) !important;
  color: #ffffff !important;
  border: 2px solid #c084fc !important;
  border-radius: 16px !important;
  padding: 4px 12px !important;
  font-weight: 600 !important;
  font-size: 11px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  box-shadow: 0 2px 6px rgba(168, 85, 247, 0.25) !important;
  transition: all 0.3s ease !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  margin-left: 8px !important;
}

.comment-page .comment-count-badge:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 10px rgba(168, 85, 247, 0.35) !important;
}

/* Beautiful Post Review Button */
.comment-page button[type="submit"] {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  color: white !important;
  border: none !important;
  border-radius: 12px !important;
  padding: 12px 24px !important;
  font-weight: 600 !important;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3) !important;
  transition: all 0.3s ease !important;
  text-transform: uppercase !important;
  letter-spacing: 1px !important;
}

.comment-page button[type="submit"]:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5) !important;
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%) !important;
}

.comment-page button[type="submit"]:active {
  transform: translateY(0) !important;
}

/* Beautiful Comment Input Area */
.comment-page textarea {
  background: linear-gradient(135deg, #f8f9ff 0%, #f0f4ff 100%) !important;
  border: 2px solid #e2e8f0 !important;
  border-radius: 12px !important;
  padding: 16px !important;
  font-size: 14px !important;
  transition: all 0.3s ease !important;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.05) !important;
}

.comment-page textarea:focus {
  outline: none !important;
  border-color: #667eea !important;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1), inset 0 2px 4px rgba(0,0,0,0.05) !important;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%) !important;
}

.comment-page textarea::placeholder {
  color: #94a3b8 !important;
  font-style: italic !important;
}

/* Beautiful Filter Buttons */
.comment-page .filter-button {
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%) !important;
  color: #475569 !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 8px !important;
  padding: 6px 12px !important;
  font-weight: 500 !important;
  transition: all 0.2s ease !important;
}

.comment-page .filter-button:hover {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  color: white !important;
  transform: translateY(-1px) !important;
}

  .comment-page .filter-button.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3) !important;
  }

  /* Professional Chat Interface */
  .comment-page .professional-chat-container {
    background: #ffffff !important;
    border-radius: 20px !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12) !important;
    overflow: hidden !important;
    max-width: 100% !important;
    margin: 0 auto !important;
  }

  /* GitLab-Style Medical Comment System */
  .comment-page .medical-comment-system {
    background: #ffffff !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08) !important;
    border: 1px solid #e5e7eb !important;
    overflow: hidden !important;
    width: 100% !important;
    margin: 0 !important;
  }

  /* Comment form styling */
  .comment-page .medical-comment-system textarea {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    line-height: 1.5 !important;
    border-color: #d1d5db !important;
  }

  .comment-page .medical-comment-system textarea:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
  }

  /* Resolved comment styling */
  .comment-page .medical-comment-system .bg-green-50 {
    background-color: #f0fdf4 !important;
    border-left: 4px solid #22c55e !important;
  }

  /* Priority badges */
  .comment-page .medical-comment-system .px-2.py-1 {
    font-size: 0.75rem !important;
    font-weight: 600 !important;
  }

  /* Action buttons */
  .comment-page .medical-comment-system button {
    transition: all 0.2s ease !important;
  }

  .comment-page .medical-comment-system button:hover {
    transform: translateY(-1px) !important;
  }

  /* Clean layout for GitLab-style comments */
  .comment-page .comment-page-content {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  /* Comment thread spacing */
  .comment-page .medical-comment-system .divide-y > div {
    padding: 24px !important;
  }

  /* Prose styling for comment content */
  .comment-page .prose p {
    margin-bottom: 0 !important;
    color: #374151 !important;
    font-size: 0.875rem !important;
    line-height: 1.5 !important;
  }

  /* Ensure proper text wrapping */
  .comment-page .medical-comment-system .whitespace-pre-wrap {
    white-space: pre-wrap !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
  }

  .comment-page .chat-messages-area::-webkit-scrollbar {
    width: 6px !important;
  }

  .comment-page .chat-messages-area::-webkit-scrollbar-track {
    background: #f1f5f9 !important;
    border-radius: 3px !important;
  }

  .comment-page .chat-messages-area::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #64748b 0%, #475569 100%) !important;
    border-radius: 3px !important;
  }

  .comment-page .chat-messages-area::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #475569 0%, #334155 100%) !important;
  }

  /* Message animations */
  .comment-page .chat-messages-area > div > div {
    animation: slideIn 0.3s ease-out !important;
  }

  @keyframes slideIn {
    from {
      opacity: 0;
      transform: translateY(10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  /* Fix header z-index and positioning issues */
  .header-fix-container {
    position: relative !important;
    z-index: 999 !important;
  }

  /* Ensure header doesn't overlap content */
  .comment-page-wrapper {
    display: flex !important;
    flex-direction: column !important;
    min-height: 100vh !important;
  }

  .comment-page-content {
    flex: 1 !important;
    padding-top: 20px !important;
  }

  /* Professional header styling */
  .header-section {
    background: linear-gradient(135deg, #1e293b 0%, #3730a3 100%) !important;
    border-bottom: 2px solid #4338ca !important;
    z-index: 998 !important;
    position: relative !important;
  }

  .comment-page .chat-messages {
    scrollbar-width: thin !important;
    scrollbar-color: #cbd5e1 #f1f5f9 !important;
  }

  .comment-page .chat-messages::-webkit-scrollbar {
    width: 6px !important;
  }

  .comment-page .chat-messages::-webkit-scrollbar-track {
    background: #f1f5f9 !important;
    border-radius: 3px !important;
  }

  .comment-page .chat-messages::-webkit-scrollbar-thumb {
    background: #cbd5e1 !important;
    border-radius: 3px !important;
  }

  .comment-page .chat-messages::-webkit-scrollbar-thumb:hover {
    background: #94a3b8 !important;
  }

  /* Message Bubbles */
  .comment-page .message-bubble {
    animation: messageSlideIn 0.3s ease-out !important;
  }

  @keyframes messageSlideIn {
    from {
      opacity: 0;
      transform: translateY(10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .comment-page .message-sent .message-content {
    border-bottom-right-radius: 4px !important;
  }

  .comment-page .message-received .message-content {
    border-bottom-left-radius: 4px !important;
  }

  /* Chat Input Enhancements */
  .comment-page .quick-message-input input:focus {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15) !important;
  }

  /* Online Status Pulse */
  @keyframes pulse-green {
    0%, 100% {
      opacity: 1;
    }
    50% {
      opacity: 0.5;
    }
  }

  .comment-page .animate-pulse {
    animation: pulse-green 2s cubic-bezier(0.4, 0, 0.6, 1) infinite !important;
  }

/* Override any gradient text */
.comment-page .bg-gradient-to-r,
.comment-page .bg-clip-text,
.comment-page .text-transparent {
  background: none !important;
  background-clip: unset !important;
  -webkit-background-clip: unset !important;
  -webkit-text-fill-color: #000000 !important;
  color: #000000 !important;
}

.comment-page .bg-gradient-to-r,
.comment-page .from-emerald-500,
.comment-page .to-emerald-600 {
  background: linear-gradient(to right, #10b981, #059669) !important;
}

/* 🎯 Notification Badge & Status Button Animations */

/* Glowing notification badge animation */
@keyframes badge-glow {
  0%, 100% { 
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.4), 0 0 0 0 rgba(239, 68, 68, 0.3); 
  }
  50% { 
    box-shadow: 0 6px 24px rgba(239, 68, 68, 0.6), 0 0 0 8px rgba(239, 68, 68, 0.1); 
  }
}

/* Badge bounce on hover */
@keyframes badge-bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-6px); }
  60% { transform: translateY(-3px); }
}

/* Notification badge pulse with breathing effect */
@keyframes notification-pulse {
  0%, 100% { 
    transform: scale(1);
    opacity: 1;
  }
  50% { 
    transform: scale(1.1);
    opacity: 0.9;
  }
}

/* Status button glow effect */
@keyframes status-glow {
  0%, 100% { 
    box-shadow: 0 8px 32px rgba(59, 130, 246, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  }
  50% { 
    box-shadow: 0 12px 40px rgba(59, 130, 246, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  }
}

/* Progress bar animation */
@keyframes progress-flow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Tooltip slide up animation */
@keyframes tooltip-slide-up {
  0% { 
    opacity: 0;
    transform: translate(-50%, 10px);
  }
  100% { 
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

/* Enhanced notification badge styling */
.comment-page .notification-badge {
  animation: notification-pulse 2s ease-in-out infinite, badge-glow 3s ease-in-out infinite;
  position: relative;
  z-index: 10;
}

.comment-page .notification-badge:hover {
  animation: badge-bounce 0.6s ease-in-out, badge-glow 3s ease-in-out infinite;
}

/* Status button enhanced styling */
.comment-page .status-button {
  animation: status-glow 4s ease-in-out infinite;
  position: relative;
  overflow: hidden;
}

/* Progress bar with flowing gradient */
.comment-page .progress-bar {
  background: linear-gradient(90deg, #fbbf24, #f59e0b, #d97706, #f59e0b, #fbbf24);
  background-size: 200% 100%;
  animation: progress-flow 3s ease-in-out infinite;
}

/* Tooltip with slide animation */
.comment-page .status-tooltip {
  animation: tooltip-slide-up 0.3s ease-out;
}

/* Additional hover effects for the status area */
.comment-page .status-group:hover .notification-badge {
  animation: badge-bounce 0.6s ease-in-out infinite alternate;
}

/* Shimmer effect for text */
@keyframes text-shimmer {
  0% { background-position: -200px 0; }
  100% { background-position: calc(200px + 100%) 0; }
}

.comment-page .shimmer-text {
  background: linear-gradient(90deg, #ffffff 25%, rgba(255, 255, 255, 0.8) 50%, #ffffff 75%);
  background-size: 200px 100%;
  animation: text-shimmer 2s infinite linear;
  -webkit-background-clip: text;
  background-clip: text;
}

/* Breathing animation for glow background */
@keyframes background-breathe {
  0%, 100% { 
    opacity: 0.3;
    transform: scale(1);
  }
  50% { 
    opacity: 0.6;
    transform: scale(1.05);
  }
}

.comment-page .glow-background {
  animation: background-breathe 4s ease-in-out infinite;
}

/* Professional medical button states */
.comment-page .medical-button-pending {
  position: relative;
  overflow: hidden;
}

.comment-page .medical-button-pending::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  animation: button-shine 3s infinite;
}

@keyframes button-shine {
  0% { left: -100%; }
  50% { left: 100%; }
  100% { left: 100%; }
}

/* Counter badge with number flip animation */
@keyframes number-flip {
  0% { transform: rotateY(0deg); }
  50% { transform: rotateY(90deg); }
  100% { transform: rotateY(0deg); }
}

.comment-page .counter-badge {
  animation: number-flip 0.6s ease-in-out;
}

/* Medical grade attention grabbing pulse */
@keyframes medical-attention {
  0%, 100% { 
    transform: scale(1);
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.4);
  }
  25% { 
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
  }
  50% { 
    transform: scale(1.1);
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.6);
  }
  75% { 
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
  }
}

.comment-page .medical-attention {
  animation: medical-attention 2s ease-in-out infinite;
}

/* Responsive animations for mobile */
@media (max-width: 768px) {
  .comment-page .notification-badge {
    animation-duration: 3s;
  }
  
  .comment-page .status-button {
    animation-duration: 5s;
  }
  
  .comment-page .progress-bar {
    animation-duration: 4s;
  }
}

/* Reduced motion accessibility */
@media (prefers-reduced-motion: reduce) {
  .comment-page .notification-badge,
  .comment-page .status-button,
  .comment-page .progress-bar,
  .comment-page .glow-background,
  .comment-page .medical-button-pending::before {
    animation: none;
  }
} 