/* Conduct Based Medicine - Enhanced Medical Content Styles */

/* Medical Content Styling */
.medical-content {
  max-width: 4xl;
  margin: 0 auto;
}

/* Side Pane Optimized Layout */
.medical-content-with-sidebar {
  max-width: none;
  margin: 0;
  padding: 0;
}

.medical-content-with-sidebar .content-header {
  margin-bottom: 1.5rem;
}

.medical-content-with-sidebar h1 {
  font-size: 1.5rem;
  line-height: 1.3;
}

/* Breadcrumb navigation */
.breadcrumb a {
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumb a:hover {
  color: #0ea5e9;
}

/* Active navigation states */
.nav-link-active {
  background-color: #1e40af !important;
  color: #bfdbfe !important;
  font-weight: 600;
  border-radius: 0.375rem;
  padding: 0.375rem 0.75rem;
}

.nav-category-active > .nav-category-title {
  background-color: #1f2937;
  border-radius: 0.375rem;
}

/* Compact content for side pane layout */
.medical-content-with-sidebar .content-body h1,
.medical-content-with-sidebar .content-body h2,
.medical-content-with-sidebar .content-body h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.medical-content-with-sidebar .content-body h1 { font-size: 1.5rem; }
.medical-content-with-sidebar .content-body h2 { font-size: 1.25rem; }
.medical-content-with-sidebar .content-body h3 { font-size: 1.125rem; }

.medical-content-with-sidebar .content-body p {
  margin-bottom: 0.75rem;
  line-height: 1.6;
}

.medical-content-with-sidebar .content-body ul,
.medical-content-with-sidebar .content-body ol {
  margin: 0.75rem 0;
  padding-left: 1.25rem;
}

/* Responsive adjustments for side pane */
@media (max-width: 1024px) {
  .medical-content-with-sidebar {
    padding: 0 1rem;
  }
  
  .medical-content-with-sidebar h1 {
    font-size: 1.375rem;
  }
}

@media (max-width: 768px) {
  .medical-content-with-sidebar {
    padding: 0 0.75rem;
  }
  
  .medical-content-with-sidebar h1 {
    font-size: 1.25rem;
  }
  
  .content-meta {
    flex-direction: column;
    gap: 0.25rem;
  }
}

.content-header {
  border-bottom: 2px solid #374151;
  padding-bottom: 1rem;
  margin-bottom: 2rem;
}

.content-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.specialty-tag, .setting-tag {
  background-color: #1f2937;
  color: #9ca3af;
  padding: 0.25rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  text-transform: capitalize;
}

.specialty-tag {
  background-color: #1e40af;
  color: #bfdbfe;
}

.setting-tag {
  background-color: #059669;
  color: #a7f3d0;
}

/* Medical Indicators */
.medical-indicators {
  display: inline-flex;
  gap: 0.5rem;
  margin-left: 1rem;
}

.medical-indicator {
  font-family: monospace;
  font-weight: bold;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.875rem;
}

.frequency-indicator, .frequency-high { background-color: #dc2626; color: white; }
.frequency-medium { background-color: #f59e0b; color: white; }
.frequency-low { background-color: #10b981; color: white; }

.mortality-indicator, .mortality-high { background-color: #7c2d12; color: #fed7aa; }
.mortality-medium { background-color: #a16207; color: #fef3c7; }
.mortality-low { background-color: #166534; color: #dcfce7; }

/* Medical Content Typography */
.medical-heading {
  color: #f3f4f6;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.medical-heading.level-1 { font-size: 2rem; font-weight: 700; }
.medical-heading.level-2 { font-size: 1.5rem; font-weight: 600; }
.medical-heading.level-3 { font-size: 1.25rem; font-weight: 600; }
.medical-heading.level-4 { font-size: 1.125rem; font-weight: 600; }

/* Medical Tables */
.medical-table-wrapper {
  overflow-x: auto;
  margin: 1.5rem 0;
  border-radius: 0.5rem;
  border: 1px solid #374151;
}

.medical-table {
  width: 100%;
  border-collapse: collapse;
  background-color: #1f2937;
}

.medical-table th {
  background-color: #374151;
  color: #f9fafb;
  font-weight: 600;
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid #4b5563;
}

.medical-table td {
  padding: 0.75rem;
  border-bottom: 1px solid #374151;
  color: #d1d5db;
}

.medical-table tr:hover {
  background-color: #374151;
}

/* Interactive Tools */
.interactive-tools {
  border-top: 1px solid #374151;
  padding-top: 2rem;
}

.tools-grid {
  display: grid;
  gap: 1rem;
}

.tool-card {
  background-color: #374151;
  padding: 1rem;
  border-radius: 0.5rem;
  border: 1px solid #4b5563;
  transition: all 0.2s;
}

.tool-card:hover {
  border-color: #0ea5e9;
  background-color: #475569;
}

.launch-tool {
  background-color: #0ea5e9;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  border: none;
  cursor: pointer;
  font-size: 0.875rem;
  transition: background-color 0.2s;
}

.launch-tool:hover {
  background-color: #0284c7;
}

/* Specialty Cards */
.specialty-card {
  text-decoration: none;
  display: block;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.specialty-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  border-color: #0ea5e9;
  text-decoration: none;
}

.specialty-card h4 {
  transition: color 0.2s ease;
}

.specialty-card:hover h4 {
  color: #60a5fa !important;
}

.specialty-card:focus {
  outline: 2px solid #0ea5e9;
  outline-offset: 2px;
}

/* Clinical Setting Cards */
.clinical-setting-card {
  border-left: 4px solid transparent;
  transition: border-color 0.2s ease;
}

.clinical-setting-card:hover {
  border-left-color: currentColor;
}

/* Symbol Legend Styling */
.symbol-legend-item {
  display: inline-block;
  width: 1.5rem;
  text-align: center;
  font-family: monospace;
  font-weight: bold;
  margin-right: 0.5rem;
  color: #9ca3af;
}

/* Related Content */
.related-content {
  border-top: 1px solid #374151;
  padding-top: 2rem;
}

.related-links {
  display: grid;
  gap: 0.75rem;
}

.related-link {
  background-color: #374151;
  color: #d1d5db;
  padding: 0.75rem;
  border-radius: 0.375rem;
  text-decoration: none;
  transition: all 0.2s;
  border: 1px solid #4b5563;
}

.related-link:hover {
  background-color: #475569;
  color: #f3f4f6;
  border-color: #0ea5e9;
}

/* Content Body Styling */
.content-body {
  line-height: 1.7;
}

.content-body p {
  margin-bottom: 1rem;
  color: #d1d5db;
}

.content-body ul, .content-body ol {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.content-body li {
  margin-bottom: 0.5rem;
  color: #d1d5db;
}

.content-body strong {
  color: #f3f4f6;
  font-weight: 600;
}

.content-body em {
  color: #9ca3af;
  font-style: italic;
}

.content-body code {
  background-color: #374151;
  color: #fbbf24;
  padding: 0.125rem 0.25rem;
  border-radius: 0.25rem;
  font-family: 'Fira Code', monospace;
  font-size: 0.875rem;
}

.content-body pre {
  background-color: #1f2937;
  border: 1px solid #374151;
  border-radius: 0.5rem;
  padding: 1rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}

.content-body blockquote {
  border-left: 4px solid #0ea5e9;
  background-color: #1f2937;
  padding: 1rem;
  margin: 1.5rem 0;
  border-radius: 0 0.5rem 0.5rem 0;
}

.content-body blockquote p {
  margin: 0;
  color: #d1d5db;
}

/* Internal and External Links */
.internal-link {
  color: #60a5fa;
  text-decoration: underline;
  text-decoration-color: #1d4ed8;
}

.internal-link:hover {
  color: #93c5fd;
  text-decoration-color: #2563eb;
}

.external-link {
  color: #34d399;
  text-decoration: underline;
  text-decoration-color: #059669;
}

.external-link:hover {
  color: #6ee7b7;
  text-decoration-color: #10b981;
}

.external-link::after {
  content: ' ↗';
  font-size: 0.875rem;
  opacity: 0.7;
}

/* Loading and Error States */
.loading-content {
  text-align: center;
  padding: 3rem;
  color: #9ca3af;
}

.error-content {
  text-align: center;
  padding: 3rem;
  color: #f87171;
  background-color: #1f2937;
  border: 1px solid #374151;
  border-radius: 0.5rem;
  margin: 2rem 0;
}

.error-content h2 {
  color: #ef4444;
  margin-bottom: 1rem;
}

/* Modal Styling */
.tool-modal {
  max-width: 600px;
}

.tool-modal h3 {
  color: #f3f4f6;
  margin-bottom: 1rem;
}

.tool-modal p {
  color: #d1d5db;
  margin-bottom: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .content-meta {
    flex-direction: column;
    gap: 0.25rem;
  }
  
  .tools-grid {
    grid-template-columns: 1fr;
  }
  
  .related-links {
    grid-template-columns: 1fr;
  }
  
  .medical-content {
    padding: 0 1rem;
  }
}

/* Paste the entire content of your original style.css here */

/* Custom scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #1f2937; /* gray-800 */ }
::-webkit-scrollbar-thumb { background: #4b5563; /* gray-600 */ border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #6b7280; /* gray-500 */ }

html {
    height: 100%;
}
body {
    font-family: 'Inter', sans-serif; /* Ensure Inter font is available or fallback */
    background-color: #111827; /* gray-900 */
    color: #d1d5db; /* gray-300 */
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

/* Presentation Area Wrapper */
.presentation-area-wrapper { width: 100%; height: 70vh; min-height: 400px; position: relative; overflow: hidden; background-color: #000; flex-shrink: 0; }
.reveal { width: 100% !important; height: 100% !important; z-index: 1; }
.reveal .slides section { padding: 20px; }
.reveal .slides img, .reveal .slides video, .reveal .slides iframe { max-width: 95%; max-height: 80%; margin: 10px auto; border-radius: 8px; }
.reveal .controls { bottom: 10px !important; z-index: 30 !important; }
.reveal .progress { bottom: 0px !important; height: 3px !important; z-index: 30 !important; }
#loading-indicator { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 1.5em; color: #9ca3af; z-index: 5; }

/* Search, Social & Site Nav Links Section */
.search-social-nav-section {
    padding: 1rem 1rem; /* Adjusted padding */
    background-color: #18212f;
    border-bottom: 1px solid #374151;
    flex-shrink: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between; /* Space between for hamburger and rest */
    align-items: center; /* Vertically center items */
    gap: 1rem;
}
.mobile-nav-toggle-button {
    display: none; /* Hidden by default, shown on mobile */
    background: none;
    border: none;
    color: #d1d5db; /* gray-300 */
    padding: 0.5rem;
    cursor: pointer;
    z-index: 1011; /* Above overlay, potentially above nav if nav is not covering it */
}
.search-bar-container {
    flex-grow: 1;
    max-width: 500px;
    min-width: 200px; /* Allow it to shrink more */
    position: relative;
}
.search-social-nav-section .social-links {
    display: flex; /* Keep social links in a row */
    align-items: center;
}
.search-social-nav-section .social-links a {
    margin: 0 0.5rem;
    color: #9ca3af; /* gray-400 */
    transition: color 0.2s;
}
.search-social-nav-section .social-links a:hover {
    color: #60a5fa; /* sky-400 */
}

/* START: Styles for the "Switch to Spanish" button */
#translate-button {
    background-color: #38414f;
    color: #e5e7eb;
    font-weight: 500;
    border: 1px solid #4b5563;
}

#translate-button:hover {
    background-color: #4b5563;
    border-color: #525f70;
    color: #ffffff;
}
/* END: Styles for the "Switch to Spanish" button */


/* Search Preview Area */
.search-results-container {
    background-color: #27303f; border: 1px solid #4b5563; border-radius: 0.375rem;
    margin-top: 0.5rem; width: 100%; max-height: 300px; overflow-y: auto;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    display: none; z-index: 100;
}
.search-result-item { padding: 0.75rem 1rem; border-bottom: 1px solid #374151; cursor: pointer; font-size: 0.875rem; color: #d1d5db; line-height: 1.4; }
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background-color: #374151; }
.search-result-item.preview-item-selected { background-color: #4b5563; }
.search-result-item .result-snippet-source { display: block; font-size: 0.75rem; color: #9ca3af; margin-bottom: 0.25rem; }
mark.search-preview-highlight { background-color: #facc15; color: #1f2937; padding: 0.05em 0.1em; border-radius: 2px; font-weight: 600; }

/* Main Page Active Search Highlight */
.main-page-active-search-highlight { outline: 3px solid #60a5fa; box-shadow: 0 0 12px rgba(96, 165, 250, 0.7); transition: outline 0.2s ease-in-out, box-shadow 0.2s ease-in-out; border-radius: 3px; position: relative; z-index: 1; }

/* Page Overlay for Mobile Nav */
.page-overlay {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.6); z-index: 1005;
}
.page-overlay.is-visible { display: block; }

/* Main Site Content Area */
.site-main-content-area { flex-grow: 1; display: flex; width: 100%; overflow: hidden; }
.site-navigation-panel {
    width: 260px; background-color: #1f2937; padding: 1.5rem 1.5rem 3rem;
    border-right: 1px solid #374151; overflow-y: auto; flex-shrink: 0;
    transition: transform 0.3s ease-in-out;
    max-height: 100vh; /* Ensure it doesn't exceed viewport height */
    height: 100%; /* Take full height of container */
    box-sizing: border-box; /* Include padding in height calculation */
}
.site-navigation-panel h3 { font-size: 1.125rem; font-weight: 600; margin-bottom: 1rem; color: #e5e7eb; }
.site-navigation-panel ul { list-style: none; padding: 0; margin: 0; }

/* MODIFIED RULE FOR NAVIGATION LINKS */
.site-navigation-panel ul li a {
    display: block;
    padding: 0.5rem 0;
    color: #9ca3af;
    transition: color 0.2s;
    font-size: 0.875rem;
    text-decoration: none;
    /* ---- ADDED/MODIFIED FOR TRUNCATION FIX ---- */
    white-space: normal; /* Explicitly allow wrapping */
    overflow-wrap: break-word; /* Break long words if necessary to prevent overflow */
    word-wrap: break-word; /* Legacy alias for overflow-wrap */
    overflow: visible; /* Ensure content that wraps to new lines is visible */
    line-height: 1.4; /* Ensure wrapped lines have adequate space */
    /* ---- END OF ADDED/MODIFIED FIX ---- */
}
.site-navigation-panel ul li a:hover { color: #60a5fa; }

/* Styles for collapsible navigation items */
.site-navigation-panel .nav-category > .nav-category-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 0.5rem 0;
    color: #e5e7eb;
    font-weight: 600;
}
.site-navigation-panel .nav-category > .nav-category-title:hover {
    color: #60a5fa;
}
.site-navigation-panel .nav-category > .nav-category-title .lucide-chevron-down,
.site-navigation-panel .nav-category > .nav-category-title .lucide-chevron-right {
    width: 1em;
    height: 1em;
    margin-left: 0.5rem;
}
.site-navigation-panel .nav-category ul {
    padding-left: 1rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
}
.site-navigation-panel .nav-category.open ul {
    max-height: none; /* Remove fixed height limit */
    overflow: visible; /* Allow content to be fully visible */
}


.actual-main-content { flex-grow: 1; padding: 1.5rem; overflow-y: auto; }

/* Responsive adjustments */
@media (max-width: 768px) {
    .presentation-area-wrapper { height: 50vh; }

    .mobile-nav-toggle-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        order: -1;
    }

    .search-social-nav-section .search-bar-container {
         width: calc(100% - 50px - 1rem);
         order: 0;
    }
    .search-social-nav-section .social-links {
         flex-basis: 100%;
         justify-content: center;
         margin-top: 0.5rem;
         text-align: center;
         order: 1;
         display: flex;
    }
    .search-social-nav-section #translate-button {
         flex-basis: 100%;
         text-align: center;
         margin-top: 0.5rem;
         margin-left: 0;
         margin-right: 0;
         order: 2;
    }


    .site-navigation-panel {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        height: 100%;
        width: 260px;
        z-index: 1010;
        transform: translateX(-100%);
    }
    .site-navigation-panel.mobile-nav-is-open {
        transform: translateX(0);
        z-index: 1012;
    }

    body.mobile-nav-active {

    }
}

/* Navigation Panel Legend Styles */
.nav-legend {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #374151;
}

.nav-legend .legend-section p strong {
  color: #cbd5e1; /* gray-300 */
}

.nav-legend .symbol-legend-item {
  display: inline-block;
  width: 2em; /* Adjusted for "F█" or "M█" */
  text-align: left;
  margin-right: 0.5em;
  font-size: 1em; /* Inherits size from parent li (text-xs) */
}

/* Translation Status and Language Indicators */
.language-indicator {
  display: inline-block;
  margin: 0 2px;
  padding: 2px 4px;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.language-indicator.active {
  background-color: #1e40af;
  box-shadow: 0 0 0 2px #3b82f6;
}

.language-indicator:not(.active):not(.unavailable):hover {
  background-color: #374151;
  transform: scale(1.1);
}

.language-indicator.unavailable {
  opacity: 0.3;
  cursor: not-allowed;
  filter: grayscale(100%);
}

.translation-status {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.translation-status .flex {
  display: flex;
  align-items: center;
}

.translation-status .gap-2 > * + * {
  margin-left: 0.5rem;
}

/* Content meta styling */
.content-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.specialty-tag, .setting-tag {
  background-color: #374151;
  color: #d1d5db;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

.frequency-indicator, .mortality-indicator {
  font-family: monospace;
  font-weight: bold;
  padding: 2px 4px;
  border-radius: 3px;
  font-size: 12px;
}

.frequency-indicator {
  background-color: #1e40af;
  color: #bfdbfe;
}

.mortality-indicator {
  background-color: #dc2626;
  color: #fecaca;
}

/* Copy-to-Clipboard Functionality Styles */

/* Copyable Section Container */
.copyable-section {
  position: relative;
  margin: 0.5rem 0;
  border-radius: 0.375rem;
  transition: background-color 0.2s ease;
}

.copyable-section:hover {
  background-color: rgba(55, 65, 81, 0.3);
}

/* Copy Button Base Styles */
.copy-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background-color: rgba(55, 65, 81, 0.8);
  color: #9ca3af;
  border: 1px solid transparent;
  border-radius: 0.375rem;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: all 0.15s ease;
  z-index: 10;
  outline: none;
  backdrop-filter: blur(4px);
}

/* Show copy button on hover or focus */
.copyable-section:hover .copy-btn,
.copy-btn:focus {
  opacity: 1;
}

/* Copy icon styling */
.copy-btn .copy-icon {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  transition: stroke 0.15s ease;
}

/* Copy button hover state */
.copy-btn:hover {
  background-color: rgba(75, 85, 99, 0.9);
  color: #f3f4f6;
  border-color: rgba(107, 114, 128, 0.3);
  transform: scale(1.02);
}

/* Copy button active state */
.copy-btn:active {
  transform: scale(0.98);
  background-color: rgba(55, 65, 81, 0.9);
}

/* Success state */
.copy-btn.copy-success {
  background-color: rgba(5, 150, 105, 0.9);
  color: #ffffff;
  border-color: rgba(16, 185, 129, 0.3);
  opacity: 1;
}

.copy-btn.copy-success:hover {
  background-color: rgba(4, 120, 87, 0.9);
  transform: scale(1.02);
}

.copy-btn.copy-success .copy-icon {
  stroke: #ffffff;
}

/* Error state */
.copy-btn.copy-error {
  background-color: rgba(220, 38, 38, 0.9);
  color: #ffffff;
  border-color: rgba(239, 68, 68, 0.3);
  opacity: 1;
}

.copy-btn.copy-error:hover {
  background-color: rgba(185, 28, 28, 0.9);
  transform: scale(1.02);
}

.copy-btn.copy-error .copy-icon {
  stroke: #ffffff;
}

/* Section-specific copy button positioning - GitHub style */
.copyable-section .copy-btn {
  top: 0.375rem;
  right: 0.375rem;
}

/* Headings get slightly different positioning */
.copyable-section:has(h2) .copy-btn,
.copyable-section:has(h3) .copy-btn,
.copyable-section:has(h4) .copy-btn,
.copyable-section:has(h5) .copy-btn,
.copyable-section:has(h6) .copy-btn {
  top: 0.5rem;
  right: 0.5rem;
}

/* Tables and blockquotes get more padding */
.copyable-section:has(table) .copy-btn,
.copyable-section:has(.medical-table-wrapper) .copy-btn,
.copyable-section:has(blockquote) .copy-btn {
  top: 0.75rem;
  right: 0.75rem;
}

/* Lists get standard positioning */
.copyable-section:has(ul) .copy-btn,
.copyable-section:has(ol) .copy-btn {
  top: 0.5rem;
  right: 0.5rem;
}

/* Copy Menu (for advanced copy options) */
.copy-menu {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background-color: #1f2937;
  border: 1px solid #374151;
  border-radius: 0.5rem;
  padding: 0.25rem;
  display: flex;
  gap: 0.25rem;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 15;
}

.copyable-section:hover .copy-menu {
  opacity: 1;
}

.copy-menu .copy-btn {
  position: static;
  width: auto;
  height: auto;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  opacity: 1;
}

.copy-menu .copy-btn:hover {
  background-color: #4b5563;
}

/* Responsive Design for Copy Buttons */
@media (max-width: 768px) {
  .copy-btn {
    width: 1.75rem;
    height: 1.75rem;
    opacity: 0.7; /* Slightly visible on mobile */
    background-color: rgba(55, 65, 81, 0.9);
    backdrop-filter: blur(6px);
  }
  
  .copy-btn .copy-icon {
    width: 14px;
    height: 14px;
  }
  
  .copyable-section {
    padding-right: 2.5rem; /* Make room for copy button */
  }
  
  .copyable-section:hover .copy-btn,
  .copyable-section:active .copy-btn {
    opacity: 1; /* Full opacity on interaction */
  }
  
  .copy-menu {
    flex-direction: column;
    opacity: 0.8; /* Slightly visible on mobile */
  }
  
  .copy-menu .copy-btn {
    padding: 0.375rem;
    width: auto;
    height: auto;
  }
}

/* Accessibility improvements */
.copy-btn:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* Integration with medical content styles */
.medical-content .copyable-section {
  margin: 1rem 0;
}

.medical-content-with-sidebar .copyable-section {
  margin: 0.75rem 0;
}

/* Ensure copy buttons don't interfere with medical indicators */
.copyable-section .medical-indicators {
  position: relative;
  z-index: 5;
}

.copyable-section .medical-indicators + .copy-btn {
  top: 2rem; /* Move below medical indicators */
}

/* Copy button tooltip - using native browser tooltip only */
.copy-btn[title] {
  position: relative;
}
