/* Wet Lab Page Enhanced Typography Styles */

/* Global font override */
* {
  font-family: Arial, sans-serif !important;
}

/* Main content container improvements */
#auto-wetlab-content {
  font-family: Arial, sans-serif !important;
  line-height: 1.7;
  color: #2d3748;
  max-width: none;
  padding: 0 2rem;
}

/* Enhanced heading hierarchy */
#auto-wetlab-content h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: #1a202c;
  margin: 3rem 0 1.5rem 0;
  padding: 1.5rem 0 1rem 0;
  border-bottom: 4px solid #2b6cb0;
  position: relative;
  letter-spacing: -0.025em;
}

#auto-wetlab-content h1::before {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, #2b6cb0, #3182ce);
  border-radius: 2px;
}

#auto-wetlab-content h2 {
  font-size: 1.75rem;
  font-weight: 600;
  color: #2d3748;
  margin: 2.5rem 0 1rem 0;
  padding: 1rem 0 0.5rem 1rem;
  border-left: 5px solid #38a169;
  background: linear-gradient(90deg, rgba(56, 161, 105, 0.1), transparent);
  border-radius: 0 8px 8px 0;
  position: relative;
}

#auto-wetlab-content h2::before {
  content: '';
  position: absolute;
  left: -5px;
  top: 0;
  bottom: 0;
  width: 5px;
  background: linear-gradient(180deg, #38a169, #2f855a);
  border-radius: 3px 0 0 3px;
}

/* Enhanced paragraph styling */
#auto-wetlab-content p {
  margin: 1.25rem 0;
  text-align: justify;
  font-size: 16px;
  line-height: 1.3;
}

/* First paragraph after headings - lead paragraph style */
#auto-wetlab-content h1 + p,
#auto-wetlab-content h2 + p {
  font-size: 1.05rem;
  font-weight: 500;
  color: #4a5568;
  margin-top: 1rem;
  padding: 0;
  background: none;
  border-radius: 0;
  border-left: none;
}

/* Enhanced list styling */
#auto-wetlab-content ul {
  margin: 1.5rem 0;
  padding-left: 0;
}

#auto-wetlab-content ul li {
  margin: 0.75rem 0;
  padding: 0.25rem 0 0.25rem 1.25rem;
  position: relative;
  line-height: 1.7;
  background: none;
  border-radius: 0;
  transition: none;
}

#auto-wetlab-content ul li:hover {
  background: transparent;
}

#auto-wetlab-content ul li::before {
  position: absolute;
  left: 0.75rem;
  top: 0.5rem;
  color: #2b6cb0;
  font-weight: bold;
  font-size: 1.1rem;
}

/* Nested lists */
#auto-wetlab-content ul ul {
  margin: 0.5rem 0;
  padding-left: 1rem;
}

#auto-wetlab-content ul ul li {
  background: rgba(255, 255, 255, 0.7);
  margin: 0.5rem 0;
  padding: 0.25rem 0 0.25rem 1.5rem;
}

#auto-wetlab-content ul ul li::before {
  color: #38a169;
  left: 0.5rem;
}

/* Enhanced strong text styling */
#auto-wetlab-content strong {
  font-weight: 600;
  color: #2d3748;
  background: linear-gradient(120deg, rgba(43, 108, 176, 0.1), rgba(56, 161, 105, 0.1));
  padding: 0.1rem 0.3rem;
  border-radius: 3px;
}

/* Emphasis styling */
#auto-wetlab-content em {
  font-style: italic;
  color: #4a5568;
  background: rgba(237, 242, 247, 0.5);
  padding: 0.1rem 0.2rem;
  border-radius: 2px;
}

/* Enhanced image styling */
#auto-wetlab-content img {
  max-width: 100%;
  height: auto;
  margin: 2rem auto;
  display: block;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#auto-wetlab-content img:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

/* Figure caption styling - REMOVED auto-italic for all paragraphs after images
   Only use explicit <strong> tags for captions */

/* Link styling */
#auto-wetlab-content a {
  color: #2b6cb0;
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid transparent;
  transition: all 0.2s ease;
}

#auto-wetlab-content a:hover {
  color: #2c5282;
  border-bottom-color: #2b6cb0;
}

/* Special callout boxes for important information */
#auto-wetlab-content p:contains("Protocol"),
#auto-wetlab-content p:contains("Method") {
  background: linear-gradient(135deg, rgba(43, 108, 176, 0.1), rgba(56, 161, 105, 0.1));
  border: 1px solid rgba(43, 108, 176, 0.3);
  border-radius: 8px;
  padding: 1rem;
  margin: 1.5rem 0;
  font-size: 0.95rem;
  color: #2d3748;
}

/* Section dividers */
#auto-wetlab-content h1 + * {
  margin-top: 2rem;
}

#auto-wetlab-content h2 + * {
  margin-top: 1.5rem;
}

/* Responsive design */
@media (max-width: 768px) {
  #auto-wetlab-content {
    padding: 0 1rem;
  }
  
  #auto-wetlab-content h1 {
    font-size: 2rem;
    margin: 2rem 0 1rem 0;
  }
  
  #auto-wetlab-content h2 {
    font-size: 1.5rem;
    margin: 2rem 0 0.75rem 0;
    padding: 0.75rem 0 0.5rem 0.75rem;
  }
  
  #auto-wetlab-content ul li {
    padding: 0.5rem 0 0.5rem 1.5rem;
  }
  
  #auto-wetlab-content ul li::before {
    left: 0.5rem;
  }
}

/* Print styles */
@media print {
  #auto-wetlab-content h1,
  #auto-wetlab-content h2 {
    break-after: avoid;
  }
  
  #auto-wetlab-content img {
    break-inside: avoid;
    max-width: 100%;
  }
  
  #auto-wetlab-content ul li {
    break-inside: avoid;
  }
}

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

/* Enhanced focus states for accessibility */
#auto-wetlab-content a:focus,
#auto-wetlab-content h1:target,
#auto-wetlab-content h2:target {
  outline: 2px solid #2b6cb0;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Remove right-pane card box for Wet Lab pages */
.pagecontent {
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* Loading animation for images */
#auto-wetlab-content img {
  opacity: 0;
  animation: fadeInImage 0.5s ease-in-out forwards;
}

@keyframes fadeInImage {
  to {
    opacity: 1;
  }
}

/* Special styling for numbered sections */
#auto-wetlab-content h1[id*="1-"],
#auto-wetlab-content h1[id*="2-"],
#auto-wetlab-content h1[id*="3-"],
#auto-wetlab-content h1[id*="4-"],
#auto-wetlab-content h1[id*="5-"],
#auto-wetlab-content h1[id*="6-"],
#auto-wetlab-content h1[id*="7-"],
#auto-wetlab-content h1[id*="8-"] {
  counter-increment: section;
}

#auto-wetlab-content h2[id*="1-1"],
#auto-wetlab-content h2[id*="1-2"],
#auto-wetlab-content h2[id*="1-3"] {
  border-left-color: #38a169;
  background: linear-gradient(90deg, rgba(56, 161, 105, 0.1), transparent);
}

#auto-wetlab-content h2[id*="1-1"]::before,
#auto-wetlab-content h2[id*="1-2"]::before,
#auto-wetlab-content h2[id*="1-3"]::before {
  background: linear-gradient(180deg, #38a169, #2f855a);
}

/* Highlight boxes for important information - using classes instead of :contains */
#auto-wetlab-content .wetlab-warning {
  background: none;
  border-left: none;
  border-radius: 0;
  padding: 0;
  margin: 0;
  position: static;
}

#auto-wetlab-content .wetlab-warning::before {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  font-size: 1.5rem;
}

/* Success/experimental indicators */
#auto-wetlab-content .wetlab-success {
  background: none;
  border-left: none;
  border-radius: 0;
  padding: 0;
  margin: 0;
  position: static;
}

#auto-wetlab-content .wetlab-success::before {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
}

/* Wetlab information boxes */
#auto-wetlab-content .wetlab-info {
  background: none;
  border-left: none;
  border-radius: 0;
  padding: 0;
  margin: 0;
  position: static;
}

#auto-wetlab-content .wetlab-info::before {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
}

/* Enhanced mobile responsiveness */
@media (max-width: 768px) {
  #auto-wetlab-content > p,
  #auto-wetlab-content > ul {
    padding: 1rem;
    margin: 1rem 0;
  }
  
  #auto-wetlab-content h1::before {
    font-size: 1.5rem;
    margin-right: 0.25rem;
  }
  
  #auto-wetlab-content h2[id*="1-1"]::before,
  #auto-wetlab-content h2[id*="1-2"]::before,
  #auto-wetlab-content h2[id*="1-3"]::before {
    left: -1.5rem;
    font-size: 1.2rem;
  }
  
  /* Mobile image adjustments */
  #auto-wetlab-content img {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    max-width: 100%;
  }
  
  /* Mobile image groups - stack vertically on small screens */
  #auto-wetlab-content .image-group {
    flex-direction: column;
    gap: 1rem;
  }
  
  #auto-wetlab-content .image-group img {
    max-width: 100%;
    margin: 0.5rem 0;
  }
  
  #auto-wetlab-content p img {
    display: block;
    margin: 1rem auto;
  }
}

/* Table styling for experimental data */
#auto-wetlab-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  background: #ffffff; /* Solid white for maximum contrast */
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

#auto-wetlab-content table th {
  background: linear-gradient(135deg, #2b6cb0, #3182ce);
  color: #ffffff;
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

#auto-wetlab-content table td {
  padding: 1rem;
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  line-height: 1.6;
  color: #1a202c; /* Dark text for clarity */
}

#auto-wetlab-content table tr:hover {
  background: rgba(43, 108, 176, 0.05);
}

#auto-wetlab-content table tr:last-child td {
  border-bottom: none;
}

/* Timeline styling */
#auto-wetlab-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #4a5568;
  margin: 2rem 0 1rem 0;
  padding: 0.75rem 0 0.5rem 1rem;
  border-left: 4px solid #38a169;
  background: linear-gradient(90deg, rgba(56, 161, 105, 0.1), transparent);
  border-radius: 0 6px 6px 0;
}

/* Process, Method, Protocol sections */
#auto-wetlab-content h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #2d3748;
  margin: 1.5rem 0 0.75rem 0;
  padding: 0.5rem 0 0.5rem 0.75rem;
  border-left: 3px solid #2b6cb0;
  background: rgba(43, 108, 176, 0.1);
  border-radius: 0 4px 4px 0;
}

/* Enhanced blockquote styling for quotes and important information */
#auto-wetlab-content blockquote {
  border-left: 4px solid #2b6cb0;
  background: linear-gradient(135deg, rgba(43, 108, 176, 0.1), rgba(56, 161, 105, 0.1));
  padding: 1.5rem;
  margin: 2rem 0;
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: #4a5568;
  position: relative;
}

#auto-wetlab-content blockquote::before {
  content: '"';
  position: absolute;
  top: -0.5rem;
  left: 1rem;
  font-size: 3rem;
  color: #2b6cb0;
  opacity: 0.3;
  font-family: serif;
}

/* Code blocks and technical content */
#auto-wetlab-content code {
  background: rgba(43, 108, 176, 0.1);
  color: #2b6cb0;
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.9rem;
}

#auto-wetlab-content pre {
  background: rgba(45, 55, 72, 0.9);
  color: #e2e8f0;
  padding: 1.5rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1.5rem 0;
  border: 1px solid rgba(43, 108, 176, 0.3);
}

#auto-wetlab-content pre code {
  background: none;
  color: inherit;
  padding: 0;
}

/* Dark theme enhancements - Brighter headings */
:root.dark #auto-wetlab-content h1 {
  color: #ffffff !important;
  text-shadow: 0 0 50px rgba(59, 130, 246, 1), 0 0 30px rgba(59, 130, 246, 0.9), 0 0 15px rgba(59, 130, 246, 0.7);
  border-bottom-color: #3b82f6;
  font-weight: 700;
}

:root.dark #auto-wetlab-content h2 {
  color: #10b981 !important;
  text-shadow: 0 0 40px rgba(16, 185, 129, 1), 0 0 20px rgba(16, 185, 129, 0.8), 0 0 10px rgba(16, 185, 129, 0.6);
  border-left-color: #10b981;
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.2), transparent);
  font-weight: 700;
}

:root.dark #auto-wetlab-content h3 {
  color: #60a5fa !important;
  text-shadow: 0 0 30px rgba(96, 165, 250, 0.9), 0 0 15px rgba(96, 165, 250, 0.7), 0 0 8px rgba(96, 165, 250, 0.5);
  font-weight: 700;
}

:root.dark #auto-wetlab-content h4 {
  color: #34d399 !important;
  text-shadow: 0 0 30px rgba(52, 211, 153, 0.9), 0 0 15px rgba(52, 211, 153, 0.7), 0 0 8px rgba(52, 211, 153, 0.5);
  font-weight: 700;
}

:root.dark #auto-wetlab-content h5,
:root.dark #auto-wetlab-content h6 {
  color: #93c5fd !important;
  text-shadow: 0 0 25px rgba(147, 197, 253, 0.8), 0 0 12px rgba(147, 197, 253, 0.6), 0 0 6px rgba(147, 197, 253, 0.4);
  font-weight: 700;
}

/* Dark mode - ensure all text content is white/light colored */
:root.dark #auto-wetlab-content p,
:root.dark #auto-wetlab-content li,
:root.dark #auto-wetlab-content td,
:root.dark #auto-wetlab-content th,
:root.dark #auto-wetlab-content span,
:root.dark #auto-wetlab-content div {
  color: #ffffff !important;
}

:root.dark #auto-wetlab-content strong {
  color: #ffffff !important;
}

:root.dark #auto-wetlab-content em {
  color: #94a3b8 !important;
}

:root.dark #auto-wetlab-content a {
  color: #60a5fa !important;
}

:root.dark #auto-wetlab-content a:hover {
  color: #93c5fd !important;
}

/* Ensure figure captions are clearly visible in dark mode */
:root.dark #auto-wetlab-content p:has(strong:first-child) {
  color: #ffffff !important;
}

/* Progress indicators for numbered sections */

/* Sub-section indicators */

/* Enhanced content sections with visual cards */
#auto-wetlab-content > p:not(:first-child),
#auto-wetlab-content > ul {
  background: none;
  border-radius: 0;
  padding: 0;
  margin: 1.25rem 0;
  box-shadow: none;
  border: none;
  transition: none;
}

#auto-wetlab-content > p:hover,
#auto-wetlab-content > ul:hover {
  box-shadow: none;
  transform: none;
}

/* Special styling for overview section */
#auto-wetlab-content h1[id*="overview"] + p,
#auto-wetlab-content h1[id*="Overview"] + p {
  background: none;
  border: none;
  border-radius: 0;
  padding: 0;
  font-size: 1.05rem;
  line-height: 1.8;
  position: static;
  overflow: visible;
}

#auto-wetlab-content h1[id*="overview"] + p::before,
#auto-wetlab-content h1[id*="Overview"] + p::before {
  content: none;
}

/* Image gallery styling - centered images */
#auto-wetlab-content img {
  display: block;
  margin: 2rem auto;
  border: 3px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  max-width: 100%;
  height: auto;
}

#auto-wetlab-content img:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
  border-color: #2b6cb0;
}

/* Ensure paragraphs containing images are centered */
#auto-wetlab-content p:has(img) {
  text-align: center;
  margin: 2rem 0;
}

/* For multiple images in same paragraph - display as centered group */
#auto-wetlab-content p:has(img + img) {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

#auto-wetlab-content p:has(img + img) img {
  display: inline-block;
  margin: 0.5rem;
  vertical-align: middle;
}

/* Wrapper for image combinations to keep them centered together */
#auto-wetlab-content .image-group {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 2rem 0;
}

#auto-wetlab-content .image-group img {
  flex: 0 1 auto;
  margin: 0.5rem;
}

/* Figure captions are handled individually by their own styling - do not auto-italicize */

#auto-wetlab-content p:has(+ p em)::before,
#auto-wetlab-content p + p:has(em)::before {
  content: none;
}

/* Enhanced section separators */
#auto-wetlab-content h1 {
  position: relative;
  margin-top: 4rem;
}

#auto-wetlab-content h1::after {
  content: '';
  position: absolute;
  top: -2rem;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #2b6cb0, transparent);
  border-radius: 1px;
}

#auto-wetlab-content h1:first-of-type::after {
  display: none;
}

/* =========================
   Flat overrides to match Background style
   ========================= */
/* Headings: remove decorative borders, gradients, shadows */
#auto-wetlab-content h1,
#auto-wetlab-content h2,
#auto-wetlab-content h3,
#auto-wetlab-content h4,
#auto-wetlab-content h5,
#auto-wetlab-content h6 {
  padding: 0 !important;
  border: none !important;
  background: none !important;
  border-radius: 0 !important;
  position: static !important;
  text-shadow: none !important;
}

#auto-wetlab-content h1::before,
#auto-wetlab-content h1::after,
#auto-wetlab-content h2::before,
#auto-wetlab-content blockquote::before {
  content: none !important;
}

/* Text emphasis: remove background chips */
#auto-wetlab-content strong,
#auto-wetlab-content em {
  background: none !important;
  padding: 0 !important;
}

/* Lists: no emoji bullets and no background */
#auto-wetlab-content ul,
#auto-wetlab-content ul li,
#auto-wetlab-content ul ul,
#auto-wetlab-content ul ul li {
  background: none !important;
  box-shadow: none !important;
}

#auto-wetlab-content ul li::before,
#auto-wetlab-content ul ul li::before {
  content: none !important;
}

/* Paragraph/blocks: no cards */
#auto-wetlab-content > p,
#auto-wetlab-content > ul,
#auto-wetlab-content p:has(+ p em),
#auto-wetlab-content p + p:has(em) {
  background: none !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
}

/* Images: remove border, shadow, transitions */
#auto-wetlab-content img {
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  transition: none !important;
}

#auto-wetlab-content img:hover {
  transform: none !important;
  box-shadow: none !important;
}

/* Dark theme: keep everything flat */
.dark #auto-wetlab-content h1,
.dark #auto-wetlab-content h2,
.dark #auto-wetlab-content h3,
.dark #auto-wetlab-content h4,
.dark #auto-wetlab-content h5,
.dark #auto-wetlab-content h6 {
  text-shadow: none !important;
  border: none !important;
  background: none !important;
}
