/* ===========================================================
   PREMIUM BLOOD COLLECTION TUBES DESIGN SYSTEM
   Specialized Medical Laboratory Science Interface
   Harmonized with Unified Article Design System
   Version: 2.0 | Professional & Color-Coded
   =========================================================== */

/* -----------------------------------------------------------
   TUBE COLOR INDICATORS - ENHANCED DESIGN
   ----------------------------------------------------------- */
.tube-color-indicator {
  display: inline-block;
  width: 24px;
  height: 24px;
  border-radius: 0.375rem;
  margin-right: 0.75rem;
  vertical-align: middle;
  border: 2px solid rgba(15, 23, 42, 0.15);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.1), inset 0 1px 2px rgba(255, 255, 255, 0.3);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.tube-color-indicator::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  right: 2px;
  height: 40%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.4) 0%, transparent 100%);
  border-radius: 0.25rem 0.25rem 0 0;
  pointer-events: none;
}

.tube-color-indicator:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
}

/* Accurate Medical-Grade Color Backgrounds */
.lavender-bg { 
  background: linear-gradient(135deg, #b388eb 0%, #9d6fd1 100%);
}

.blue-bg { 
  background: linear-gradient(135deg, #4cc9f0 0%, #3ab5db 100%);
}

.green-bg { 
  background: linear-gradient(135deg, #06d6a0 0%, #05c28f 100%);
}

.red-bg { 
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%);
}

.gray-bg { 
  background: linear-gradient(135deg, #adb5bd 0%, #98a2ab 100%);
}

.yellow-bg { 
  background: linear-gradient(135deg, #ffd166 0%, #f5c451 100%);
}

.royal-blue-bg { 
  background: linear-gradient(135deg, #4361ee 0%, #3651d9 100%);
}

.black-bg { 
  background: linear-gradient(135deg, #2c3e50 0%, #1a252f 100%);
}

/* -----------------------------------------------------------
   TUBE COLOR BADGES - TABLE DISPLAY
   ----------------------------------------------------------- */
.tube-color-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-weight: 600;
  color: #ffffff;
  font-size: 0.9375rem;
  text-align: center;
  min-width: 100px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.12);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.tube-color-badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.18);
}

/* Badge Color Variants */
.lavender-badge { 
  background: linear-gradient(135deg, #b388eb 0%, #9d6fd1 100%);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.blue-badge { 
  background: linear-gradient(135deg, #4cc9f0 0%, #3ab5db 100%);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.green-badge { 
  background: linear-gradient(135deg, #06d6a0 0%, #05c28f 100%);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.red-badge { 
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.gray-badge { 
  background: linear-gradient(135deg, #adb5bd 0%, #98a2ab 100%);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.yellow-badge { 
  background: linear-gradient(135deg, #ffd166 0%, #f5c451 100%);
  color: #1e293b;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

.royal-blue-badge { 
  background: linear-gradient(135deg, #4361ee 0%, #3651d9 100%);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.black-badge { 
  background: linear-gradient(135deg, #2c3e50 0%, #1a252f 100%);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* -----------------------------------------------------------
   TUBE DETAIL GRIDS - PREMIUM CARD LAYOUT
   ----------------------------------------------------------- */

.tube-detail-card {
  background: #ffffff;
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.04);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  border-top: 4px solid #cbd5e1;
  border: 1px solid #e2e8f0;
  margin-top: 1rem;
}

.tube-detail-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, currentColor 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tube-detail-card::after {
  content: '';
  position: absolute;
  bottom: -60%;
  right: -60%;
  width: 250px;
  height: 250px;
  border-radius: 50%;
  opacity: 0.04;
  pointer-events: none;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.1, 1);
}

.tube-detail-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12), 0 4px 12px rgba(15, 23, 42, 0.08);
  border-color: #cbd5e1;
}

.tube-detail-card:hover::before {
  opacity: 1;
}

.tube-detail-card:hover::after {
  bottom: -40%;
  right: -40%;
  opacity: 0.06;
}

.tube-detail-card h3 {
  display: flex;
  align-items: center;
  margin: 0 0 1.5rem;
  font-size: 1.375rem;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.tube-detail-card ul {
  list-style: none;
  padding-left: 0;
  margin: 1.25rem 0;
}

.tube-detail-card li {
  margin: 1rem 0;
  line-height: 1.7;
  padding-left: 1.75rem;
  position: relative;
  color: #334155;
  font-size: 1.0625rem;
}

.tube-detail-card li::before {
  content: '▸';
  position: absolute;
  left: 0;
  font-size: 1.25em;
  line-height: 1.4;
  font-weight: 600;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.tube-detail-card li:hover::before {
  transform: translateX(3px);
}

.tube-detail-card li strong {
  color: #0f172a;
  font-weight: 600;
}

.tube-detail-card li em {
  display: block;
  margin-top: 0.375rem;
  color: #64748b;
  font-style: italic;
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* -----------------------------------------------------------
   COLOR-SPECIFIC ACCENTS - MEDICAL ACCURACY
   ----------------------------------------------------------- */

/* Lavender - EDTA (Hematology) */
.lavender-accent {
  border-top-color: #b388eb;
  color: #b388eb;
}

.lavender-accent::after {
  background: radial-gradient(circle, #b388eb 0%, transparent 70%);
}

.lavender-accent li::before {
  color: #b388eb;
}

.lavender-accent:hover {
  border-color: rgba(179, 136, 235, 0.3);
}

/* Light Blue - Sodium Citrate (Coagulation) */
.blue-accent {
  border-top-color: #4cc9f0;
  color: #4cc9f0;
}

.blue-accent::after {
  background: radial-gradient(circle, #4cc9f0 0%, transparent 70%);
}

.blue-accent li::before {
  color: #4cc9f0;
}

.blue-accent:hover {
  border-color: rgba(76, 201, 240, 0.3);
}

/* Green - Heparin (Chemistry) */
.green-accent {
  border-top-color: #06d6a0;
  color: #06d6a0;
}

.green-accent::after {
  background: radial-gradient(circle, #06d6a0 0%, transparent 70%);
}

.green-accent li::before {
  color: #06d6a0;
}

.green-accent:hover {
  border-color: rgba(6, 214, 160, 0.3);
}

/* Red - No Additive (Serum) */
.red-accent {
  border-top-color: #ff6b6b;
  color: #ff6b6b;
}

.red-accent::after {
  background: radial-gradient(circle, #ff6b6b 0%, transparent 70%);
}

.red-accent li::before {
  color: #ff6b6b;
}

.red-accent:hover {
  border-color: rgba(255, 107, 107, 0.3);
}

/* Gray - Sodium Fluoride (Glucose) */
.gray-accent {
  border-top-color: #adb5bd;
  color: #adb5bd;
}

.gray-accent::after {
  background: radial-gradient(circle, #adb5bd 0%, transparent 70%);
}

.gray-accent li::before {
  color: #6c757d;
}

.gray-accent:hover {
  border-color: rgba(173, 181, 189, 0.3);
}

/* Yellow - Gel Separator (Serum) */
.yellow-accent {
  border-top-color: #ffd166;
  color: #ffd166;
}

.yellow-accent::after {
  background: radial-gradient(circle, #ffd166 0%, transparent 70%);
}

.yellow-accent li::before {
  color: #f59e0b;
}

.yellow-accent:hover {
  border-color: rgba(255, 209, 102, 0.3);
}

/* Royal Blue - Trace Elements */
.royal-blue-accent {
  border-top-color: #4361ee;
  color: #4361ee;
}

.royal-blue-accent::after {
  background: radial-gradient(circle, #4361ee 0%, transparent 70%);
}

.royal-blue-accent li::before {
  color: #4361ee;
}

.royal-blue-accent:hover {
  border-color: rgba(67, 97, 238, 0.3);
}

/* Black - Blood Culture */
.black-accent {
  border-top-color: #2c3e50;
  color: #2c3e50;
}

.black-accent::after {
  background: radial-gradient(circle, #495057 0%, transparent 70%);
}

.black-accent li::before {
  color: #212529;
}

.black-accent:hover {
  border-color: rgba(44, 62, 80, 0.3);
}

/* -----------------------------------------------------------
   ORDER OF DRAW - CRITICAL SEQUENCE VISUALIZATION
   ----------------------------------------------------------- */
.order-of-draw-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin: 3rem 0;
  padding: 2.5rem;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.04) 0%, rgba(139, 92, 246, 0.04) 100%);
  border-radius: 1rem;
  border: 2px dashed #cbd5e1;
  position: relative;
  overflow: hidden;
}

.order-of-draw-container::before {
  content: '🔢';
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  font-size: 3rem;
  opacity: 0.1;
}

.order-of-draw-container h3 {
  margin: 0 0 1.5rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: #0f172a;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.order-step-card {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  background: #ffffff;
  padding: 1.5rem 2rem;
  border-radius: 1rem;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-left: 4px solid #e2e8f0;
  position: relative;
}

.order-step-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, #3b82f6 0%, #8b5cf6 100%);
  opacity: 0;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.order-step-card:hover {
  transform: translateX(8px);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.12);
}

.order-step-card:hover::before {
  opacity: 1;
}

.step-number-badge {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.5rem;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
  position: relative;
}

.step-number-badge::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(59, 130, 246, 0.2);
  animation: pulse-ring 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse-ring {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.1);
  }
}

.step-content {
  flex: 1;
}

.step-content h4 {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 0.75rem;
  font-size: 1.25rem;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.step-content p {
  margin: 0.5rem 0;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: #334155;
}

.step-content p strong {
  color: #3b82f6;
  font-weight: 600;
}

.step-content ul {
  margin: 1rem 0;
  padding-left: 1.75rem;
}

.step-content li {
  margin: 0.5rem 0;
  line-height: 1.6;
  color: #475569;
}

/* -----------------------------------------------------------
   ADDITIONAL UTILITY CLASSES
   ----------------------------------------------------------- */
.tube-icon {
  font-size: 1.25rem;
  margin-right: 0.5rem;
  vertical-align: middle;
}

.additive-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.75rem;
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #475569;
  margin: 0.25rem;
  border: 1px solid #cbd5e1;
}

.clinical-note {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  padding: 1.25rem 1.5rem;
  border-radius: 0.75rem;
  margin: 1.5rem 0;
  border-left: 4px solid #f59e0b;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.1);
}

.clinical-note strong {
  color: #92400e;
  font-weight: 600;
}

.warning-box {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  padding: 1.25rem 1.5rem;
  border-radius: 0.75rem;
  margin: 1.5rem 0;
  border-left: 4px solid #ef4444;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.1);
}

.warning-box strong {
  color: #991b1b;
  font-weight: 600;
}

/* -----------------------------------------------------------
   RESPONSIVE DESIGN - MOBILE OPTIMIZATION
   ----------------------------------------------------------- */

@media screen and (max-width: 768px) {
  
  .tube-detail-card {
    padding: 1.5rem;
  }
  
  .tube-detail-card h3 {
    font-size: 1.25rem;
  }
  
  .order-of-draw-container {
    padding: 1.5rem;
  }
  
  .order-step-card {
    flex-direction: row;
    align-items: flex-start;
    padding: 1.25rem;
    gap: 1.25rem;
  }
  
  .step-number-badge {
    width: 42px;
    height: 42px;
    font-size: 1.25rem;
  }
  
  .step-content h4 {
    font-size: 1.125rem;
  }
  
  .tube-color-indicator {
    width: 20px;
    height: 20px;
    margin-right: 0.5rem;
  }
  
  .tube-color-badge {
    min-width: 90px;
    padding: 0.375rem 0.875rem;
    font-size: 0.875rem;
  }
}

@media screen and (max-width: 480px) {
  .tube-detail-card {
    padding: 1.25rem;
  }
  
  .tube-detail-card h3 {
    font-size: 1.125rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .tube-detail-card li {
    font-size: 1rem;
    padding-left: 1.5rem;
  }
  
  .order-step-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.25rem;
  }
  
  .step-number-badge {
    margin-bottom: 0.75rem;
  }
  
  .step-content h4 {
    font-size: 1.0625rem;
    justify-content: center;
  }
  
  .step-content p {
    font-size: 1rem;
  }
  
  .tube-color-badge {
    min-width: 80px;
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
  }
  
  .tube-color-indicator {
    width: 18px;
    height: 18px;
  }
}

/* -----------------------------------------------------------
   PRINT STYLES
   ----------------------------------------------------------- */
@media print {
  .tube-detail-card,
  .order-step-card {
    page-break-inside: avoid;
    box-shadow: none;
    border: 1px solid #cbd5e1;
  }
  
  .tube-detail-card::before,
  .tube-detail-card::after,
  .order-step-card::before {
    display: none;
  }
  
  .step-number-badge {
    box-shadow: none;
  }
  
  .step-number-badge::after {
    display: none;
  }
  
  .tube-color-indicator,
  .tube-color-badge {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
}

/* -----------------------------------------------------------
   ACCESSIBILITY ENHANCEMENTS
   ----------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .step-number-badge::after {
    animation: none;
  }
}

/* Focus states for accessibility */
.tube-detail-card:focus-within,
.order-step-card:focus-within {
  outline: 3px solid #3b82f6;
  outline-offset: 2px;
}

/* ===========================================================
   END OF PREMIUM BLOOD TUBES STYLESHEET
   =========================================================== */