/**
 * Copyright (c) 2026 DNA Genics, S.L. All rights reserved.
 * 
 * Ancient Composition report styling.
 */

/* ========================================
   Ancient Composition Analysis Styles
   Redesigned to match DnaGenics 2025 design system
   ======================================== */

/* ========================================
   CSS Variables (inherited from design system)
   ======================================== */

:root {
    --ancient-low-distance: #10b981;
    --ancient-medium-distance: #f59e0b;
    --ancient-high-distance: #ef4444;
    
    /* SharedRoots Cinematic Dark Theme Variables */
    --src-obsidian: #0D0D0F;
    --src-slate: #1A1C1E;
    --src-stone: #2A2D31;
    --src-sand: #A89F91;
    --src-bone: #E8E4DC;
    --src-ivory: #F5F3EF;
    --src-accent: #C4956A;
    --src-accent-light: #D4B896;
}

/* ========================================
   NAVIGATION UX ENHANCEMENTS
   ======================================== */

/* Scroll Progress Bar */
.scroll-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(90deg, var(--dnagenics-teal, #00b4d8) 0%, #10b981 100%);
    z-index: 9999;
    transition: width 0.1s ease-out;
    box-shadow: 0 1px 3px rgba(0, 180, 216, 0.3);
}

/* Page Navigation Dots (Side Nav) */
.page-nav {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 15px 10px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.page-nav a {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #d1d5db;
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
    display: block;
}

.page-nav a:hover {
    background: var(--dnagenics-teal, #00b4d8);
    transform: scale(1.3);
}

.page-nav a.active {
    background: var(--dnagenics-teal, #00b4d8);
    box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.3);
}

.page-nav a[data-tooltip]::before {
    content: attr(data-tooltip);
    position: absolute;
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--dnagenics-dark, #1a1a2e);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    pointer-events: none;
}

.page-nav a[data-tooltip]::after {
    content: '';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    border: 5px solid transparent;
    border-left-color: var(--dnagenics-dark, #1a1a2e);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.page-nav a:hover[data-tooltip]::before,
.page-nav a:hover[data-tooltip]::after {
    opacity: 1;
    visibility: visible;
}

/* Back to Top Button */
.back-to-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--dnagenics-teal, #00b4d8) 0%, #0096c7 100%);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: 0 4px 15px rgba(0, 180, 216, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.back-to-top-btn.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 180, 216, 0.5);
}

.back-to-top-btn:focus {
    outline: 2px solid white;
    outline-offset: 2px;
}

/* Mobile Bottom Navigation */
.aac-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1250;
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(0, 180, 216, 0.2);
    display: flex;
    justify-content: space-around;
    padding: 10px 8px calc(10px + env(safe-area-inset-bottom));
}

.aac-bottom-nav-item {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 0.65rem;
    font-weight: 400;
    letter-spacing: 0.02em;
    transition: all 0.3s ease;
}

.aac-bottom-nav-item i {
    font-size: 1rem;
}

.aac-bottom-nav-item:hover,
.aac-bottom-nav-item.active {
    color: var(--dnagenics-teal, #00b4d8);
    text-decoration: none;
}

/* Adjust content padding for bottom nav on mobile */
@media (max-width: 767.98px) {
    #main-content {
        padding-bottom: 80px;
    }
    
    .back-to-top-btn {
        bottom: 90px;
    }
}

/* Skip Link for Accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--dnagenics-teal, #00b4d8);
    color: white;
    padding: 8px 16px;
    z-index: 10000;
    transition: top 0.3s ease;
    text-decoration: none;
    font-weight: 600;
}

.skip-link:focus {
    top: 0;
}

/* Hide page nav on mobile */
@media (max-width: 768px) {
    .page-nav {
        display: none;
    }
    
    .back-to-top-btn {
        right: 20px;
        bottom: 20px;
        width: 45px;
        height: 45px;
    }
}

/* ========================================
   FULL-SCREEN MAP MODE
   ======================================== */

/* Fullscreen Toggle Button */
.fullscreen-toggle-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.85rem;
}

.fullscreen-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.5);
}

.fullscreen-toggle-btn:focus {
    outline: 2px solid white;
    outline-offset: 2px;
}

/* Fullscreen Map Overlay */
.map-fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9998;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.map-fullscreen-overlay.active {
    opacity: 1;
    visibility: visible;
}

.map-fullscreen-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, var(--dnagenics-teal, #00b4d8) 0%, #0096c7 100%);
    color: white;
}

.map-fullscreen-header h4 {
    margin: 0;
    font-weight: 600;
}

.map-fullscreen-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: all 0.2s ease;
}

.map-fullscreen-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.map-fullscreen-close:focus {
    outline: 2px solid white;
    outline-offset: 2px;
}

.map-fullscreen-body {
    flex: 1;
    display: flex;
    overflow: hidden;
}

.map-fullscreen-container {
    flex: 1;
    position: relative;
}

.map-fullscreen-container .mapdeepancient {
    width: 100% !important;
    height: 100% !important;
    border-radius: 0;
}

.map-fullscreen-sidebar {
    width: 320px;
    background: white;
    padding: 1.5rem;
    overflow-y: auto;
    border-left: 1px solid #e5e7eb;
}

.map-fullscreen-sidebar h5 {
    color: var(--dnagenics-dark, #1a1a2e);
    font-weight: 600;
    margin-bottom: 1rem;
}

.map-fullscreen-filters .form-group {
    margin-bottom: 1rem;
}

.map-fullscreen-filters label {
    font-weight: 600;
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.map-fullscreen-stats {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.map-stat-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.map-stat-item i {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--dnagenics-teal, #00b4d8);
    color: white;
    border-radius: 8px;
    margin-right: 0.75rem;
    font-size: 0.85rem;
}

.map-stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dnagenics-dark, #1a1a2e);
}

.map-stat-label {
    font-size: 0.75rem;
    color: #6c757d;
}

/* Responsive fullscreen */
@media (max-width: 992px) {
    .map-fullscreen-sidebar {
        width: 280px;
    }
}

@media (max-width: 768px) {
    .map-fullscreen-body {
        flex-direction: column;
    }
    
    .map-fullscreen-sidebar {
        width: 100%;
        height: auto;
        max-height: 200px;
        border-left: none;
        border-top: 1px solid #e5e7eb;
    }
    
    .map-fullscreen-container {
        height: calc(100% - 200px);
    }
}

/* ========================================
   ENHANCED SAMPLE BROWSER
   ======================================== */

/* Toolbar */
.sample-browser-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: rgba(26, 28, 30, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(184, 149, 106, 0.2);
    border-radius: 12px;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

/* View Toggle */
.view-toggle {
    display: flex;
    background: rgba(42, 45, 49, 0.6);
    border: 1px solid rgba(184, 149, 106, 0.2);
    border-radius: 8px;
    padding: 4px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.view-toggle .btn-view {
    padding: 0.5rem 1rem;
    border: none;
    background: transparent;
    color: var(--dar-bone);
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    font-weight: 500;
}

.view-toggle .btn-view:hover {
    color: var(--dar-aac-accent-light);
    background: rgba(184, 149, 106, 0.1);
}

.view-toggle .btn-view.active {
    background: var(--dar-aac-accent);
    color: var(--dar-obsidian);
    box-shadow: 0 2px 8px rgba(184, 149, 106, 0.4);
}

.view-toggle .btn-view.active:hover {
    background: var(--dar-aac-accent-light);
    box-shadow: 0 4px 12px rgba(184, 149, 106, 0.5);
}

.view-toggle .btn-view i {
    margin-right: 0.5rem;
    transition: transform 0.2s ease;
}

.view-toggle .btn-view:hover i {
    transform: scale(1.1);
}

/* Era Filter Dropdown */
.era-filter-dropdown {
    display: flex;
    align-items: center;
}

.era-filter-dropdown select {
    min-width: 150px;
    background: rgba(42, 45, 49, 0.8);
    border: 1px solid rgba(184, 149, 106, 0.3);
    border-radius: 8px;
    color: var(--dar-ivory);
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.era-filter-dropdown select:focus {
    outline: none;
    border-color: var(--dar-aac-accent);
    box-shadow: 0 0 0 3px rgba(184, 149, 106, 0.2);
    background: rgba(42, 45, 49, 0.95);
}

.era-filter-dropdown select option {
    background: var(--dar-slate);
    color: var(--dar-ivory);
}

.era-pill {
    padding: 0.4rem 1rem;
    border: 1px solid rgba(184, 149, 106, 0.3);
    background: rgba(42, 45, 49, 0.6);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--dar-bone);
    position: relative;
    overflow: hidden;
}

.era-pill::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(184, 149, 106, 0.1), rgba(184, 149, 106, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.era-pill:hover {
    border-color: var(--dar-aac-accent);
    color: var(--dar-aac-accent-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(184, 149, 106, 0.2);
}

.era-pill:hover::before {
    opacity: 1;
}

.era-pill.active {
    background: var(--dar-aac-accent);
    border-color: var(--dar-aac-accent);
    color: var(--dar-obsidian);
    box-shadow: 0 4px 12px rgba(184, 149, 106, 0.4);
    font-weight: 600;
}

.era-pill.active:hover {
    background: var(--dar-aac-accent-light);
    box-shadow: 0 6px 16px rgba(184, 149, 106, 0.5);
}

.era-pill i {
    margin-right: 0.35rem;
    transition: transform 0.2s ease;
}

.era-pill:hover i {
    transform: scale(1.1);
}

/* Sort Controls */
.sort-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sort-controls label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--dar-bone);
    margin-bottom: 0;
}

.sort-controls input[type="text"],
.sort-controls select {
    background: rgba(42, 45, 49, 0.8);
    border: 1px solid rgba(184, 149, 106, 0.3);
    border-radius: 8px;
    color: var(--dar-ivory);
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.sort-controls input[type="text"]:focus,
.sort-controls select:focus {
    outline: none;
    border-color: var(--dar-aac-accent);
    box-shadow: 0 0 0 3px rgba(184, 149, 106, 0.2);
    background: rgba(42, 45, 49, 0.95);
}

.sort-controls input[type="text"]::placeholder {
    color: var(--dar-sand);
    opacity: 0.6;
}

.sort-controls select {
    min-width: 160px;
    cursor: pointer;
}

.sort-controls select option {
    background: var(--dar-slate);
    color: var(--dar-ivory);
}

/* Results Count */
.results-count {
    font-size: 0.9rem;
    color: var(--dar-bone);
}

.results-count strong {
    color: var(--dar-aac-accent-light);
    font-weight: 600;
}

/* Card Grid View - Match Notable Ancient Matches structure */
.sample-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* Ensure card grid uses Bootstrap row structure like Notable section */
#sampleCardGrid.row {
    display: flex;
    flex-wrap: wrap;
}

#sampleCardGrid.row .aac-notable-card {
    margin-bottom: 0;
}

/* Hidden cards for Show More functionality */
.aac-grid-hidden {
    display: none !important;
}

.sample-grid-card {
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    border: none;
}

.sample-grid-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15) !important;
}

.sample-grid-card:focus {
    outline: 2px solid var(--dnagenics-teal, #00b4d8);
    outline-offset: 2px;
}

.sample-grid-portrait-wrapper {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.sample-grid-portrait {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    transition: transform 0.3s ease;
}

.sample-grid-card:hover .sample-grid-portrait {
    transform: scale(1.05);
}

.sample-grid-rank {
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: white;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 0.3rem 0.6rem;
    border-radius: 12px;
    z-index: 10;
    box-shadow: 0 3px 10px rgba(99, 102, 241, 0.4);
}

.sample-grid-distance {
    position: absolute;
    bottom: 10px;
    right: 10px;
    text-align: center;
    background: rgba(0, 0, 0, 0.75);
    padding: 0.4rem 0.6rem;
    border-radius: 8px;
    backdrop-filter: blur(5px);
}

.sample-grid-distance .badge {
    font-size: 0.85rem;
}

.sample-grid-body {
    padding: 1rem;
}

.sample-grid-body .era-badge {
    display: inline-block;
    font-size: 0.7rem;
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
    margin-bottom: 0.5rem;
}

.sample-grid-body h6 {
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--dnagenics-dark, #1a1a2e);
}

.sample-grid-body .meta-info {
    font-size: 0.8rem;
    color: #6c757d;
}

.sample-grid-body .meta-info i {
    margin-right: 0.25rem;
}

.sample-grid-footer {
    padding: 0.75rem 1rem;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.sample-grid-footer .badge {
    font-size: 0.7rem;
    font-weight: 500;
}

/* List View (enhanced) */
.sample-list-view {
    display: none;
}

.sample-list-view.active {
    display: block;
}

.sample-card-grid.active {
    display: grid;
}

.sample-card-grid:not(.active) {
    display: none;
}

/* Loading State */
.sample-browser-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: #6c757d;
}

.sample-browser-loading .spinner-border {
    width: 3rem;
    height: 3rem;
    margin-bottom: 1rem;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 3rem;
    color: #6c757d;
}

.no-results i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Responsive */
@media (max-width: 992px) {
    .sample-browser-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .era-filter-pills {
        order: 3;
        justify-content: center;
        margin-top: 0.5rem;
    }
    
    .sample-card-grid,
    #sampleCardGrid.row {
        /* Bootstrap row handles responsive columns */
    }
}

@media (max-width: 768px) {
    .view-toggle {
        width: 100%;
        justify-content: center;
    }
    
    .sort-controls {
        width: 100%;
        justify-content: space-between;
    }
    
    .sample-card-grid,
    #sampleCardGrid.row {
        /* Bootstrap row handles responsive columns */
    }
    
    .sample-grid-portrait-wrapper {
        height: 180px;
    }
}

@media (max-width: 576px) {
    .era-filter-pills {
        display: none;
    }
    
    .era-pills-mobile-dropdown {
        display: block !important;
    }
    
    .era-pills-mobile-dropdown select {
        background: rgba(42, 45, 49, 0.8);
        border: 1px solid rgba(184, 149, 106, 0.3);
        border-radius: 8px;
        color: var(--dar-ivory);
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
        transition: all 0.3s ease;
        width: 100%;
    }
    
    .era-pills-mobile-dropdown select:focus {
        outline: none;
        border-color: var(--dar-aac-accent);
        box-shadow: 0 0 0 3px rgba(184, 149, 106, 0.2);
        background: rgba(42, 45, 49, 0.95);
    }
    
    .era-pills-mobile-dropdown select option {
        background: var(--dar-slate);
        color: var(--dar-ivory);
    }
}

/* ========================================
   ERA-BY-ERA INSIGHTS SECTION
   ======================================== */

.era-insights-section {
    margin-top: 2rem;
}

/* Era Summary Cards */
.era-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.era-summary-card {
    background: white;
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
}

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

.era-summary-card.active,
.era-summary-card:focus {
    border-color: var(--dnagenics-teal, #00b4d8);
    outline: none;
}

.era-summary-card.dominant {
    background: linear-gradient(135deg, rgba(0, 180, 216, 0.1) 0%, rgba(16, 185, 129, 0.1) 100%);
    border-color: var(--dnagenics-teal, #00b4d8);
}

.era-summary-card .era-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
    font-size: 1.25rem;
    color: white;
}

.era-summary-card.era-paleolithic .era-icon { background: linear-gradient(135deg, #8B7355, #6B5445); }
.era-summary-card.era-mesolithic .era-icon { background: linear-gradient(135deg, #6B8E23, #556B2F); }
.era-summary-card.era-neolithic .era-icon { background: linear-gradient(135deg, #2E8B57, #228B22); }
.era-summary-card.era-chalcolithic .era-icon { background: linear-gradient(135deg, #CD853F, #B8860B); }
.era-summary-card.era-bronze .era-icon { background: linear-gradient(135deg, #CD853F, #D2691E); }
.era-summary-card.era-iron .era-icon { background: linear-gradient(135deg, #4682B4, #4169E1); }
.era-summary-card.era-medieval .era-icon { background: linear-gradient(135deg, #6B46C1, #5B21B6); }

.era-summary-card .era-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--dnagenics-dark, #1a1a2e);
    margin-bottom: 0.25rem;
}

.era-summary-card .era-count {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--dnagenics-teal, #00b4d8);
}

.era-summary-card .era-avg-distance {
    font-size: 0.8rem;
    color: #6c757d;
}

.era-summary-card .dominant-badge {
    display: inline-block;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    margin-top: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Era Detail Panels */
.era-detail-panel {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
}

.era-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.era-detail-header:hover {
    background: #f8f9fa;
}

.era-detail-header-left {
    display: flex;
    align-items: center;
}

.era-detail-header .era-icon-small {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    color: white;
    font-size: 1rem;
}

.era-detail-header h5 {
    margin: 0;
    font-weight: 700;
    color: var(--dnagenics-dark, #1a1a2e);
}

.era-detail-header .era-subtitle {
    font-size: 0.85rem;
    color: #6c757d;
}

.era-detail-header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.era-detail-header .era-stats {
    text-align: right;
}

.era-detail-header .era-stats-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dnagenics-teal, #00b4d8);
}

.era-detail-header .era-stats-label {
    font-size: 0.75rem;
    color: #6c757d;
}

.era-detail-header .collapse-icon {
    color: #6c757d;
    transition: transform 0.3s ease;
}

.era-detail-header[aria-expanded="true"] .collapse-icon {
    transform: rotate(180deg);
}

.era-detail-body {
    padding: 1.25rem;
    border-top: 1px solid #e9ecef;
    background: #fafbfc;
}

.era-description {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    border-left: 4px solid var(--dnagenics-teal, #00b4d8);
}

.era-description p {
    margin: 0;
    color: #495057;
    font-size: 0.95rem;
    line-height: 1.6;
}

.era-samples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.era-sample-mini {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.era-sample-mini:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateX(3px);
}

.era-sample-mini img {
    width: 45px;
    height: 45px;
    border-radius: 8px;
    object-fit: cover;
    margin-right: 0.75rem;
}

.era-sample-mini .sample-info h6 {
    font-size: 0.85rem;
    font-weight: 600;
    margin: 0 0 0.25rem 0;
    color: var(--dnagenics-dark, #1a1a2e);
}

.era-sample-mini .sample-info small {
    color: #6c757d;
}

/* Era Distribution Chart Container */
.era-distribution-chart {
    height: 250px;
    margin-bottom: 1.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .era-summary-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .era-summary-card {
        padding: 1rem;
    }
    
    .era-summary-card .era-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .era-summary-card .era-count {
        font-size: 1.25rem;
    }
    
    .era-detail-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .era-detail-header-left {
        flex-direction: column;
    }
    
    .era-detail-header .era-icon-small {
        margin-right: 0;
        margin-bottom: 0.5rem;
    }
    
    .era-samples-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .era-summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ========================================
   INTERACTIVE TIMELINE VISUALIZATION
   ======================================== */
/* 
 * Timeline styles have been migrated to use dar-timeline-* classes
 * from deep-ancestry-narrative.css for consistency with Deep Ancestry BCE design.
 * Old timeline styles removed - using shared timeline component styles.
 */

/* ========================================
   SIDE-BY-SIDE COMPARISON TOOL
   ======================================== */

/* Compare Checkbox on Cards */
.compare-checkbox-wrapper {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 15;
}

/* Ensure sample cards have enough right padding for compare button */
.sample-card-compact .card-body {
    padding-right: 2.5rem !important;
}

.compare-checkbox {
    display: none;
}

.compare-checkbox-label {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.85rem;
    color: #6c757d;
}

.compare-checkbox-label:hover {
    border-color: var(--dnagenics-teal, #00b4d8);
    color: var(--dnagenics-teal, #00b4d8);
}

.compare-checkbox:checked + .compare-checkbox-label {
    background: var(--dnagenics-teal, #00b4d8);
    border-color: var(--dnagenics-teal, #00b4d8);
    color: white;
}

/* Floating Compare Bar */
.compare-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, var(--dnagenics-dark, #1a1a2e), #2d2d4a);
    padding: 1rem 1.5rem;
    z-index: 1001;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
}

.compare-bar.visible {
    transform: translateY(0);
}

.compare-bar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
}

.compare-bar-info {
    display: flex;
    align-items: center;
    color: white;
}

.compare-bar-info .selected-count {
    font-size: 1.5rem;
    font-weight: 700;
    margin-right: 0.5rem;
    color: var(--dnagenics-teal, #00b4d8);
}

.compare-bar-info span {
    font-size: 0.9rem;
    opacity: 0.9;
}

.compare-bar-previews {
    display: flex;
    gap: 0.5rem;
    margin-left: 1.5rem;
}

.compare-preview-item {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.3);
    position: relative;
}

.compare-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.compare-preview-item .remove-btn {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ef4444;
    border: none;
    color: white;
    font-size: 0.6rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.compare-bar-actions {
    display: flex;
    gap: 0.75rem;
}

.compare-bar-actions .btn {
    padding: 0.6rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
}

.btn-compare-now {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    color: white;
}

.btn-compare-now:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: white;
}

.btn-clear-compare {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
}

.btn-clear-compare:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* Comparison Modal */
.comparison-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 2rem;
}

.comparison-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.comparison-modal {
    background: var(--src-slate, #1A1C1E);
    border: 1px solid rgba(168, 159, 145, 0.2);
    border-radius: 16px;
    width: 100%;
    max-width: 1200px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.comparison-modal-overlay.active .comparison-modal {
    transform: scale(1);
}

.comparison-modal-header {
    padding: 20px 24px;
    background: linear-gradient(135deg, var(--src-accent, #C4956A), #8B6D4F);
    color: var(--src-obsidian, #0D0D0F);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.comparison-modal-header h4 {
    margin: 0;
    font-weight: 600;
    display: flex;
    align-items: center;
    color: var(--src-obsidian, #0D0D0F);
}

.comparison-modal-header h4 i {
    margin-right: 0.75rem;
    color: var(--src-obsidian, #0D0D0F);
}

.comparison-modal-close {
    background: rgba(13, 13, 15, 0.2);
    border: 1px solid rgba(13, 13, 15, 0.3);
    color: var(--src-obsidian, #0D0D0F);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.25rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.comparison-modal-close:hover {
    background: rgba(13, 13, 15, 0.3);
    border-color: rgba(13, 13, 15, 0.5);
    transform: scale(1.05);
}

.comparison-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    background: var(--src-slate, #1A1C1E);
}

/* Comparison Grid */
.comparison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.comparison-item {
    background: var(--src-slate, #1A1C1E);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(168, 159, 145, 0.2);
    transition: all 0.3s ease;
}

.comparison-item.best-match {
    border: 2px solid var(--src-accent, #C4956A);
    box-shadow: 0 0 0 4px rgba(196, 149, 106, 0.2);
}

.comparison-item-header {
    position: relative;
}

.comparison-item-portrait {
    width: 100%;
    height: 280px;
    object-fit: cover;
    object-position: center 20%;
}

.comparison-item-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(135deg, var(--src-accent, #C4956A), #8B6D4F);
    color: var(--src-obsidian, #0D0D0F);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.3rem 0.7rem;
    border-radius: 12px;
    text-transform: uppercase;
}

.comparison-item-distance {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    text-align: center;
}

.comparison-item-distance .value {
    font-size: 1.25rem;
    font-weight: 700;
    display: block;
    color: #EF4444;
}

.comparison-item-distance .value.badge,
.comparison-item-distance .value.badge-success,
.comparison-item-distance .value.badge-warning,
.comparison-item-distance .value.badge-danger {
    background: transparent !important;
    color: #EF4444 !important;
    padding: 0 !important;
    border: none !important;
    font-size: 1.25rem !important;
    font-weight: 700 !important;
}

.comparison-item-distance .label {
    font-size: 0.65rem;
    opacity: 0.9;
    text-transform: uppercase;
    color: white;
}

.comparison-item-body {
    padding: 1.25rem;
    background: var(--src-slate, #1A1C1E);
}

.comparison-item-body h5 {
    font-weight: 700;
    color: var(--src-ivory, #F5F3EF);
    margin-bottom: 0.5rem;
}

.comparison-item-body .era-badge {
    display: inline-block;
    font-size: 0.7rem;
    padding: 0.25rem 0.6rem;
    border-radius: 10px;
    background: rgba(196, 149, 106, 0.2);
    color: var(--src-accent-light, #D4B896);
    margin-bottom: 1rem;
}

.comparison-data-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(168, 159, 145, 0.15);
}

.comparison-data-row:last-child {
    border-bottom: none;
}

.comparison-data-row .data-label {
    font-size: 0.8rem;
    color: var(--src-sand, #A89F91);
}

.comparison-data-row .data-value {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--src-bone, #E8E4DC);
    text-align: right;
}

/* Highlight differences */
.comparison-data-row .data-value.highlight-best {
    color: #10b981;
}

.comparison-data-row .data-value.highlight-worst {
    color: #ef4444;
}

/* Responsive */
@media (max-width: 992px) {
    .compare-bar-content {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .compare-bar-previews {
        margin-left: 0;
    }
    
    .comparison-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .compare-bar {
        padding: 0.75rem 1rem;
    }
    
    .compare-bar-previews {
        display: none;
    }
    
    .compare-bar-actions {
        gap: 0.5rem;
    }
    
    .compare-bar-actions .btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
    
    .comparison-modal {
        border-radius: 12px;
    }
    
    .comparison-grid {
        grid-template-columns: 1fr;
    }
    
    .comparison-item-portrait {
        height: 220px;
    }
}

/* ========================================
   Understanding Section
   ======================================== */

.understanding-section {
    padding: 2rem 0;
}

.understanding-section .info-grid {
    margin-top: 2rem;
}

.understanding-section .info-item {
    text-align: center;
    padding: 1.5rem;
    background: var(--dnagenics-light, #f8f9fa);
    border-radius: 12px;
    height: 100%;
    transition: all 0.3s ease;
}

.understanding-section .info-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.understanding-section .info-icon {
    font-size: 2rem;
    color: var(--dnagenics-teal, #00b4d8);
    margin-bottom: 1rem;
    display: block;
}

.understanding-section .info-item h6 {
    font-weight: 700;
    color: var(--dnagenics-dark, #1a1a2e);
    margin-bottom: 0.5rem;
}

.understanding-section .info-item p {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* ========================================
   Closest Matches Section
   ======================================== */

.closest-matches-section {
    padding: 2rem 0;
}

.closest-match-card {
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.closest-match-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
}

.closest-match-card:focus {
    outline: 2px solid var(--dnagenics-teal, #00b4d8);
    outline-offset: 2px;
}

.closest-match-rank {
    position: absolute;
    top: 45px;
    left: 10px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0.4rem 0.75rem;
    border-radius: 20px;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.closest-match-portrait {
    overflow: hidden;
}

.closest-match-portrait img {
    transition: transform 0.3s ease;
}

.closest-match-card:hover .closest-match-portrait img {
    transform: scale(1.05);
}

.match-distance-overlay .badge-lg {
    font-size: 1rem;
    padding: 0.5rem 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* ========================================
   Executive Summary Section
   ======================================== */

.executive-summary-section {
    padding: 1.5rem 0;
}

/* ========================================
   Stat Cards (Enhanced Hero Stats)
   ======================================== */

.stat-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    cursor: pointer;
}

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

.stat-card:focus {
    outline: 2px solid var(--dnagenics-teal, #00b4d8);
    outline-offset: 2px;
}

.stat-card-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    font-size: 1.75rem;
    color: white;
    overflow: hidden;
    flex-shrink: 0;
}

.stat-card-portrait {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px;
}

.stat-card-icon-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-card-primary .stat-card-icon {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.stat-card-info .stat-card-icon {
    background: linear-gradient(135deg, #00b4d8 0%, #0096c7 100%);
}

.stat-card-warning .stat-card-icon {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.stat-card-danger .stat-card-icon {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.stat-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.stat-card-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6c757d;
    margin-bottom: 0.25rem;
}

.stat-card-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dnagenics-dark, #1a1a2e);
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

.stat-card-value-sm {
    font-size: 1.15rem;
}

.stat-card-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.stat-card-detail {
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: auto;
}

/* ========================================
   Match Quality Distribution
   ======================================== */

.match-quality-bars {
    width: 100%;
}

.match-quality-item .progress {
    border-radius: 6px;
    background-color: #e9ecef;
}

.match-quality-item .progress-bar {
    border-radius: 6px;
    transition: width 0.6s ease;
}

.match-quality-summary .display-4 {
    font-size: 3rem;
    line-height: 1;
}

.badge-lg {
    font-size: 0.9rem;
}

/* ========================================
   Quick Insights Panel
   ======================================== */

.quick-insights-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.quick-insight-item {
    display: flex;
    align-items: flex-start;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.quick-insight-item:last-child {
    border-bottom: none;
}

.quick-insight-item i {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    font-size: 0.9rem;
}

.quick-insight-item span {
    flex: 1;
    font-size: 0.95rem;
    color: #495057;
    line-height: 1.5;
}

.quick-insight-item strong {
    color: var(--dnagenics-dark, #1a1a2e);
}

/* ========================================
   Legacy Highlight Boxes (keeping for compatibility)
   ======================================== */

.highlight-box {
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
}

.highlight-box:hover {
    border-color: var(--dnagenics-teal, #00b4d8);
    box-shadow: 0 4px 12px rgba(0, 180, 216, 0.15);
    transform: translateY(-2px);
}

.highlight-box:focus {
    outline: 2px solid var(--dnagenics-teal, #00b4d8);
    outline-offset: 2px;
}

.highlight-box i {
    display: block;
    margin: 0 auto 1rem;
}

.highlight-box h5 {
    font-size: 0.95rem;
    color: var(--dnagenics-dark, #1a1a2e);
}

.highlight-box p {
    margin-bottom: 0.25rem;
    line-height: 1.4;
}

/* ========================================
   Filter Controls
   ======================================== */

.filter-chip {
    background: white;
    border: 1px solid var(--dnagenics-border, #e5e7eb);
    border-radius: 20px;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    color: var(--dnagenics-dark, #1a1a2e);
}

.filter-chip:hover, 
.filter-chip.active {
    background: var(--dnagenics-teal, #00b4d8);
    color: white;
    border-color: var(--dnagenics-teal, #00b4d8);
    text-decoration: none;
}

/* ========================================
   Beautiful Story Tabs (Viking-style)
   ======================================== */

.aac-story-tabs {
    display: inline-flex;
    gap: 8px;
    background: #ffffff;
    border-radius: 50px;
    padding: 6px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
    justify-content: center;
    position: relative;
    padding-bottom: 10px;
}

.aac-story-tab {
    border: 0;
    background: #ffffff;
    border-radius: 50px;
    padding: 12px 24px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    color: #333344;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    white-space: nowrap;
}

.aac-story-tab i {
    font-size: 1rem;
    color: inherit;
}

.aac-story-tab:hover {
    color: #1a365d;
    background: #f8fafc;
}

.aac-story-tab.active {
    background: #ffffff;
    color: #1a1a2e;
    box-shadow: none;
    position: relative;
}

.aac-story-tab.active::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 8px;
    right: 8px;
    height: 4px;
    background: #10b981;
    border-radius: 4px 4px 0 0;
    box-shadow: 0 -2px 8px rgba(16, 185, 129, 0.4);
    z-index: 1;
}

@media (max-width: 768px) {
    .aac-story-tabs {
        gap: 6px;
        padding: 4px;
    }
    
    .aac-story-tab {
        padding: 10px 16px;
        font-size: 0.875rem;
    }
    
    .aac-story-tab i {
        font-size: 0.9rem;
    }
}

/* Key Insights Header - Golden Brown Background */
.aac-key-insights-header {
    background: #c9a430 !important;
    border-radius: 12px 12px 0 0;
    padding: 1.25rem 1.5rem;
}

.aac-key-insights-header h5 {
    color: #ffffff !important;
    font-weight: 600;
    margin: 0;
}

.aac-key-insights-header i {
    color: #ffffff;
}

/* ========================================
   Sample Cards - One Way Analysis
   ======================================== */

.content-grid {
    display: block;
    padding: 0;
}

.sample-section {
    width: 100%;
}

.sample-list {
    width: 100%;
}

.sample-card-compact {
    transition: all 0.3s ease;
    cursor: pointer;
}

.sample-card-compact:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12) !important;
    transform: translateY(-2px);
}

.sample-card-compact:focus {
    outline: 2px solid var(--dnagenics-teal, #00b4d8);
    outline-offset: 2px;
}

.sample-thumb {
    width: 80px;
    height: 80px;
    object-fit: cover;
    object-position: center top;
    border-radius: 12px;
    transition: all 0.3s ease;
    border: 2px solid var(--dnagenics-border, #e5e7eb);
}

.sample-card-compact:hover .sample-thumb {
    transform: scale(1.05);
    border-color: var(--dnagenics-teal, #00b4d8);
}

/* Distance Badges */
.distance-badge {
    font-size: 0.875rem;
    font-weight: 700;
    padding: 0.375rem 0.75rem;
}

.distance-badge.low-distance {
    background-color: var(--ancient-low-distance);
    color: white;
}

.distance-badge.medium-distance {
    background-color: var(--ancient-medium-distance);
    color: white;
}

.distance-badge.high-distance {
    background-color: var(--ancient-high-distance);
    color: white;
}

/* ========================================
   Two-Way Analysis Cards
   ======================================== */

.two-way-card-compact {
    transition: all 0.3s ease;
}

.two-way-card-compact:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12) !important;
    transform: translateY(-2px);
}

.two-way-population {
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.two-way-population:hover {
    background-color: rgba(0, 180, 216, 0.1);
}

.two-way-population:focus {
    outline: 2px solid var(--dnagenics-teal, #00b4d8);
    outline-offset: 2px;
}

.two-way-image-wrapper {
    flex-shrink: 0;
}

.two-way-thumb {
    width: 80px;
    height: 80px;
    object-fit: cover;
    object-position: center top;
    border-radius: 12px;
    transition: all 0.3s ease;
    border: 2px solid var(--dnagenics-border, #e5e7eb);
}

.two-way-card-compact:hover .two-way-thumb {
    transform: scale(1.05);
}

/* VS Badge */
.vs-badge-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.vs-badge {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.5rem;
    color: white;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.vs-text {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* ========================================
   Map Container
   ======================================== */

.mapdeepancient {
    width: 100%;
    height: 600px;
    border-radius: 12px;
    border: 1px solid var(--dnagenics-border, #e5e7eb);
}

/* ========================================
   Chart Containers
   ======================================== */

.chart-container {
    position: relative;
    height: 400px;
    max-height: 400px;
    overflow: hidden;
}

.chart-container-small {
    position: relative;
    height: 300px;
    max-height: 300px;
    overflow: hidden;
}

#timelineChart,
#regionalChart {
    width: 100%;
}

#timelineChart {
    max-height: 400px !important;
    height: 400px !important;
}

#regionalChart {
    max-height: 300px !important;
    height: 300px !important;
}

/* ========================================
   Load More Button
   ======================================== */

#loadMoreBtn {
    min-width: 250px;
    transition: all 0.3s ease;
}

#loadMoreBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 180, 216, 0.3);
}

/* ========================================
   AI Assistant Section
   ======================================== */

.ai-assistant-section {
    margin-top: 3rem;
}

.ai-assistant-section .suggested-prompts .btn {
    transition: all 0.2s ease;
}

.ai-assistant-section .suggested-prompts .btn:hover {
    transform: translateY(-2px);
}

.ai-results {
    margin-top: 1.5rem;
}

.ai-sample-output .sample-content {
    border-left: 4px solid var(--dnagenics-teal, #00b4d8);
}

/* ========================================
   FAQ Accordion
   ======================================== */

.faq-section .card-header {
    background: white;
    border-bottom: 1px solid var(--dnagenics-border, #e5e7eb);
    padding: 0;
}

.faq-section .card-header .btn-link {
    color: var(--dnagenics-dark, #1a1a2e);
    text-decoration: none;
    padding: 1rem 1.25rem;
    font-weight: 500;
}

.faq-section .card-header .btn-link:hover {
    text-decoration: none;
    color: var(--dnagenics-teal, #00b4d8);
}

.faq-section .card-header .btn-link:focus {
    box-shadow: none;
}

.faq-section .card-header .fa-chevron-down {
    transition: transform 0.3s ease;
}

.faq-section .card-header .btn-link[aria-expanded="true"] .fa-chevron-down {
    transform: rotate(180deg);
}

.faq-section .card-body {
    padding: 1.25rem;
    background: #fafbfc;
}

.faq-section .card-body ul {
    padding-left: 1.5rem;
}

.faq-section .card-body li {
    margin-bottom: 0.5rem;
}

/* ========================================
   Methodology Section
   ======================================== */

.methodology-section .card-header {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.methodology-section .card-header:hover {
    background-color: #f8f9fa;
}

.methodology-section .card-header .fa-chevron-down,
.fa-chevron-down {
    transition: transform 0.3s ease;
}

.methodology-section .card-header[aria-expanded="true"] .fa-chevron-down,
.fa-chevron-down.rotated {
    transform: rotate(180deg);
}

.methodology-section code {
    background: #e9ecef;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    display: inline-block;
}

/* ========================================
   Sample Detail Drawer 
   (Extends shared AncestryRegionCards.css)
   ======================================== */

/* Drawer specific overrides for ancient samples - Dark Theme */
#sampleDrawer .region-drawer-panel {
    max-width: 700px;
    background: var(--src-slate, #1A1C1E);
    border-left: 1px solid var(--src-stone, #2A2D31);
}

#sampleDrawer .region-drawer-header {
    background: var(--src-obsidian, #0D0D0F);
    border-bottom: 1px solid var(--src-stone, #2A2D31);
}

#sampleDrawer .region-drawer-title {
    color: var(--src-ivory, #F5F3EF);
}

#sampleDrawer .region-drawer-body {
    background: var(--src-slate, #1A1C1E);
    color: var(--src-bone, #E8E4DC);
}

/* Drawer Portrait - Rounded Design */
.sample-drawer-portrait {
    text-align: center;
    margin: 1.5rem 0;
    padding: 0 1rem;
}

.sample-drawer-portrait img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--src-accent, #C4956A);
}

/* Sample ID and Location Header */
.sample-drawer-info {
    text-align: center;
    margin-bottom: 1.5rem;
    padding: 0 1rem;
}

.sample-drawer-info h3 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.5rem;
    color: var(--src-ivory, #F5F3EF);
    margin: 0 0 0.5rem;
    font-weight: 600;
}

.sample-drawer-info p {
    color: var(--src-sand, #A89F91);
    margin: 0;
    font-size: 0.9375rem;
}

.sample-drawer-info i {
    color: var(--src-accent, #C4956A);
    margin-right: 6px;
}

/* Era Badge and Date Range */
.sample-drawer-era {
    text-align: center;
    margin-bottom: 1.5rem;
    padding: 0 1rem;
}

.sample-drawer-era-badge {
    display: inline-block;
    background: var(--src-accent, #C4956A);
    color: var(--src-obsidian, #0D0D0F);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sample-drawer-dates {
    display: block;
    margin-top: 8px;
    font-size: 0.875rem;
    color: var(--src-sand, #A89F91);
}

/* Genetic Distance Score */
.sample-drawer-distance {
    text-align: center;
    margin-bottom: 1.5rem;
    padding: 0 1rem;
}

.sample-drawer-distance-badge {
    display: inline-block;
    font-size: 1.25rem;
    font-weight: 700;
    padding: 8px 20px;
    border-radius: 20px;
    margin-bottom: 4px;
}

.sample-drawer-distance-label {
    display: block;
    margin-top: 6px;
    font-size: 0.8125rem;
    color: var(--src-sand, #A89F91);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sample-drawer-section {
    padding: 1.5rem;
    border-bottom: 1px solid var(--src-stone, #2A2D31);
}

.sample-drawer-section:last-child {
    border-bottom: none;
}

.sample-drawer-section h5 {
    color: var(--src-accent, #C4956A);
    font-weight: 700;
    margin-bottom: 1rem;
}

.sample-drawer-metadata {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.sample-drawer-metadata-item {
    background: var(--src-stone, #2A2D31);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid rgba(168, 159, 145, 0.1);
}

.sample-drawer-metadata-label {
    font-size: 0.8rem;
    color: var(--src-sand, #A89F91);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.sample-drawer-metadata-value {
    font-weight: 600;
    color: var(--src-bone, #E8E4DC);
}

#sampleDrawer .aac-publication-link {
    color: var(--src-accent-light, #D4B896);
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
}

#sampleDrawer .aac-publication-link:hover,
#sampleDrawer .aac-publication-link:focus {
    color: var(--src-accent, #C4956A);
    text-decoration: underline;
}

/* Style headings in drawer body for readability */
#sampleDrawer .region-drawer-body h1,
#sampleDrawer .region-drawer-body h2,
#sampleDrawer .region-drawer-body h3,
#sampleDrawer .region-drawer-body h4,
#sampleDrawer .region-drawer-body h5,
#sampleDrawer .region-drawer-body h6,
.sample-drawer-section h1,
.sample-drawer-section h2,
.sample-drawer-section h3,
.sample-drawer-section h4,
.sample-drawer-section h5,
.sample-drawer-section h6,
.era-description-content h1,
.era-description-content h2,
.era-description-content h3,
.era-description-content h4,
.era-description-content h5,
.era-description-content h6 {
    color: var(--src-ivory, #F5F3EF) !important;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

#sampleDrawer .region-drawer-body h1,
.sample-drawer-section h1,
.era-description-content h1 {
    font-size: 1.75rem;
    font-family: 'Cormorant Garamond', Georgia, serif;
}

#sampleDrawer .region-drawer-body h2,
.sample-drawer-section h2,
.era-description-content h2 {
    font-size: 1.5rem;
    font-family: 'Cormorant Garamond', Georgia, serif;
}

#sampleDrawer .region-drawer-body h3,
.sample-drawer-section h3,
.era-description-content h3 {
    font-size: 1.25rem;
    font-family: 'Cormorant Garamond', Georgia, serif;
}

#sampleDrawer .region-drawer-body h4,
.sample-drawer-section h4,
.era-description-content h4 {
    font-size: 1.125rem;
}

#sampleDrawer .region-drawer-body h5,
.sample-drawer-section h5,
.era-description-content h5 {
    font-size: 1rem;
}

#sampleDrawer .region-drawer-body h6,
.sample-drawer-section h6,
.era-description-content h6 {
    font-size: 0.9375rem;
}

/* Override h5 in sections to use accent color for section titles */
.sample-drawer-section > h5 {
    color: var(--src-accent, #C4956A) !important;
}

/* Button overrides in drawer for proper contrast */
#sampleDrawer .region-drawer-body .btn-primary,
.sample-drawer-section .btn-primary {
    background: var(--src-obsidian, #0D0D0F) !important;
    border-color: var(--src-accent, #C4956A) !important;
    color: var(--src-accent, #C4956A) !important;
}

#sampleDrawer .region-drawer-body .btn-primary:hover,
.sample-drawer-section .btn-primary:hover {
    background: var(--src-accent, #C4956A) !important;
    border-color: var(--src-accent, #C4956A) !important;
    color: var(--src-obsidian, #0D0D0F) !important;
}

#sampleDrawer .region-drawer-body .btn-primary i,
.sample-drawer-section .btn-primary i {
    color: inherit !important;
}

#sampleDrawer .region-drawer-body .btn-outline-secondary,
.sample-drawer-section .btn-outline-secondary {
    background: transparent !important;
    border-color: var(--src-accent-light, #D4B896) !important;
    color: var(--src-accent-light, #D4B896) !important;
}

#sampleDrawer .region-drawer-body .btn-outline-secondary:hover,
.sample-drawer-section .btn-outline-secondary:hover {
    background: rgba(196, 149, 106, 0.1) !important;
    border-color: var(--src-accent, #C4956A) !important;
    color: var(--src-accent, #C4956A) !important;
}

#sampleDrawer .region-drawer-body .btn-outline-secondary i,
.sample-drawer-section .btn-outline-secondary i {
    color: inherit !important;
}

/* Mobile Responsive Styles for Drawer */
@media (max-width: 768px) {
    .sample-drawer-portrait { 
        margin: 1rem 0; 
    }
    .sample-drawer-portrait img { 
        width: 160px; 
        height: 160px; 
    }
    .sample-drawer-info { 
        margin-bottom: 1rem; 
    }
    .sample-drawer-info h3 { 
        font-size: 1.25rem; 
    }
    .sample-drawer-era { 
        margin-bottom: 1rem; 
    }
    .sample-drawer-distance {
        margin-bottom: 1rem;
    }
    .sample-drawer-distance-badge {
        font-size: 1.1rem;
        padding: 6px 16px;
    }
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 992px) {
    .sample-card-compact .col-auto {
        margin-bottom: 1rem;
    }
    
    .sample-thumb {
        width: 70px;
        height: 70px;
    }
    
    /* Stat cards responsive */
    .stat-card {
        flex-direction: row;
        align-items: center;
    }
    
    .stat-card-icon {
        margin-bottom: 0;
        margin-right: 1rem;
        width: 56px;
        height: 56px;
    }
    
    .stat-card-value {
        font-size: 1.25rem;
    }
    
    .match-quality-summary .display-4 {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .understanding-section .info-item {
        margin-bottom: 1rem;
    }
    
    .highlight-box {
        margin-bottom: 1rem;
    }
    
    .closest-match-card {
        margin-bottom: 1.5rem;
    }
    
    .sample-thumb {
        width: 60px;
        height: 60px;
    }
    
    .two-way-card-compact .col-md-5 {
        margin-bottom: 1rem;
    }
    
    .two-way-card-compact .d-flex {
        flex-direction: column;
        text-align: center;
    }
    
    .two-way-image-wrapper {
        margin-bottom: 1rem;
    }
    
    .two-way-image-wrapper.mr-3,
    .two-way-image-wrapper.ml-3 {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    .two-way-thumb {
        width: 70px;
        height: 70px;
    }
    
    .vs-badge {
        width: 45px;
        height: 45px;
        font-size: 1.25rem;
    }
    
    .sample-drawer-metadata {
        grid-template-columns: 1fr;
    }
    
    .sample-drawer-hero {
        height: 250px;
    }
    
    .mapdeepancient {
        height: 400px;
    }
    
    /* Stat cards - stack vertically */
    .stat-card {
        flex-direction: column;
        text-align: center;
    }
    
    .stat-card-icon {
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    .stat-card-meta {
        justify-content: center;
    }
    
    .stat-card-detail {
        text-align: center;
    }
    
    /* Quick insights - single column */
    .quick-insights-list {
        margin-bottom: 1rem;
    }
    
    .quick-insight-item {
        padding: 0.5rem 0;
    }
    
    .quick-insight-item span {
        font-size: 0.9rem;
    }
    
    /* Match quality - stack vertically */
    .match-quality-summary {
        margin-top: 1.5rem;
    }
}

@media (max-width: 576px) {
    .sample-card-compact .row {
        text-align: center;
    }
    
    .sample-thumb {
        width: 50px;
        height: 50px;
        margin: 0 auto;
        display: block;
    }
    
    .sample-card-compact h6 {
        font-size: 0.9rem;
    }
    
    .sample-card-compact .small {
        font-size: 0.75rem;
    }
    
    .two-way-thumb {
        width: 60px;
        height: 60px;
    }
    
    .vs-badge {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
    
    .closest-match-rank {
        top: 40px;
        font-size: 0.8rem;
        padding: 0.3rem 0.6rem;
    }
    
    .closest-match-portrait img {
        height: 180px !important;
    }
    
    /* Stat cards - compact mobile */
    .stat-card {
        padding: 1rem;
    }
    
    .stat-card-icon {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }
    
    .stat-card-value {
        font-size: 1.1rem;
    }
    
    .stat-card-value-sm {
        font-size: 1rem;
    }
    
    .stat-card-label {
        font-size: 0.7rem;
    }
    
    .stat-card-detail {
        font-size: 0.75rem;
    }
    
    .match-quality-summary .display-4 {
        font-size: 2rem;
    }
    
    /* Quick insights - compact */
    .quick-insight-item i {
        width: 20px;
        height: 20px;
        font-size: 0.8rem;
    }
    
    .quick-insight-item span {
        font-size: 0.85rem;
    }
}

/* ========================================
   EXPORT TOOLBAR
   ======================================== */

.export-toolbar {
    position: fixed;
    bottom: 90px;
    right: 30px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.export-toolbar .export-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transform: translateX(20px);
    visibility: hidden;
}

.export-toolbar.visible .export-btn {
    opacity: 1;
    transform: translateX(0);
    visibility: visible;
}

.export-toolbar .export-btn:nth-child(1) { transition-delay: 0.05s; }
.export-toolbar .export-btn:nth-child(2) { transition-delay: 0.1s; }
.export-toolbar .export-btn:nth-child(3) { transition-delay: 0.15s; }
.export-toolbar .export-btn:nth-child(4) { transition-delay: 0.2s; }

.export-toolbar .export-btn:hover {
    transform: translateY(-3px);
}

.export-toolbar .export-btn:focus {
    outline: 2px solid white;
    outline-offset: 2px;
}

.export-btn-print {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: white;
}

.export-btn-pdf {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.export-btn-csv {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.export-btn-toggle {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: white;
    width: 45px;
    height: 45px;
    font-size: 1rem;
}

.export-toolbar .export-btn[data-tooltip]::before {
    content: attr(data-tooltip);
    position: absolute;
    right: 60px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--dnagenics-dark, #1a1a2e);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    pointer-events: none;
}

.export-toolbar .export-btn:hover[data-tooltip]::before {
    opacity: 1;
    visibility: visible;
}

/* Export Modal */
.export-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.export-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.export-modal {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.export-modal-overlay.active .export-modal {
    transform: scale(1);
}

.export-modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.export-modal-header h4 {
    margin: 0;
    font-weight: 700;
    color: var(--dnagenics-dark, #1a1a2e);
}

.export-modal-close {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: #6c757d;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.export-modal-close:hover {
    color: var(--dnagenics-dark, #1a1a2e);
}

.export-modal-body {
    padding: 1.5rem;
}

.export-option {
    display: flex;
    align-items: center;
    padding: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.export-option:hover {
    border-color: var(--dnagenics-teal, #00b4d8);
    background: rgba(0, 180, 216, 0.05);
}

.export-option.selected {
    border-color: var(--dnagenics-teal, #00b4d8);
    background: rgba(0, 180, 216, 0.1);
}

.export-option-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    font-size: 1.25rem;
    color: white;
}

.export-option-icon.print { background: linear-gradient(135deg, #6366f1, #4f46e5); }
.export-option-icon.pdf { background: linear-gradient(135deg, #ef4444, #dc2626); }
.export-option-icon.csv { background: linear-gradient(135deg, #10b981, #059669); }

.export-option-info h5 {
    margin: 0 0 0.25rem 0;
    font-weight: 600;
    color: var(--dnagenics-dark, #1a1a2e);
}

.export-option-info p {
    margin: 0;
    font-size: 0.85rem;
    color: #6c757d;
}

.export-modal-footer {
    padding: 1.5rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

@media (max-width: 768px) {
    .export-toolbar {
        bottom: 80px;
        right: 20px;
    }
    
    .export-toolbar .export-btn {
        width: 45px;
        height: 45px;
    }
}

/* ========================================
   Print Styles
   ======================================== */

@media print {
    /* Hide non-printable elements */
    .filter-chip,
    #loadMoreBtn,
    .ai-assistant-section,
    .btn:not(.btn-print-include),
    .region-drawer,
    .scroll-progress-bar,
    .page-nav,
    .back-to-top-btn,
    .aac-bottom-nav,
    .export-toolbar,
    .map-fullscreen-overlay,
    .nav-pills,
    .sample-browser-toolbar,
    .era-filter-pills,
    .view-toggle,
    .sort-controls,
    header,
    footer,
    .navbar,
    .breadcrumb {
        display: none !important;
    }
    
    /* Reset backgrounds and shadows */
    body {
        background: white !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .container {
        max-width: 100% !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 20px !important;
    }
    
    .card,
    .card-dnagenics {
        box-shadow: none !important;
        border: 1px solid #dee2e6 !important;
        break-inside: avoid;
        page-break-inside: avoid;
    }
    
    .card-header {
        background: #f8f9fa !important;
        color: #1a1a2e !important;
    }
    
    .card-header.bg-gradient-dnagenics-primary {
        background: #00b4d8 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    /* Ensure content is visible */
    .sample-card-compact,
    .two-way-card-compact,
    .notable-match-card,
    .era-detail-panel {
        break-inside: avoid;
        page-break-inside: avoid;
    }
    
    /* Show all hidden content */
    .sample-card-compact.d-none,
    .collapse {
        display: block !important;
    }
    
    /* Hide tab content except active */
    .tab-content > .tab-pane {
        display: block !important;
        opacity: 1 !important;
    }
    
    /* Print header */
    .print-header {
        display: block !important;
        text-align: center;
        margin-bottom: 2rem;
        padding-bottom: 1rem;
        border-bottom: 2px solid #00b4d8;
    }
    
    .print-header h1 {
        font-size: 24px;
        margin-bottom: 0.5rem;
    }
    
    .print-header p {
        color: #6c757d;
        font-size: 14px;
    }
    
    /* Table styling for print */
    table {
        width: 100% !important;
        border-collapse: collapse;
    }
    
    th, td {
        border: 1px solid #dee2e6 !important;
        padding: 8px !important;
    }
    
    /* Image handling */
    img {
        max-width: 100% !important;
        height: auto !important;
    }
    
    /* Page breaks */
    h2, h3, h4 {
        page-break-after: avoid;
    }
    
    /* Footer with page numbers */
    @@page {
        margin: 1cm;
    }
}

/* ========================================
   HERO MATCH SECTION (NEW)
   ======================================== */

.hero-match-section {
    margin-bottom: 3rem;
}

.hero-match-card {
    border-radius: 20px;
    overflow: hidden;
}

.hero-match-portrait-container {
    position: relative;
    height: 100%;
    min-height: 450px;
    overflow: hidden;
}

.hero-match-portrait {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    min-height: 450px;
}

.hero-match-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0.6rem 1.2rem;
    border-radius: 25px;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
    z-index: 10;
}

.hero-match-badge i {
    margin-right: 0.5rem;
}

.hero-match-distance-overlay {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 1.25rem;
    border-radius: 16px;
    text-align: center;
    backdrop-filter: blur(10px);
    min-width: 140px;
}

.hero-distance-value {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.hero-distance-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
}

.hero-distance-quality {
    font-size: 0.85rem;
    padding: 0.4rem 0.8rem;
}

.hero-match-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    min-height: 450px;
}

.hero-match-era-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--dnagenics-teal, #00b4d8) 0%, #0096c7 100%);
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hero-match-title {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--dnagenics-dark, #1a1a2e);
    margin-bottom: 0.5rem;
}

.hero-match-subtitle {
    font-size: 1rem;
    color: #6c757d;
}

.hero-match-narrative .lead {
    font-size: 1.15rem;
    color: var(--dnagenics-dark, #1a1a2e);
    line-height: 1.6;
}

.hero-match-narrative .hero-description {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 6.4em; /* 4 lines × 1.6 line-height */
}

.hero-match-facts {
    background: #f8f9fa;
    padding: 1.25rem;
    border-radius: 12px;
    margin-top: 1rem;
}

.fact-item {
    text-align: center;
}

.fact-icon {
    font-size: 1.25rem;
    color: var(--dnagenics-teal, #00b4d8);
    margin-bottom: 0.25rem;
    display: block;
}

.fact-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6c757d;
    display: block;
}

.fact-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--dnagenics-dark, #1a1a2e);
    display: block;
}

.hero-match-actions .btn {
    border-radius: 25px;
}

/* ========================================
   COMPOSITE PROFILE SECTION (NEW)
   ======================================== */

.composite-profile-section {
    margin-bottom: 3rem;
}

.composite-profile-card {
    border-radius: 20px;
}

.composite-population {
    cursor: pointer;
    padding: 1.5rem;
    border-radius: 16px;
    background: #f8f9fa;
    transition: all 0.3s ease;
    text-align: center;
}

.composite-population:hover {
    background: #e9ecef;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.composite-population:focus {
    outline: 2px solid var(--dnagenics-teal, #00b4d8);
    outline-offset: 2px;
}

.composite-portrait-wrapper {
    position: relative;
    display: inline-block;
}

.composite-portrait {
    width: 150px;
    height: 150px;
    object-fit: cover;
    object-position: center 20%;
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.composite-proportion-badge {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background: linear-gradient(135deg, #00b4d8 0%, #0096c7 100%);
    color: white;
    font-size: 1rem;
    font-weight: 700;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(0, 180, 216, 0.4);
}

.composite-info h5 {
    color: var(--dnagenics-dark, #1a1a2e);
}

.blend-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem 0;
}

.blend-plus {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    color: white;
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

.blend-result {
    text-align: center;
}

.blend-fit-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--dnagenics-dark, #1a1a2e);
    line-height: 1;
}

.blend-fit-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #6c757d;
}

.composite-explanation {
    background: #f8f9fa;
    margin: -1.5rem;
    margin-top: 1.5rem;
    padding: 1.5rem;
    border-radius: 0 0 20px 20px;
}

/* ========================================
   NOTABLE MATCHES SECTION (NEW)
   ======================================== */

.notable-matches-section {
    margin-bottom: 2rem;
}

.quick-stat-card {
    border-radius: 12px;
    transition: all 0.3s ease;
}

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

.bg-success-light {
    background-color: rgba(16, 185, 129, 0.1);
}

.bg-warning-light {
    background-color: rgba(245, 158, 11, 0.1);
}

.bg-info-light {
    background-color: rgba(0, 180, 216, 0.1);
}

.quick-stat-value {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
}

.quick-stat-label {
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 0.25rem;
}

.notable-match-card {
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    border-radius: 16px;
    overflow: hidden;
}

.notable-match-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15) !important;
}

.notable-match-card:focus {
    outline: 2px solid var(--dnagenics-teal, #00b4d8);
    outline-offset: 2px;
}

.notable-match-rank {
    position: absolute;
    top: 15px;
    left: 15px;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: white;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 0.35rem 0.7rem;
    border-radius: 15px;
    z-index: 10;
    box-shadow: 0 3px 10px rgba(99, 102, 241, 0.4);
}

.notable-match-portrait-wrapper {
    position: relative;
    overflow: hidden;
}

.notable-match-portrait {
    width: 100%;
    height: 250px;
    object-fit: cover;
    object-position: center top;
    transition: transform 0.3s ease;
}

.notable-match-card:hover .notable-match-portrait {
    transform: scale(1.05);
}

.notable-match-distance {
    position: absolute;
    bottom: 10px;
    right: 10px;
    text-align: center;
    background: rgba(0, 0, 0, 0.75);
    padding: 0.5rem 0.75rem;
    border-radius: 10px;
    backdrop-filter: blur(5px);
}

/* ========================================
   KEY INSIGHTS LIST (NEW)
   ======================================== */

.key-insights-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.key-insight-item {
    display: flex;
    align-items: flex-start;
    padding: 1rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.key-insight-item:last-child {
    border-bottom: none;
}

.key-insight-item i {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    font-size: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.key-insight-item > div {
    flex: 1;
    font-size: 0.95rem;
    color: #495057;
    line-height: 1.5;
}

/* ========================================
   UNDERSTANDING ITEMS (NEW)
   ======================================== */

.understanding-item {
    height: 100%;
}

.understanding-item h6 {
    margin-bottom: 0.75rem;
}

.distance-scale {
    list-style: none;
    padding: 0;
    margin: 0;
}

.distance-scale li {
    padding: 0.4rem 0;
    font-size: 0.9rem;
}

.distance-scale li .badge {
    min-width: 50px;
    margin-right: 0.5rem;
}

/* ========================================
   SMALLER SAMPLE THUMBNAILS (NEW)
   ======================================== */

.sample-thumb-sm {
    width: 50px;
    height: 50px;
    object-fit: cover;
    object-position: center top;
    border-radius: 50%;
    border: 2px solid var(--dar-amber);
    background: var(--dar-obsidian);
    flex-shrink: 0;
}

.sample-card-compact:hover .sample-thumb-sm {
    border-color: var(--dar-aac-accent-light);
    transform: scale(1.05);
    transition: all 0.2s ease;
}

/* ========================================
   Accessibility Improvements
   ======================================== */

/* Focus states for keyboard navigation */
[role="button"]:focus,
[tabindex="0"]:focus {
    outline: 2px solid var(--dnagenics-teal, #00b4d8);
    outline-offset: 2px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .sample-card-compact,
    .two-way-card-compact,
    .closest-match-card,
    .highlight-box,
    .sample-thumb,
    .two-way-thumb,
    .filter-chip,
    #loadMoreBtn,
    .hero-match-card,
    .composite-population,
    .notable-match-card {
        transition: none;
    }
    
    .sample-card-compact:hover .sample-thumb,
    .two-way-card-compact:hover .two-way-thumb,
    .closest-match-card:hover .closest-match-portrait img,
    .notable-match-card:hover .notable-match-portrait {
        transform: none;
    }
}

/* ========================================
   RESPONSIVE - HERO & COMPOSITE (NEW)
   ======================================== */

@media (max-width: 992px) {
    .hero-match-portrait-container {
        min-height: 350px;
    }
    
    .hero-match-portrait {
        min-height: 350px;
    }
    
    .hero-match-content {
        min-height: auto;
        padding: 2rem !important;
    }
    
    .hero-match-title {
        font-size: 1.75rem;
    }
    
    .hero-distance-value {
        font-size: 2rem;
    }
    
    .composite-portrait {
        width: 120px;
        height: 120px;
    }
    
    .blend-plus {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .blend-fit-value {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    .hero-match-portrait-container {
        min-height: 300px;
    }
    
    .hero-match-portrait {
        min-height: 300px;
    }
    
    .hero-match-badge {
        font-size: 0.8rem;
        padding: 0.5rem 1rem;
    }
    
    .hero-match-distance-overlay {
        padding: 1rem;
    }
    
    .hero-distance-value {
        font-size: 1.75rem;
    }
    
    .hero-match-title {
        font-size: 1.5rem;
    }
    
    .hero-match-narrative .lead {
        font-size: 1rem;
    }
    
    .composite-population {
        margin-bottom: 1.5rem;
    }
    
    .composite-portrait {
        width: 100px;
        height: 100px;
    }
    
    .composite-proportion-badge {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }
    
    .blend-indicator {
        margin: 1rem 0;
    }
    
    .notable-match-portrait {
        height: 180px;
    }
    
    .quick-stat-value {
        font-size: 1.5rem;
    }
}

@media (max-width: 576px) {
    .hero-match-portrait-container {
        min-height: 250px;
    }
    
    .hero-match-portrait {
        min-height: 250px;
    }
    
    .hero-match-content {
        padding: 1.5rem !important;
    }
    
    .hero-match-title {
        font-size: 1.25rem;
    }
    
    .hero-match-subtitle {
        font-size: 0.85rem;
    }
    
    .hero-distance-value {
        font-size: 1.5rem;
    }
    
    .hero-match-distance-overlay {
        min-width: 100px;
        padding: 0.75rem;
    }
    
    .hero-match-facts {
        padding: 1rem;
    }
    
    .fact-item {
        margin-bottom: 0.75rem;
    }
    
    .composite-portrait {
        width: 80px;
        height: 80px;
    }
    
    .blend-plus {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }
    
    .blend-fit-value {
        font-size: 1.25rem;
    }
    
    .notable-match-portrait {
        height: 150px;
    }
    
    .notable-match-rank {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
    
    .key-insight-item i {
        width: 28px;
        height: 28px;
        font-size: 0.85rem;
    }
    
    .key-insight-item > div {
        font-size: 0.9rem;
    }
}

/* ========================================
   FALLBACK TOOLTIP STYLES (Map)
   FarmerHunterV2-style tooltip for when 
   UnifiedMapPins is not available
   ======================================== */

.leaflet-tooltip.deepancient-tooltip {
    background: white;
    border: none;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    padding: 0;
    max-width: 280px;
    min-width: 200px;
}

.leaflet-tooltip.deepancient-tooltip::before {
    border-top-color: white;
}

.deepancient-tooltip-content {
    font-family: var(--dnagenics-font-family, 'Inter', -apple-system, BlinkMacSystemFont, sans-serif);
}

.deepancient-tooltip-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.deepancient-tooltip-portrait {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--dnagenics-teal, #00b4d8);
    flex-shrink: 0;
}

.deepancient-tooltip-title-group {
    flex: 1;
    min-width: 0;
}

.deepancient-tooltip-title {
    font-weight: 600;
    color: var(--dnagenics-dark, #1a1a2e);
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.deepancient-tooltip-body {
    padding: 10px 12px;
}

.deepancient-tooltip-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    font-size: 12px;
}

.deepancient-tooltip-row:not(:last-child) {
    border-bottom: 1px solid #f3f4f6;
    padding-bottom: 6px;
    margin-bottom: 4px;
}

.deepancient-tooltip-label {
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 6px;
}

.deepancient-tooltip-label i {
    width: 14px;
    color: var(--dnagenics-teal, #00b4d8);
    font-size: 11px;
}

.deepancient-tooltip-value {
    font-weight: 500;
    color: var(--dnagenics-dark, #1a1a2e);
    text-align: right;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.deepancient-tooltip-footer {
    padding: 8px 12px;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
    border-radius: 0 0 12px 12px;
    text-align: center;
    font-size: 11px;
    color: #9ca3af;
}

.deepancient-tooltip-footer i {
    margin-right: 4px;
}

/* ========================================
   RELATED PRODUCTS - Dark Theme
   ======================================== */
.aac-related-products {
    padding: 80px 20px;
    background: var(--dar-slate, #1A1C1E);
/*    margin-top: 60px;*/
/*    border-top: 1px solid rgba(168, 159, 145, 0.2);*/
}

.aac-related-title {
    text-align: center;
    font-size: clamp(1.5rem, 4vw, 2rem);
    color: var(--dar-ivory, #F5F3EF);
    margin-bottom: 48px;
    font-weight: 600;
    font-family: 'Cormorant Garamond', Georgia, serif;
}

.aac-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
    max-width: 1200px;
    margin: 0 auto;
}

@media (max-width: 991px) {
    .aac-related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 575px) {
    .aac-related-grid {
        grid-template-columns: 1fr;
    }
}

.aac-related-card {
    background: var(--dar-stone, #2A2D31);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(168, 159, 145, 0.2);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.aac-related-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 20px rgba(184, 149, 106, 0.2);
    border-color: var(--dar-aac-accent, #B8956A);
}

.aac-related-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
    background: var(--dar-stone, #2A2D31);
}

.aac-related-content {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.aac-related-content h4 {
    font-size: 1.15rem;
    color: var(--dar-ivory, #F5F3EF);
    margin: 0 0 12px 0;
    font-weight: 600;
    line-height: 1.4;
}

.aac-related-content p {
    font-size: 0.9rem;
    color: var(--dar-sand, #A89F91);
    margin: 0 0 20px 0;
    line-height: 1.6;
    flex: 1;
}

.aac-related-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--dar-aac-accent, #B8956A);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    margin-top: auto;
}

.aac-related-link:hover {
    color: var(--dar-aac-accent-light, #D4B896);
    text-decoration: none;
}

.aac-related-link i {
    transition: transform 0.3s ease;
}

.aac-related-link:hover i {
    transform: translateX(4px);
}

/* ========================================
   HERO SECTION - Darker Overlay Override
   Match the darker design of other heroes
   ======================================== */

/* Darken the hero background image */
#hero-section.dar-hero .dar-hero-bg-image {
    /* Keep cinematic, but ensure the photo is visible */
    opacity: 0.45 !important;
    filter: saturate(0.65) brightness(0.55) !important;
}

/* Increase overlay darkness for better contrast */
#hero-section.dar-hero .dar-hero-overlay {
    background: 
        linear-gradient(180deg, 
            rgba(13, 13, 15, 0.70) 0%, 
            rgba(13, 13, 15, 0.45) 40%, 
            rgba(13, 13, 15, 0.60) 70%, 
            rgba(13, 13, 15, 0.92) 100%
        ) !important;
}

/* Ensure hero background is dark and visible */
#hero-section.dar-hero {
    background-color: #0D0D0F;
}

/* Ensure hero background container displays properly */
#hero-section.dar-hero .dar-hero-bg {
    display: block;
}

/* ========================================
   REGION BREAKDOWN IN ERA DETAILS
   ======================================== */

.aac-era-detail-samples-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--dar-ivory, #F5F3EF);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.aac-era-region-breakdown {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.aac-region-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.aac-region-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.875rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 0.2s ease;
}

.aac-region-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateX(4px);
}

.aac-region-info {
    display: flex;
    align-items: center;
    flex: 1;
}

.aac-region-info .dna-icon {
    color: var(--dar-aac-accent, #B8956A);
    font-size: 1rem;
}

.aac-region-name {
    font-weight: 600;
    color: var(--dar-ivory, #F5F3EF);
    font-size: 0.95rem;
}

.aac-region-stats {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.aac-region-count {
    font-size: 0.875rem;
    color: var(--dar-sand, #A89F91);
    font-weight: 500;
}

.aac-region-distance {
    font-size: 0.875rem;
    color: var(--dar-aac-accent, #B8956A);
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    background: rgba(184, 149, 106, 0.1);
    border-radius: 6px;
}

.aac-load-more-regions-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(184, 149, 106, 0.1);
    border: 1px solid rgba(184, 149, 106, 0.3);
    border-radius: 8px;
    color: var(--dar-aac-accent, #B8956A);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.aac-load-more-regions-btn:hover {
    background: rgba(184, 149, 106, 0.2);
    border-color: rgba(184, 149, 106, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(184, 149, 106, 0.2);
}

.aac-load-more-regions-btn .dna-icon {
    transition: transform 0.3s ease;
    font-size: 0.875rem;
}

.aac-load-more-regions-btn[aria-expanded="true"] .dna-icon {
    transform: rotate(180deg);
}

.aac-region-more {
    margin-top: 0.75rem;
}

.aac-load-more-eras-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(184, 149, 106, 0.1);
    border: 1px solid rgba(184, 149, 106, 0.3);
    border-radius: 8px;
    color: var(--dar-aac-accent, #B8956A);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.aac-load-more-eras-btn:hover {
    background: rgba(184, 149, 106, 0.2);
    border-color: rgba(184, 149, 106, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(184, 149, 106, 0.2);
}

.aac-load-more-eras-btn .dna-icon {
    transition: transform 0.3s ease;
    font-size: 0.875rem;
}

.aac-load-more-eras-btn[aria-expanded="true"] .dna-icon {
    transform: rotate(180deg);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .aac-region-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .aac-region-stats {
        width: 100%;
        justify-content: space-between;
    }
    
    .aac-load-more-regions-btn {
        width: 100%;
        justify-content: center;
    }
    
    .aac-load-more-eras-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Hide era bar visualization */
.aac-era-bar {
    display: none !important;
}

/* ========================================
   Haplogroup Info Alerts
   ======================================== */
.dar-haplo-info-alert {
    display: flex;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    border: 1px solid;
}

.dar-haplo-info-alert > i {
    font-size: 1.5rem;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.dar-haplo-info-alert strong {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
}

.dar-haplo-info-alert p {
    margin: 0;
    line-height: 1.6;
    opacity: 0.9;
    font-size: 0.9375rem;
}

.dar-haplo-info-alert code {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.875em;
}

.dar-haplo-alert-info {
    background: rgba(58, 143, 143, 0.1);
    border-color: rgba(58, 143, 143, 0.3);
    color: var(--dar-ivory);
}

.dar-haplo-alert-info > i {
    color: var(--dar-aac-accent, #B8956A);
}

.dar-haplo-alert-warning {
    background: rgba(255, 193, 7, 0.1);
    border-color: rgba(255, 193, 7, 0.3);
    color: var(--dar-ivory);
}

.dar-haplo-alert-warning > i {
    color: #ffc107;
}

.dar-haplo-alert-neutral {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--dar-sand);
}

.dar-haplo-alert-neutral > i {
    color: var(--dar-aac-accent, #B8956A);
}

@media (max-width: 575.98px) {
    .dar-haplo-info-alert {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .dar-haplo-info-alert > i {
        align-self: flex-start;
    }
}
