/**
 * Pedigree Chart Styles
 */

.hp-chart-container {
    max-width: 100%;
    margin: 40px auto;
    padding: 20px;
    background: #f8f9fa;
}

.hp-chart-header {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.hp-chart-header h1 {
    margin: 0 0 15px 0;
    color: #004466;
    font-size: 24px;
}

.hp-chart-controls {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.hp-chart-controls label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: #333;
}

.hp-chart-controls select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    font-size: 14px;
}

.hp-chart-controls select:hover {
    border-color: #004466;
}

.hp-chart-wrapper {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: auto;
}

#hp-pedigree-chart {
    min-width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

#hp-pedigree-chart svg {
    display: block;
    margin: 0 auto;
}

/* Force consistent fonts, override WordPress theme */
#hp-pedigree-chart svg text,
#hp-pedigree-chart svg tspan,
#hp-pedigree-chart text,
#hp-pedigree-chart tspan,
svg text,
svg tspan,
.hp-chart-wrapper svg text,
.hp-chart-wrapper svg tspan,
.hp-chart-wrapper text,
.hp-chart-wrapper tspan {
    font-family: Arial, sans-serif !important;
    font-style: normal !important;
    font-variant: normal !important;
    text-decoration: none !important;
    letter-spacing: normal !important;
}

/* Chart type specific styles */
.hp-chart-bottom-to-top svg {
    /* Bottom to top specific adjustments */
}

.hp-chart-top-to-bottom svg {
    /* Top to bottom specific adjustments */
}

.hp-chart-left-to-right svg {
    /* Left to right specific adjustments */
}

/* Person box interactions */
.person-box {
    transition: all 0.2s ease;
}

.person-box:hover {
    cursor: pointer;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hp-chart-container {
        padding: 10px;
    }
    
    .hp-chart-wrapper {
        padding: 20px;
    }
    
    .hp-chart-controls {
        flex-direction: column;
        gap: 10px;
    }
    
    .hp-chart-controls label {
        width: 100%;
    }
    
    .hp-chart-controls select {
        flex: 1;
    }
}

/* Print styles */
@media print {
    .hp-chart-controls {
        display: none;
    }
    
    .hp-chart-wrapper {
        box-shadow: none;
        padding: 0;
    }
    
    #hp-pedigree-chart svg {
        max-width: 100%;
        height: auto;
    }
}
